()
| 315 | } |
| 316 | |
| 317 | private void addJarsFromProperties() throws ExecException { |
| 318 | //add jars from properties to extraJars |
| 319 | String jar_str = pigContext.getProperties().getProperty("pig.additional.jars"); |
| 320 | if (jar_str==null) { |
| 321 | jar_str = ""; |
| 322 | } |
| 323 | jar_str = jar_str.replaceAll(File.pathSeparator, ","); |
| 324 | if (!jar_str.isEmpty()) { |
| 325 | jar_str += ","; |
| 326 | } |
| 327 | |
| 328 | String jar_str_comma = pigContext.getProperties().getProperty("pig.additional.jars.uris"); |
| 329 | if (jar_str_comma!=null && !jar_str_comma.isEmpty()) { |
| 330 | jar_str = jar_str + jar_str_comma; |
| 331 | } |
| 332 | |
| 333 | if(jar_str != null && !jar_str.isEmpty()){ |
| 334 | // Use File.pathSeparator (":" on Linux, ";" on Windows) |
| 335 | // to correctly handle path aggregates as they are represented |
| 336 | // on the Operating System. |
| 337 | for(String jar : jar_str.split(",")){ |
| 338 | try { |
| 339 | registerJar(jar); |
| 340 | } catch (IOException e) { |
| 341 | int errCode = 4010; |
| 342 | String msg = |
| 343 | "Failed to register jar :" + jar + ". Caught exception."; |
| 344 | throw new ExecException( |
| 345 | msg, |
| 346 | errCode, |
| 347 | PigException.USER_ENVIRONMENT, |
| 348 | e |
| 349 | ); |
| 350 | } |
| 351 | } |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | private void markPredeployedJarsFromProperties() throws ExecException { |
| 356 | // mark jars as predeployed from properties |
no test coverage detected