@@ -63,6 +63,17 @@ public static String getJarFileDirPath(String type, String sqlRootDir){
6363 return jarPath ;
6464 }
6565
66+ public static String getSideJarFileDirPath (String pluginType , String sideOperator , String tableType , String sqlRootDir ) throws MalformedURLException {
67+ String dirName = sqlRootDir + SP + pluginType + sideOperator + tableType .toLowerCase ();
68+ File jarFile = new File (dirName );
69+
70+ if (!jarFile .exists ()){
71+ throw new RuntimeException (String .format ("path %s not exists!!!" , dirName ));
72+ }
73+
74+ return dirName ;
75+ }
76+
6677 public static String getGenerClassName (String pluginTypeName , String type ) throws IOException {
6778 String pluginClassName = upperCaseFirstChar (pluginTypeName ) + upperCaseFirstChar (type );
6879 return CLASS_PRE_STR + "." + type .toLowerCase () + "." + pluginTypeName + "." + pluginClassName ;
@@ -94,12 +105,18 @@ public static Properties stringToProperties(String str) throws IOException{
94105 return properties ;
95106 }
96107
97- public static URL getRemoteJarFilePath (String pluginType , String tableType ,String remoteSqlRootDir ) throws MalformedURLException {
108+ public static URL getRemoteJarFilePath (String pluginType , String tableType , String remoteSqlRootDir ) throws MalformedURLException {
98109 String dirName = pluginType + tableType .toLowerCase ();
99110 String jarName = String .format ("%s-%s.jar" , pluginType , tableType .toLowerCase ());
100111 return new URL ("file:" + remoteSqlRootDir + SP + dirName + SP + jarName );
101112 }
102113
114+ public static URL getRemoteSideJarFilePath (String pluginType , String sideOperator , String tableType , String remoteSqlRootDir ) throws MalformedURLException {
115+ String dirName = pluginType + sideOperator + tableType .toLowerCase ();
116+ String jarName = String .format ("%s-%s-%s.jar" , pluginType , sideOperator , tableType .toLowerCase ());
117+ return new URL ("file:" + remoteSqlRootDir + SP + dirName + SP + jarName );
118+ }
119+
103120 public static String upperCaseFirstChar (String str ){
104121 return str .substring (0 , 1 ).toUpperCase () + str .substring (1 );
105122 }
0 commit comments