本文整理汇总了Java中org.apache.hadoop.hbase.HBaseFileSystem.createPathWithPermsOnFileSystem方法的典型用法代码示例。如果您正苦于以下问题:Java HBaseFileSystem.createPathWithPermsOnFileSystem方法的具体用法?Java HBaseFileSystem.createPathWithPermsOnFileSystem怎么用?Java HBaseFileSystem.createPathWithPermsOnFileSystem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hbase.HBaseFileSystem
的用法示例。
在下文中一共展示了HBaseFileSystem.createPathWithPermsOnFileSystem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import org.apache.hadoop.hbase.HBaseFileSystem; //导入方法依赖的package包/类
/**
* Create the specified file on the filesystem. By default, this will:
* <ol>
* <li>apply the umask in the configuration (if it is enabled)</li>
* <li>use the fs configured buffer size (or {@value DEFAULT_BUFFER_SIZE} if
* not set)</li>
* <li>use the default replication</li>
* <li>use the default block size</li>
* <li>not track progress</li>
* </ol>
*
* @param fs {@link FileSystem} on which to write the file
* @param path {@link Path} to the file to write
* @param perm
* @param overwrite Whether or not the created file should be overwritten.
* @return output stream to the created file
* @throws IOException if the file cannot be created
*/
public static FSDataOutputStream create(FileSystem fs, Path path, FsPermission perm,
boolean overwrite) throws IOException {
LOG.debug("Creating file=" + path + " with permission=" + perm);
return HBaseFileSystem.createPathWithPermsOnFileSystem(fs, path, perm, overwrite);
}