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

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

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

Props.getUri介绍

[英]Returns the uri representation of the value. If the value is null, then the default value is returned. If the value isn't a uri, then a IllegalArgumentException will be thrown.
[中]返回值的uri表示形式。如果该值为空,则返回默认值。如果该值不是uri,则将抛出IllegalArgumentException。

代码示例

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

public URI getUri(final String name, final String defaultValue) {
 try {
  return getUri(name, new URI(defaultValue));
 } catch (final URISyntaxException e) {
  throw new IllegalArgumentException(e.getMessage());
 }
}

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

/**
 * Returns the double representation of the value. If the value is null, then the default value is
 * returned. If the value isn't a uri, then a IllegalArgumentException will be thrown.
 */
public URI getUri(final String name, final URI defaultValue) {
 if (containsKey(name)) {
  return getUri(name);
 } else {
  return defaultValue;
 }
}

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

@Inject
public AzkabanCommonModuleConfig(final Props props) {
 this.props = props;
 this.storageImplementation = props.getString(AZKABAN_STORAGE_TYPE, this.storageImplementation);
 this.localStorageBaseDirPath = props
   .getString(AZKABAN_STORAGE_LOCAL_BASEDIR, this.localStorageBaseDirPath);
 this.hdfsRootUri = props.get(AZKABAN_STORAGE_HDFS_ROOT_URI) != null ? props
   .getUri(AZKABAN_STORAGE_HDFS_ROOT_URI) : null;
}

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

public URI getUri(String name, String defaultValue) {
  try {
    return getUri(name, new URI(defaultValue));
  } catch (URISyntaxException e) {
    throw new IllegalArgumentException(e.getMessage());
  }
}

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

/**
 * Gets uri.
 *
 * @param name the name
 * @param defaultValue the default value
 * @return the uri
 */
public URI getUri(final String name, final String defaultValue) {
 try {
  return getUri(name, new URI(defaultValue));
 } catch (final URISyntaxException e) {
  throw new IllegalArgumentException(e.getMessage());
 }
}

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

/**
 * Returns the double representation of the value. If the value is null, then the default value is
 * returned. If the value isn't a uri, then a IllegalArgumentException will be thrown.
 *
 * @param name the name
 * @param defaultValue the default value
 * @return the uri
 */
public URI getUri(final String name, final URI defaultValue) {
 if (containsKey(name)) {
  return getUri(name);
 } else {
  return defaultValue;
 }
}

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

/**
 * Returns the double representation of the value. If the value is null,
 * then the default value is returned. If the value isn't a uri, then a
 * IllegalArgumentException will be thrown.
 * 
 * @param key
 * @param defaultValue
 * @return
 */
public URI getUri(String name, URI defaultValue) {
  if (containsKey(name)) {
    return getUri(name);
  } else {
    return defaultValue;
  }
}

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

@Inject
public AzkabanCommonModuleConfig(final Props props) {
 this.props = props;
 this.storageImplementation = props.getString(AZKABAN_STORAGE_TYPE, this.storageImplementation);
 this.localStorageBaseDirPath = props
   .getString(AZKABAN_STORAGE_LOCAL_BASEDIR, this.localStorageBaseDirPath);
 this.hdfsRootUri = props.get(AZKABAN_STORAGE_HDFS_ROOT_URI) != null ? props
   .getUri(AZKABAN_STORAGE_HDFS_ROOT_URI) : null;
}

相关文章