本文整理了Java中org.apache.hadoop.io.nativeio.NativeIO.getCreateForWriteFileOutputStream()
方法的一些代码示例,展示了NativeIO.getCreateForWriteFileOutputStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NativeIO.getCreateForWriteFileOutputStream()
方法的具体详情如下:
包路径:org.apache.hadoop.io.nativeio.NativeIO
类名称:NativeIO
方法名:getCreateForWriteFileOutputStream
[英]Create the specified File for write access, ensuring that it does not exist.
[中]创建用于写访问的指定文件,确保该文件不存在。
代码示例来源:origin: org.apache.hadoop/hadoop-common
/**
* Open the specified File for write access, ensuring that it does not exist.
* @param f the file that we want to create
* @param permissions we want to have on the file (if security is enabled)
*
* @throws AlreadyExistsException if the file already exists
* @throws IOException if any other error occurred
*/
public static FileOutputStream createForWrite(File f, int permissions)
throws IOException {
if (skipSecurity) {
return insecureCreateForWrite(f, permissions);
} else {
return NativeIO.getCreateForWriteFileOutputStream(f, permissions);
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-common
/**
* Open the specified File for write access, ensuring that it does not exist.
* @param f the file that we want to create
* @param permissions we want to have on the file (if security is enabled)
*
* @throws AlreadyExistsException if the file already exists
* @throws IOException if any other error occurred
*/
public static FileOutputStream createForWrite(File f, int permissions)
throws IOException {
if (skipSecurity) {
return insecureCreateForWrite(f, permissions);
} else {
return NativeIO.getCreateForWriteFileOutputStream(f, permissions);
}
}
代码示例来源:origin: io.hops/hadoop-common
/**
* Open the specified File for write access, ensuring that it does not exist.
* @param f the file that we want to create
* @param permissions we want to have on the file (if security is enabled)
*
* @throws AlreadyExistsException if the file already exists
* @throws IOException if any other error occurred
*/
public static FileOutputStream createForWrite(File f, int permissions)
throws IOException {
if (skipSecurity) {
return insecureCreateForWrite(f, permissions);
} else {
return NativeIO.getCreateForWriteFileOutputStream(f, permissions);
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
/**
* Open the specified File for write access, ensuring that it does not exist.
* @param f the file that we want to create
* @param permissions we want to have on the file (if security is enabled)
*
* @throws AlreadyExistsException if the file already exists
* @throws IOException if any other error occurred
*/
public static FileOutputStream createForWrite(File f, int permissions)
throws IOException {
if (skipSecurity) {
return insecureCreateForWrite(f, permissions);
} else {
return NativeIO.getCreateForWriteFileOutputStream(f, permissions);
}
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Open the specified File for write access, ensuring that it does not exist.
* @param f the file that we want to create
* @param permissions we want to have on the file (if security is enabled)
*
* @throws AlreadyExistsException if the file already exists
* @throws IOException if any other error occurred
*/
public static FileOutputStream createForWrite(File f, int permissions)
throws IOException {
if (skipSecurity) {
return insecureCreateForWrite(f, permissions);
} else {
return NativeIO.getCreateForWriteFileOutputStream(f, permissions);
}
}
内容来源于网络,如有侵权,请联系作者删除!