-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pig Job Auto Tuning Integration #290
base: master
Are you sure you want to change the base?
Changes from 2 commits
a534689
f2fdb88
fb689f1
ec7ce85
29e81d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
pig.listener.visualizer=false | ||
|
||
jobtype.classpath=${pig.home}/lib/*,${pig.home}/* | ||
pig.home= | ||
pig.home= | ||
pig.enable.tuning=false | ||
#tuning.api.end.point=http://hostname:8080/rest/getCurrentRunParameters | ||
auto.tuning.job.type=PIG |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright 2018 LinkedIn Corp. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package azkaban.jobtype; | ||
|
||
import org.apache.hadoop.conf.Configuration; | ||
|
||
import azkaban.utils.Props; | ||
|
||
|
||
/** | ||
* HadoopTuningConfigurationInjector is responsible for inserting links back to the | ||
* Azkaban UI in configurations and for automatically injecting designated job | ||
* properties into the Hadoop configuration. | ||
* <p> | ||
* It is assumed that the necessary links have already been loaded into the | ||
* properties. After writing the necessary links as a xml file as required by | ||
* Hadoop's configuration, clients may add the links as a default resource | ||
* using injectResources() so that they are included in any Configuration | ||
* constructed. | ||
*/ | ||
public class HadoopTuningConfigurationInjector { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This class needs to leverage There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reused HadoopConfigurationInjector and refactored some methods. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! Looks great |
||
|
||
// File to which the Hadoop configuration to inject will be written. | ||
public static final String INJECT_TUNING_FILE = "hadoop-tuning-inject.xml"; | ||
|
||
/* | ||
* To be called by the forked process to load the generated links and Hadoop | ||
* configuration properties to automatically inject. | ||
* | ||
* @param props The Azkaban properties | ||
*/ | ||
public static void injectResources(Props props) { | ||
HadoopConfigurationInjector.injectResources(props); | ||
Configuration.addDefaultResource(INJECT_TUNING_FILE); | ||
} | ||
|
||
/** | ||
* Writes out the XML configuration file that will be injected by the client | ||
* as a configuration resource. | ||
* <p> | ||
* This file will include a series of links injected by Azkaban as well as | ||
* any job properties that begin with the designated injection prefix. | ||
* | ||
* @param props The Azkaban properties | ||
* @param workingDir The Azkaban job working directory | ||
*/ | ||
public static void prepareResourcesToInject(Props props, String workingDir) { | ||
HadoopConfigurationInjector.prepareResourcesToInject(props, workingDir, INJECT_TUNING_FILE); | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this and a few other style changes in this class are not related to this change. Typically I discourage style changes which are not a part of the core of the change. Not sure if this is also the recommended approach for Azkaban code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how this white space gets added. Removed for this case.