Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC4J-502 Update RDF2HPCC deps #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions rdf2hpcc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>org.hpccsystems</groupId>
<artifactId>rdf2hpcc</artifactId>
<packaging>jar</packaging>
<version>1.0.2-SNAPSHOT</version>
<version>1.0.4-SNAPSHOT</version>
<name>RDF Data Ingestion into HPCC</name>
<description>This project allows a user to import RDF data into an easily ingestible format for HPCC</description>
<url>https://hpccsystems.com</url>
Expand All @@ -16,6 +16,8 @@
</licenses>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<scm>
<connection>scm:git:https://github.com/hpcc-systems/hpcc4j.git</connection>
Expand Down Expand Up @@ -72,7 +74,7 @@
<dependency>
<groupId>org.hpccsystems</groupId>
<artifactId>wsclient</artifactId>
<version>1.0.0</version>
<version>8.12.0-1</version>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
import java.util.List;
import java.util.Map;

import org.hpccsystems.ws.client.gen.ecldirect.v1_0.ArrayOfEspException;
import org.hpccsystems.ws.client.gen.ecldirect.v1_0.EspException;
import org.hpccsystems.ws.client.gen.filespray.v1_13.DropZone;
import org.hpccsystems.ws.client.gen.filespray.v1_13.PhysicalFileStruct;
import org.hpccsystems.ws.client.HPCCECLDirectClient;
import org.hpccsystems.ws.client.HPCCFileSprayClient;
import org.hpccsystems.ws.client.HPCCWsClient;
import org.hpccsystems.ws.client.HPCCWsFileIOClient;
import org.hpccsystems.ws.client.platform.WorkunitInfo;
import org.hpccsystems.ws.client.HPCCWsWorkUnitsClient;
import org.hpccsystems.ws.client.gen.axis2.filespray.latest.DropZone;
import org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.*;
import java.lang.String;
import org.hpccsystems.ws.client.utils.DataSingletonCollection;
import org.hpccsystems.ws.client.utils.Connection;
import org.hpccsystems.ws.client.utils.Utils;
import org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper;
import org.hpccsystems.ws.client.wrappers.gen.filespray.PhysicalFileStructWrapper;
import org.hpccsystems.ws.client.wrappers.wsworkunits.WorkunitWrapper;
import org.apache.jena.riot.*;
import org.apache.jena.graph.Node;
import org.apache.jena.ttl.turtle.parser.ParseException;
Expand Down Expand Up @@ -440,31 +441,21 @@ public String getRDFStats()

try
{
if(eclstatsfile != null)
if(eclstatsfile != null)
{
eclstats = new String(Files.readAllBytes(Paths.get(eclstatsfile)), Charset.defaultCharset());
} else
{
eclstats = STATSECL;
}

HPCCECLDirectClient declient = getEclDirectClient();
WorkunitInfo wu = new WorkunitInfo();
HPCCWsWorkUnitsClient wuClient = getWsWorkunitsClient();
WorkunitWrapper wu = new WorkunitWrapper();
wu.setECL(eclstats + "\n output(RdfTypeStats('~" + targetHPCCFilePath + "'));");
wu.setCluster(targetECLCluster);
wu.setResultLimit(HPCCECLDirectClient.noresultlimit);
wu.setMaxMonitorMillis(eclmaxwaitMS);

eclreturn = declient.submitECLandGetResults(wu );
}
catch (ArrayOfEspException e)
{
Utils.println(System.out, "Error while submiting ecl: ", false, verbosemode);
EspException[] espExceptions = e.getException();
for (EspException espException : espExceptions)
{
Utils.println(System.out, espException.getMessage(), false, verbosemode);
}
eclreturn = wuClient.createAndRunWUFromECLAndGetResults(wu);
}
catch (IOException e)
{
Expand Down Expand Up @@ -775,20 +766,21 @@ private boolean setDropZoneInfo() throws Exception

try
{
DropZone[] dropZones = fsclient.fetchLocalDropZones();
List<DropZoneWrapper> dropZones = fsclient.fetchLocalDropZones();

if (dropZones.length > 0)
if (dropZones.size() > 0)
{
targetDropzoneNetAddress = dropZones[0].getNetAddress();
targetHPCCDropzonePath = dropZones[0].getPath();
DropZoneWrapper thisDZ = dropZones.get(0);
targetDropzoneNetAddress = thisDZ.getNetAddress();
targetHPCCDropzonePath = thisDZ.getPath();
Utils.println(System.out, "Found dropzone net address: " + targetDropzoneNetAddress, false, verbosemode);
Utils.println(System.out, "Found dropzone path: " + targetHPCCDropzonePath, false, verbosemode);

try
{
PhysicalFileStruct[] files = fsclient.listFiles(targetDropzoneNetAddress, targetHPCCDropzonePath, null);
List<PhysicalFileStructWrapper> files = fsclient.listFiles(targetDropzoneNetAddress, targetHPCCDropzonePath, null);
Utils.println(System.out, "Existing Dropzone files:", true, verbosemode);
for (PhysicalFileStruct file : files)
for (PhysicalFileStructWrapper file : files)
{
Utils.println(System.out, "\t" + file.getName() +"-"+ file.getFilesize(), true, verbosemode);
}
Expand All @@ -800,14 +792,6 @@ private boolean setDropZoneInfo() throws Exception
success = true;
}
}
catch (org.hpccsystems.ws.client.gen.filespray.v1_06.ArrayOfEspException e1)
{
Utils.println(System.out, "ERROR: Attempting to fetch HPCC dropzone Info:", false, verbosemode);
for (org.hpccsystems.ws.client.gen.filespray.v1_06.EspException exception : e1.getException())
{
Utils.println(System.out, "\t"+exception.getMessage(), false, verbosemode);
}
}
catch (RemoteException e1)
{
Utils.println(System.out, "ERROR:\tAttempting to fetch HPCC dropzone Info:", false, verbosemode);
Expand Down