-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f32fb6
commit 82cc746
Showing
5 changed files
with
37 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
package tech.mlsql.tool; | ||
|
||
import net.csdn.common.logging.CSLogger; | ||
import net.csdn.common.logging.Loggers; | ||
import org.apache.commons.lang3.StringUtils; | ||
import org.apache.hadoop.fs.FSDataInputStream; | ||
import org.apache.hadoop.fs.FileStatus; | ||
import org.apache.hadoop.fs.FileSystem; | ||
import org.apache.hadoop.fs.Path; | ||
import org.apache.log4j.Logger; | ||
import org.kamranzafar.jtar.TarEntry; | ||
import org.kamranzafar.jtar.TarInputStream; | ||
import org.kamranzafar.jtar.TarOutputStream; | ||
|
@@ -19,7 +20,7 @@ | |
* 24/5/2021 WilliamZhu([email protected]) | ||
*/ | ||
public class TarfileUtil { | ||
private static Logger logger = Logger.getLogger(TarfileUtil.class); | ||
private static CSLogger logger = Loggers.getLogger(TarfileUtil.class); | ||
|
||
public static void walk(FileSystem fs, List<FileStatus> files, Path p) throws IOException { | ||
if (fs.isFile(p)) { | ||
|
@@ -87,15 +88,11 @@ public static int createTarFileStream(OutputStream output, String pathStr) throw | |
} else return 400; | ||
|
||
} catch (Exception e) { | ||
if (logger.isDebugEnabled()) { | ||
logger.debug( | ||
String.format( | ||
"createTarFileStream Error!!!\n pathStr: %s \n exception: %s", | ||
pathStr, | ||
e | ||
) | ||
); | ||
} | ||
logger.error( | ||
"Error!!!\n pathStr: {} \n exception: {}", | ||
pathStr, | ||
e | ||
); | ||
return 500; | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters