mirror of
https://github.com/apache/sqoop.git
synced 2025-05-03 06:21:11 +08:00
SQOOP-2149: Update Kite dependency to 1.0.0
(Qian Xu via Jarek Jarcec Cecho)
This commit is contained in:
parent
e48b1ec5f6
commit
eeb71085ae
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
avro.version=1.7.5
|
avro.version=1.7.5
|
||||||
|
|
||||||
kite-data.version=0.17.0
|
kite-data.version=1.0.0
|
||||||
|
|
||||||
checkstyle.version=5.0
|
checkstyle.version=5.0
|
||||||
|
|
||||||
|
@ -19,10 +19,8 @@
|
|||||||
package org.apache.sqoop.util;
|
package org.apache.sqoop.util;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.management.ManagementFactory;
|
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.util.UUID;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@ -41,8 +39,6 @@ public class AppendUtils {
|
|||||||
|
|
||||||
public static final Log LOG = LogFactory.getLog(AppendUtils.class.getName());
|
public static final Log LOG = LogFactory.getLog(AppendUtils.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat DATE_FORM = new SimpleDateFormat(
|
|
||||||
"ddHHmmssSSSSSSSSS");
|
|
||||||
private static final String TEMP_IMPORT_ROOT =
|
private static final String TEMP_IMPORT_ROOT =
|
||||||
System.getProperty("sqoop.test.import.rootDir", "_sqoop");
|
System.getProperty("sqoop.test.import.rootDir", "_sqoop");
|
||||||
|
|
||||||
@ -278,9 +274,8 @@ private String getFileExtension(String filename) {
|
|||||||
* @return a path pointing to the temporary directory
|
* @return a path pointing to the temporary directory
|
||||||
*/
|
*/
|
||||||
public static Path getTempAppendDir(String salt) {
|
public static Path getTempAppendDir(String salt) {
|
||||||
String timeId = DATE_FORM.format(new Date(System.currentTimeMillis()));
|
String uuid = UUID.randomUUID().toString().replace("-", "");
|
||||||
String jvmName = ManagementFactory.getRuntimeMXBean().getName().replaceAll("@", "_");
|
String tempDir = TEMP_IMPORT_ROOT + Path.SEPARATOR + uuid + "_" + salt;
|
||||||
String tempDir = TEMP_IMPORT_ROOT + Path.SEPARATOR + timeId + "_" + jvmName + "_" + salt;
|
|
||||||
return new Path(tempDir);
|
return new Path(tempDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user