1
0

[HUDI-143] Excluding javax.* from utilities and spark bundles

- Plus minor code review comments
This commit is contained in:
Vinoth Chandar
2019-09-02 19:46:10 -07:00
committed by Balaji Varadarajan
parent 7a973a6944
commit d0b9b56b7d
7 changed files with 7 additions and 9 deletions

View File

@@ -38,11 +38,8 @@ public class HiveUtil {
}
}
private static Connection connection;
private static Connection getConnection(String jdbcUrl, String user, String pass) throws SQLException {
connection = DriverManager.getConnection(jdbcUrl, user, pass);
return connection;
return DriverManager.getConnection(jdbcUrl, user, pass);
}
public static long countRecords(String jdbcUrl, HoodieTableMetaClient source, String dbName, String user, String pass)

View File

@@ -43,7 +43,7 @@ public class SparkUtil {
SparkLauncher sparkLauncher = new SparkLauncher().setAppResource(currentJar)
.setMainClass(SparkMain.class.getName());
if (!StringUtils.isEmpty(propertiesFile)) {
if (!StringUtils.isNullOrEmpty(propertiesFile)) {
sparkLauncher.setPropertiesFile(propertiesFile);
}

View File

@@ -62,7 +62,7 @@ public class StringUtils {
return sb.toString();
}
public static boolean isEmpty(String str) {
public static boolean isNullOrEmpty(String str) {
return str == null || str.length() == 0;
}
}

View File

@@ -49,7 +49,7 @@ if [ -z "${HIVE_JDBC}" ]; then
HIVE_JDBC=`ls ${HIVE_HOME}/lib/hive-jdbc-*.jar | grep -v handler | tr '\n' ':'`
fi
HIVE_JACKSON=`ls ${HIVE_HOME}/lib/jackson-*.jar | tr '\n' ':'`
HIVE_JARS=$HIVE_METASTORE:$HIVE_SERVICE:$HIVE_EXEC:$HIVE_SERVICE:$HIVE_JDBC:$HIVE_JACKSON
HIVE_JARS=$HIVE_METASTORE:$HIVE_SERVICE:$HIVE_EXEC:$HIVE_JDBC:$HIVE_JACKSON
HADOOP_HIVE_JARS=${HIVE_JARS}:${HADOOP_HOME}/share/hadoop/common/*:${HADOOP_HOME}/share/hadoop/mapreduce/*:${HADOOP_HOME}/share/hadoop/hdfs/*:${HADOOP_HOME}/share/hadoop/common/lib/*:${HADOOP_HOME}/share/hadoop/hdfs/lib/*

View File

@@ -33,7 +33,6 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import jline.internal.Log;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.conf.HiveConf;
@@ -474,7 +473,7 @@ public class HoodieHiveClient {
try {
Class.forName(HiveDriver.class.getCanonicalName());
} catch (ClassNotFoundException e) {
Log.error("Unable to load Hive driver class", e);
LOG.error("Unable to load Hive driver class", e);
return;
}

View File

@@ -173,6 +173,7 @@
<!-- Use this jar's NOTICE and license file -->
<exclude>META-INF/NOTICE*</exclude>
<exclude>META-INF/LICENSE*</exclude>
<exclude>META-INF/services/javax.*</exclude>
</excludes>
</filter>
</filters>

View File

@@ -148,6 +148,7 @@
<!-- Use this jar's NOTICE and license file -->
<exclude>META-INF/NOTICE*</exclude>
<exclude>META-INF/LICENSE*</exclude>
<exclude>META-INF/services/javax.*</exclude>
</excludes>
</filter>
</filters>