12
12
import java .util .List ;
13
13
import java .util .Map ;
14
14
15
- import org .hpccsystems .ws .client .gen .ecldirect .v1_0 .ArrayOfEspException ;
16
- import org .hpccsystems .ws .client .gen .ecldirect .v1_0 .EspException ;
17
- import org .hpccsystems .ws .client .gen .filespray .v1_13 .DropZone ;
18
- import org .hpccsystems .ws .client .gen .filespray .v1_13 .PhysicalFileStruct ;
19
- import org .hpccsystems .ws .client .HPCCECLDirectClient ;
20
15
import org .hpccsystems .ws .client .HPCCFileSprayClient ;
21
16
import org .hpccsystems .ws .client .HPCCWsClient ;
22
17
import org .hpccsystems .ws .client .HPCCWsFileIOClient ;
23
- import org .hpccsystems .ws .client .platform .WorkunitInfo ;
18
+ import org .hpccsystems .ws .client .HPCCWsWorkUnitsClient ;
19
+ import org .hpccsystems .ws .client .gen .axis2 .filespray .latest .DropZone ;
20
+ import org .hpccsystems .ws .client .gen .axis2 .wsworkunits .latest .*;
21
+ import java .lang .String ;
24
22
import org .hpccsystems .ws .client .utils .DataSingletonCollection ;
25
23
import org .hpccsystems .ws .client .utils .Connection ;
26
24
import org .hpccsystems .ws .client .utils .Utils ;
25
+ import org .hpccsystems .ws .client .wrappers .gen .filespray .DropZoneWrapper ;
26
+ import org .hpccsystems .ws .client .wrappers .gen .filespray .PhysicalFileStructWrapper ;
27
+ import org .hpccsystems .ws .client .wrappers .wsworkunits .WorkunitWrapper ;
27
28
import org .apache .jena .riot .*;
28
29
import org .apache .jena .graph .Node ;
29
30
import org .apache .jena .ttl .turtle .parser .ParseException ;
@@ -440,31 +441,21 @@ public String getRDFStats()
440
441
441
442
try
442
443
{
443
- if (eclstatsfile != null )
444
+ if (eclstatsfile != null )
444
445
{
445
446
eclstats = new String (Files .readAllBytes (Paths .get (eclstatsfile )), Charset .defaultCharset ());
446
447
} else
447
448
{
448
449
eclstats = STATSECL ;
449
450
}
450
451
451
- HPCCECLDirectClient declient = getEclDirectClient ();
452
- WorkunitInfo wu = new WorkunitInfo ();
452
+ HPCCWsWorkUnitsClient wuClient = getWsWorkunitsClient ();
453
+ WorkunitWrapper wu = new WorkunitWrapper ();
453
454
wu .setECL (eclstats + "\n output(RdfTypeStats('~" + targetHPCCFilePath + "'));" );
454
455
wu .setCluster (targetECLCluster );
455
- wu .setResultLimit (HPCCECLDirectClient .noresultlimit );
456
456
wu .setMaxMonitorMillis (eclmaxwaitMS );
457
457
458
- eclreturn = declient .submitECLandGetResults (wu );
459
- }
460
- catch (ArrayOfEspException e )
461
- {
462
- Utils .println (System .out , "Error while submiting ecl: " , false , verbosemode );
463
- EspException [] espExceptions = e .getException ();
464
- for (EspException espException : espExceptions )
465
- {
466
- Utils .println (System .out , espException .getMessage (), false , verbosemode );
467
- }
458
+ eclreturn = wuClient .createAndRunWUFromECLAndGetResults (wu );
468
459
}
469
460
catch (IOException e )
470
461
{
@@ -775,20 +766,21 @@ private boolean setDropZoneInfo() throws Exception
775
766
776
767
try
777
768
{
778
- DropZone [] dropZones = fsclient .fetchLocalDropZones ();
769
+ List < DropZoneWrapper > dropZones = fsclient .fetchLocalDropZones ();
779
770
780
- if (dropZones .length > 0 )
771
+ if (dropZones .size () > 0 )
781
772
{
782
- targetDropzoneNetAddress = dropZones [0 ].getNetAddress ();
783
- targetHPCCDropzonePath = dropZones [0 ].getPath ();
773
+ DropZoneWrapper thisDZ = dropZones .get (0 );
774
+ targetDropzoneNetAddress = thisDZ .getNetAddress ();
775
+ targetHPCCDropzonePath = thisDZ .getPath ();
784
776
Utils .println (System .out , "Found dropzone net address: " + targetDropzoneNetAddress , false , verbosemode );
785
777
Utils .println (System .out , "Found dropzone path: " + targetHPCCDropzonePath , false , verbosemode );
786
778
787
779
try
788
780
{
789
- PhysicalFileStruct [] files = fsclient .listFiles (targetDropzoneNetAddress , targetHPCCDropzonePath , null );
781
+ List < PhysicalFileStructWrapper > files = fsclient .listFiles (targetDropzoneNetAddress , targetHPCCDropzonePath , null );
790
782
Utils .println (System .out , "Existing Dropzone files:" , true , verbosemode );
791
- for (PhysicalFileStruct file : files )
783
+ for (PhysicalFileStructWrapper file : files )
792
784
{
793
785
Utils .println (System .out , "\t " + file .getName () +"-" + file .getFilesize (), true , verbosemode );
794
786
}
@@ -800,14 +792,6 @@ private boolean setDropZoneInfo() throws Exception
800
792
success = true ;
801
793
}
802
794
}
803
- catch (org .hpccsystems .ws .client .gen .filespray .v1_06 .ArrayOfEspException e1 )
804
- {
805
- Utils .println (System .out , "ERROR: Attempting to fetch HPCC dropzone Info:" , false , verbosemode );
806
- for (org .hpccsystems .ws .client .gen .filespray .v1_06 .EspException exception : e1 .getException ())
807
- {
808
- Utils .println (System .out , "\t " +exception .getMessage (), false , verbosemode );
809
- }
810
- }
811
795
catch (RemoteException e1 )
812
796
{
813
797
Utils .println (System .out , "ERROR:\t Attempting to fetch HPCC dropzone Info:" , false , verbosemode );
0 commit comments