本文整理了Java中org.apache.gobblin.configuration.State.getPropAsShortWithRadix()
方法的一些代码示例,展示了State.getPropAsShortWithRadix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。State.getPropAsShortWithRadix()
方法的具体详情如下:
包路径:org.apache.gobblin.configuration.State
类名称:State
方法名:getPropAsShortWithRadix
[英]Get the value of a property as a short.
[中]将属性的值作为短字符串获取。
代码示例来源:origin: apache/incubator-gobblin
/**
* Get {@link FsPermission} from a {@link State} object.
*
* @param props A {@link State} containing properties.
* @param propName The property name for the permission. If not contained in the given state,
* defaultPermission will be used.
* @param defaultPermission default permission if propName is not contained in props.
* @return An {@link FsPermission} object.
*/
public static FsPermission deserializeFsPermission(State props, String propName, FsPermission defaultPermission) {
short mode = props.getPropAsShortWithRadix(propName, defaultPermission.toShort(),
ConfigurationKeys.PERMISSION_PARSING_RADIX);
return new FsPermission(mode);
}
代码示例来源:origin: apache/incubator-gobblin
/**
* Deserializes a {@link FsPermission}s object that should be used when a {@link DataWriter} is creating directories.
*/
public static FsPermission deserializeWriterDirPermissions(State state, int numBranches, int branchId) {
return new FsPermission(state.getPropAsShortWithRadix(
ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_DIR_PERMISSIONS, numBranches, branchId),
FsPermission.getDefault().toShort(), ConfigurationKeys.PERMISSION_PARSING_RADIX));
}
代码示例来源:origin: apache/incubator-gobblin
/**
* Deserializes a {@link FsPermission}s object that should be used when a {@link DataWriter} is writing a file.
*/
public static FsPermission deserializeWriterFilePermissions(State state, int numBranches, int branchId) {
return new FsPermission(state.getPropAsShortWithRadix(
ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_FILE_PERMISSIONS, numBranches, branchId),
FsPermission.getDefault().toShort(), ConfigurationKeys.PERMISSION_PARSING_RADIX));
}
代码示例来源:origin: apache/incubator-gobblin
this.permissions.add(new FsPermission(state.getPropAsShortWithRadix(
ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.DATA_PUBLISHER_PERMISSIONS, this.numBranches, i),
FsPermission.getDefault().toShort(), ConfigurationKeys.PERMISSION_PARSING_RADIX)));
代码示例来源:origin: org.apache.gobblin/gobblin-utility
/**
* Get {@link FsPermission} from a {@link State} object.
*
* @param props A {@link State} containing properties.
* @param propName The property name for the permission. If not contained in the given state,
* defaultPermission will be used.
* @param defaultPermission default permission if propName is not contained in props.
* @return An {@link FsPermission} object.
*/
public static FsPermission deserializeFsPermission(State props, String propName, FsPermission defaultPermission) {
short mode = props.getPropAsShortWithRadix(propName, defaultPermission.toShort(),
ConfigurationKeys.PERMISSION_PARSING_RADIX);
return new FsPermission(mode);
}
代码示例来源:origin: org.apache.gobblin/gobblin-utility
/**
* Deserializes a {@link FsPermission}s object that should be used when a {@link DataWriter} is writing a file.
*/
public static FsPermission deserializeWriterFilePermissions(State state, int numBranches, int branchId) {
return new FsPermission(state.getPropAsShortWithRadix(
ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_FILE_PERMISSIONS, numBranches, branchId),
FsPermission.getDefault().toShort(), ConfigurationKeys.PERMISSION_PARSING_RADIX));
}
代码示例来源:origin: org.apache.gobblin/gobblin-utility
/**
* Deserializes a {@link FsPermission}s object that should be used when a {@link DataWriter} is creating directories.
*/
public static FsPermission deserializeWriterDirPermissions(State state, int numBranches, int branchId) {
return new FsPermission(state.getPropAsShortWithRadix(
ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_DIR_PERMISSIONS, numBranches, branchId),
FsPermission.getDefault().toShort(), ConfigurationKeys.PERMISSION_PARSING_RADIX));
}
代码示例来源:origin: org.apache.gobblin/gobblin-core
this.permissions.add(new FsPermission(state.getPropAsShortWithRadix(
ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.DATA_PUBLISHER_PERMISSIONS, this.numBranches, i),
FsPermission.getDefault().toShort(), ConfigurationKeys.PERMISSION_PARSING_RADIX)));
内容来源于网络,如有侵权,请联系作者删除!