azkaban.utils.Props.storeFlattened()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中azkaban.utils.Props.storeFlattened()方法的一些代码示例,展示了Props.storeFlattened()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Props.storeFlattened()方法的具体详情如下:
包路径:azkaban.utils.Props
类名称:Props
方法名:storeFlattened

Props.storeFlattened介绍

[英]Store all properties, those local and also those in parent props
[中]存储所有属性,包括本地属性和父道具中的属性

代码示例

代码示例来源:origin: azkaban/azkaban

/**
 * Store all properties, those local and also those in parent props
 *
 * @param file The file to store to
 * @throws IOException If there is an error writing
 */
public void storeFlattened(final File file) throws IOException {
 final BufferedOutputStream out =
   new BufferedOutputStream(new FileOutputStream(file));
 try {
  storeFlattened(out);
 } finally {
  out.close();
 }
}

代码示例来源:origin: azkaban/azkaban

public File createFlattenedPropsFile(final String workingDir) {
 final File directory = new File(workingDir);
 File tempFile = null;
 try {
  // The temp file prefix must be at least 3 characters.
  tempFile = File.createTempFile(getId() + "_props_", "_tmp", directory);
  this.jobProps.storeFlattened(tempFile);
 } catch (final IOException e) {
  throw new RuntimeException("Failed to create temp property file ", e);
 }
 return tempFile;
}

代码示例来源:origin: azkaban/azkaban

pluginProps.put("pluginprops3", "4");
pluginProps
  .storeFlattened(new File(anothertestfolder, "plugin.properties"));
commonPlugin.removeLocal("commonprop2");
commonPlugin
  .storeFlattened(new File(this.testPluginDirPath + "/common.properties"));
commonPrivate.put("newcommonprivate1", "2");
commonPrivate.removeLocal("commonprivate2");
commonPrivate.storeFlattened(new File(this.testPluginDirPath
  + "/commonprivate.properties"));

代码示例来源:origin: com.linkedin.azkaban/az-core

/**
 * Store all properties, those local and also those in parent props
 *
 * @param file The file to store to
 * @throws IOException If there is an error writing
 */
public void storeFlattened(final File file) throws IOException {
 final BufferedOutputStream out =
   new BufferedOutputStream(new FileOutputStream(file));
 try {
  storeFlattened(out);
 } finally {
  out.close();
 }
}

代码示例来源:origin: com.linkedin.azkaban/azkaban

public File createFlattenedPropsFile(final String workingDir) {
  File directory = new File(workingDir);
  File tempFile = null;
  try {
    // The temp file prefix must be at least 3 characters.
    tempFile = File.createTempFile(getId() + "_props_", "_tmp", directory);
    jobProps.storeFlattened(tempFile);
  } catch (IOException e) {
    throw new RuntimeException("Failed to create temp property file ", e);
  }
  return tempFile;
}

代码示例来源:origin: com.linkedin.azkaban/azkaban

/**
 * Store all properties, those local and also those in parent props
 * 
 * @param file
 *            The file to store to
 * @throws IOException
 *             If there is an error writing
 */
public void storeFlattened(File file) throws IOException {
  BufferedOutputStream out = new BufferedOutputStream(
      new FileOutputStream(file));
  try {
    storeFlattened(out);
  } finally {
    out.close();
  }
}

代码示例来源:origin: com.linkedin.azkaban/azkaban-common

public File createFlattenedPropsFile(final String workingDir) {
 final File directory = new File(workingDir);
 File tempFile = null;
 try {
  // The temp file prefix must be at least 3 characters.
  tempFile = File.createTempFile(getId() + "_props_", "_tmp", directory);
  this.jobProps.storeFlattened(tempFile);
 } catch (final IOException e) {
  throw new RuntimeException("Failed to create temp property file ", e);
 }
 return tempFile;
}

相关文章