Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
peacewong committed Sep 9, 2024
1 parent 873410d commit ba5c070
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ object LoadData {
if (".xls".equalsIgnoreCase(suffix)) {
val config = HDFSUtils.getConfiguration(HadoopConf.HADOOP_ROOT_USER.getValue)
config.setBoolean("fs.hdfs.impl.disable.cache", true)
fs = HDFSUtils.getHDFSUserFileSystem(System.getProperty("user.name"), config)
fs = HDFSUtils.getHDFSUserFileSystem(System.getProperty("user.name"), null, config)
path = XlsUtils.excelToCsv(fs.open(new Path(path)), fs, hasHeader, sheetNames)
hasHeader = false
} else {
Expand All @@ -117,13 +117,13 @@ object LoadData {
} else if (".xls".equalsIgnoreCase(suffix)) {
val config = HDFSUtils.getConfiguration(HadoopConf.HADOOP_ROOT_USER.getValue)
config.setBoolean("fs.hdfs.impl.disable.cache", true)
fs = HDFSUtils.getHDFSUserFileSystem(System.getProperty("user.name"), config)
fs = HDFSUtils.getHDFSUserFileSystem(System.getProperty("user.name"), null, config)
path = XlsUtils.excelToCsv(new FileInputStream(path), fs, hasHeader, sheetNames)
hasHeader = false
} else {
val config = HDFSUtils.getConfiguration(HadoopConf.HADOOP_ROOT_USER.getValue)
config.setBoolean("fs.hdfs.impl.disable.cache", true)
fs = HDFSUtils.getHDFSUserFileSystem(System.getProperty("user.name"), config)
fs = HDFSUtils.getHDFSUserFileSystem(System.getProperty("user.name"), null, config)
path = copyFileToHdfs(path, fs)
}
}
Expand Down Expand Up @@ -193,7 +193,7 @@ object LoadData {
} finally {
if (fs != null) {
fs.delete(new Path(path), true)
fs.close()
// fs.close()
}
}
// warn(s"create table $database $tableName Success")
Expand Down

0 comments on commit ba5c070

Please sign in to comment.