Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmcmu committed Dec 16, 2024
1 parent 70fba9c commit 5b161f7
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,7 @@ private static void performReadTest(String[] args, TaskContext context)

private static void performCopy(String[] args, TaskContext context)
{
System.out.println("Parsing copy options");
Options options = getCopyOptions();
CommandLineParser parser = new DefaultParser();

Expand All @@ -1805,10 +1806,12 @@ private static void performCopy(String[] args, TaskContext context)
+ numThreadsStr + ", must be an integer. Defaulting to: " + NUM_DEFAULT_THREADS + " threads.");
}

System.out.println("Getting credentials");
String[] creds = getCredentials(cmd);
String user = creds[0];
String pass = creds[1];

System.out.println("Applying global config");
applyGlobalConfig(cmd);

String destClusterName = cmd.getOptionValue("dest_cluster");
Expand All @@ -1831,6 +1834,7 @@ private static void performCopy(String[] args, TaskContext context)
return;
}

System.out.println("Setting credentials and connecting");
destConn.setCredentials(user, pass);
Platform platform = Platform.get(destConn);
HPCCWsClient wsclient = null;
Expand Down Expand Up @@ -1861,6 +1865,7 @@ private static void performCopy(String[] args, TaskContext context)
context.socketOpTimeoutMS = getSocketOpTimeoutMS(cmd);
context.initialReadSizeKB = getInitialReadSizeKB(cmd);

System.out.println("Starting copy operations");
for (int i = 0; i < copyPairs.length; i+=2)
{
String srcFile = copyPairs[i];
Expand Down Expand Up @@ -1968,14 +1973,14 @@ private static void performCopy(String[] args, TaskContext context)
{
String readArgs[] = {"-read", srcFile, "-url", srcURL,
"-format", "thor", "-user", user, "-pass", pass,
"-out", "tmp-read"};
"-out", "tmp-read", "-non_interactive"};

performRead(readArgs, context);

String writeArgs[] = {"-write", "tmp-read" + File.separator + srcFile.replace(':', '_') + "*" + " " + destFile,
"-url", srcURL, "-dest_url", destURL,
"-dest_cluster", destClusterName,
"-user", user, "-pass", pass };
"-user", user, "-pass", pass, "-non_interactive"};

performWrite(writeArgs, context);
}
Expand Down

0 comments on commit 5b161f7

Please sign in to comment.