本文整理了Java中azkaban.utils.Props.putAll()
方法的一些代码示例,展示了Props.putAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Props.putAll()
方法的具体详情如下:
包路径:azkaban.utils.Props
类名称:Props
方法名:putAll
[英]Put all properties in the props into the current props. Will handle null p.
[中]将道具中的所有属性放入当前道具。将处理空p。
代码示例来源:origin: azkaban/azkaban
/**
* Create a Props object with the contents set to that of props.
*/
public Props(final Props parent, final Props props) {
this(parent);
if (props != null) {
putAll(props);
}
}
代码示例来源:origin: azkaban/azkaban
/**
* Create properties from maps of properties
*/
public Props(final Props parent, final Map<String, String>... props) {
this(parent);
for (int i = props.length - 1; i >= 0; i--) {
this.putAll(props[i]);
}
}
代码示例来源:origin: azkaban/azkaban
/**
* Load properties from the given path
*
* @param jobPath The path to load from
* @param props The parent properties for loaded properties
* @param suffixes The suffixes of files to load
*/
public static void loadPropsBySuffix(final File jobPath, final Props props,
final String... suffixes) {
try {
if (jobPath.isDirectory()) {
final File[] files = jobPath.listFiles();
if (files != null) {
for (final File file : files) {
loadPropsBySuffix(file, props, suffixes);
}
}
} else if (endsWith(jobPath, suffixes)) {
props.putAll(new Props(null, jobPath.getAbsolutePath()));
}
} catch (final IOException e) {
throw new RuntimeException("Error loading schedule properties.", e);
}
}
代码示例来源:origin: azkaban/azkaban
/**
* Load job schedules from the given directories
*
* @param parent The parent properties for these properties
* @param dir The directory to look in
* @param suffixes File suffixes to load
* @return The loaded set of schedules
*/
public static Props loadPropsInDir(final Props parent, final File dir, final String... suffixes) {
try {
final Props props = new Props(parent);
final File[] files = dir.listFiles();
Arrays.sort(files);
if (files != null) {
for (final File f : files) {
if (f.isFile() && endsWith(f, suffixes)) {
props.putAll(new Props(null, f.getAbsolutePath()));
}
}
}
return props;
} catch (final IOException e) {
throw new RuntimeException("Error loading properties.", e);
}
}
代码示例来源:origin: azkaban/azkaban
prop.putAll(additionalProps);
代码示例来源:origin: com.linkedin.azkaban/azkaban
/**
* Create a Props object with the contents set to that of props.
*
* @param parent
* @param props
*/
public Props(Props parent, Props props) {
this(parent);
if (props != null) {
putAll(props);
}
}
代码示例来源:origin: com.linkedin.azkaban/az-core
/**
* Create a Props object with the contents set to that of props.
*
* @param parent the parent
* @param props the props
*/
public Props(final Props parent, final Props props) {
this(parent);
if (props != null) {
putAll(props);
}
}
代码示例来源:origin: com.linkedin.azkaban/az-core
/**
* Create properties from maps of properties
*
* @param parent the parent
* @param props the props
*/
public Props(final Props parent, final Map<String, String>... props) {
this(parent);
for (int i = props.length - 1; i >= 0; i--) {
this.putAll(props[i]);
}
}
代码示例来源:origin: com.linkedin.azkaban/azkaban
/**
* Create properties from maps of properties
*
* @param parent
* @param props
*/
public Props(Props parent, Map<String, String>... props) {
this(parent);
for (int i = props.length - 1; i >= 0; i--) {
this.putAll(props[i]);
}
}
代码示例来源:origin: com.linkedin.azkaban/az-core
/**
* Load job schedules from the given directories
*
* @param parent The parent properties for these properties
* @param dir The directory to look in
* @param suffixes File suffixes to load
* @return The loaded set of schedules
*/
public static Props loadPropsInDir(final Props parent, final File dir, final String... suffixes) {
try {
final Props props = new Props(parent);
final File[] files = dir.listFiles();
Arrays.sort(files);
if (files != null) {
for (final File f : files) {
if (f.isFile() && endsWith(f, suffixes)) {
props.putAll(new Props(null, f.getAbsolutePath()));
}
}
}
return props;
} catch (final IOException e) {
throw new RuntimeException("Error loading properties.", e);
}
}
代码示例来源:origin: com.linkedin.azkaban/az-core
/**
* Load properties from the given path
*
* @param jobPath The path to load from
* @param props The parent properties for loaded properties
* @param suffixes The suffixes of files to load
*/
public static void loadPropsBySuffix(final File jobPath, final Props props,
final String... suffixes) {
try {
if (jobPath.isDirectory()) {
final File[] files = jobPath.listFiles();
if (files != null) {
for (final File file : files) {
loadPropsBySuffix(file, props, suffixes);
}
}
} else if (endsWith(jobPath, suffixes)) {
props.putAll(new Props(null, jobPath.getAbsolutePath()));
}
} catch (final IOException e) {
throw new RuntimeException("Error loading schedule properties.", e);
}
}
代码示例来源:origin: com.linkedin.azkaban/azkaban
/**
* Load properties from the given path
*
* @param jobPath
* The path to load from
* @param props
* The parent properties for loaded properties
* @param suffixes
* The suffixes of files to load
*/
public static void loadPropsBySuffix(File jobPath, Props props,
String... suffixes) {
try {
if (jobPath.isDirectory()) {
File[] files = jobPath.listFiles();
if (files != null) {
for (File file : files)
loadPropsBySuffix(file, props, suffixes);
}
} else if (endsWith(jobPath, suffixes)) {
props.putAll(new Props(null, jobPath.getAbsolutePath()));
}
} catch (IOException e) {
throw new RuntimeException("Error loading schedule properties.", e);
}
}
代码示例来源:origin: com.linkedin.azkaban/azkaban
/**
* Load job schedules from the given directories
*
* @param parent
* The parent properties for these properties
* @param dir
* The directory to look in
* @param suffixes
* File suffixes to load
* @return The loaded set of schedules
*/
public static Props loadPropsInDir(Props parent, File dir, String... suffixes) {
try {
Props props = new Props(parent);
File[] files = dir.listFiles();
Arrays.sort(files);
if (files != null) {
for (File f : files) {
if (f.isFile() && endsWith(f, suffixes)) {
props.putAll(new Props(null, f.getAbsolutePath()));
}
}
}
return props;
} catch (IOException e) {
throw new RuntimeException("Error loading properties.", e);
}
}
代码示例来源:origin: com.linkedin.azkaban/azkaban-common
prop.putAll(additionalProps);
内容来源于网络,如有侵权,请联系作者删除!