In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
First of all, the marathon source code is written in the scala language and built by sbt; unlike spark, spark is built by maven
Option 1: import marathon source code using intellij idea [not feasible at present]
Use intellij idea to import marathon source code
B, update the source code
C, compile and package with intellij idea
D. Replace the package marathon-assembly-1.4.3.jar in $marathon_home/target/scala-2.11 on the upload server.
Restart the marathon service and found that the main class could not be found
This problem has been tossing around all afternoon, but it has not been solved all the time. As the time is relatively short, we will not continue to look for the cause for the time being, and we will continue to analyze the reason at a later stage.
Option 2: directly replace the class file in marathon-assembly-1.4.3.jar
This kind of plan is not very good, it's troublesome, it's just one of them.
At present, my need is to study and analyze the marathon source code, mainly to analyze the process of how marathon creates task.
Therefore, I don't care much about the specific process of how to compile and package the marathon source code.
The key steps are as follows:
A, https://github.com/mesosphere/marathon download the source code to window
B. Import marathon source code using intellij idea
C, update the source code, such as in the startup class, just print an output statement, such as:
D, here only compile the marathon source code, no need to package
It takes about a minute to compile.
Find the compiled class file path, as follows:
E, using the Xftp tool, the server
F, use the good pressure to open the marathon-assembly-1.4.3.jar, drag the Main$.class,Main.class directly in, and if prompted, choose to replace all
You can check the time to see if the update is successful.
G. Re-upload the marathon-assembly-1.4.3.jar jar package to the server by using the Xftp tool to replace the old jar package. It is best to replace all the nodes that deploy marathon, otherwise, the source code will be out of sync.
Use the scp command to transfer to other nodes
Restart the marathon service
I am using a script to execute this, and the command is as follows:
Option 3:
Some time ago, I encountered some trouble. After downloading the marathon source code in the company, importing intellij idea always failed, because individual jar packages always failed to download.
Solution:
At home at the weekend, with the attitude of not giving up, I reimported the marathon source code, and it was a success.
Reason: probably because the telecom operator used by the company is not the same as the telecom operator used at home, the jar package was downloaded successfully. Of course, there was no specific investigation.
At present,
1. Use intellijidea to modify the marathon source code on window
2. Upload the marathon source code to the server
3. Go to the marathon root directory
Build.sbt needs to be modified here. Build.sbt varies with different marathon source code versions.
Mainly make interior changes in two aspects.
First, comment out the mesos-simulation variable, the reason
When compiling and packaging, you will try to simulate mesos, and this process is likely to fail
Save compilation and packaging time
Second, comment out the file and issue the command of test
Case 1: if there is a testSettings variable in the file, comment out the declaration of the variable and where it is used, also comment out
Case 2: if there is no testSetting variable in this file, I will comment out all the places in the build.sbt file that contain the word test.
4. The specific orders are as follows:
Sbt-assembly tool, packaging
# sbt clean compile assembly
When finished, the target jar package will be packed in target/scala-2.11 in the root directory of the marathon source code.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.