@@ -107,19 +107,19 @@ public static Properties stringToProperties(String str) throws IOException{
107107 return properties ;
108108 }
109109
110- public static URL getRemoteJarFilePath (String pluginType , String tableType , String remoteSqlRootDir ) throws Exception {
110+ public static URL getRemoteJarFilePath (String pluginType , String tableType , String remoteSqlRootDir , String localSqlPluginPath ) throws Exception {
111111 String dirName = pluginType + tableType .toLowerCase ();
112112 String prefix = String .format ("%s-%s" , pluginType , tableType .toLowerCase ());
113- String jarPath = remoteSqlRootDir + SP + dirName ;
114- String jarName = getCoreJarFileName (jarPath , prefix , false );
113+ String jarPath = localSqlPluginPath + SP + dirName ;
114+ String jarName = getCoreJarFileName (jarPath , prefix );
115115 return new URL ("file:" + remoteSqlRootDir + SP + dirName + SP + jarName );
116116 }
117117
118- public static URL getRemoteSideJarFilePath (String pluginType , String sideOperator , String tableType , String remoteSqlRootDir ) throws Exception {
118+ public static URL getRemoteSideJarFilePath (String pluginType , String sideOperator , String tableType , String remoteSqlRootDir , String localSqlPluginPath ) throws Exception {
119119 String dirName = pluginType + sideOperator + tableType .toLowerCase ();
120120 String prefix = String .format ("%s-%s-%s" , pluginType , sideOperator , tableType .toLowerCase ());
121- String jarPath = remoteSqlRootDir + SP + dirName ;
122- String jarName = getCoreJarFileName (jarPath , prefix , false );
121+ String jarPath = localSqlPluginPath + SP + dirName ;
122+ String jarName = getCoreJarFileName (jarPath , prefix );
123123 return new URL ("file:" + remoteSqlRootDir + SP + dirName + SP + jarName );
124124 }
125125
@@ -144,11 +144,7 @@ public static void addPluginJar(String pluginDir, DtClassLoader classLoader) thr
144144 }
145145 }
146146
147- public static String getCoreJarFileName (String path , String prefix , boolean existCheck ) throws Exception {
148- if (!existCheck ) {
149- return prefix .toLowerCase () + ".jar" ;
150- }
151-
147+ public static String getCoreJarFileName (String path , String prefix ) throws Exception {
152148 String coreJarFileName = null ;
153149 File pluginDir = new File (path );
154150 if (pluginDir .exists () && pluginDir .isDirectory ()){
0 commit comments