Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-9.4.x'
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Dec 7, 2023
2 parents b65a7f6 + 99fad9f commit 4e284c5
Show file tree
Hide file tree
Showing 27 changed files with 224 additions and 267 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/javadocTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: Build with Maven
run: mvn -B -Dmaven.test.skip=True clean install javadoc:javadoc
run: mvn -B clean install javadoc:javadoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
import org.hpccsystems.dfs.client.HPCCRecord;
import org.hpccsystems.dfs.client.HPCCRecordBuilder;
import org.hpccsystems.dfs.client.HpccRemoteFileReader;
import org.hpccsystems.ws.client.BaseRemoteTest;
import org.hpccsystems.dfs.client.DataPartition;

import org.hpccsystems.commons.ecl.FieldDef;
import org.hpccsystems.commons.errors.HpccFileException;
import org.hpccsystems.ws.client.platform.test.BaseRemoteTest;

import org.json.JSONObject;
import org.json.JSONArray;

Expand Down Expand Up @@ -86,7 +85,7 @@ public void readBenchmarks() throws Exception
{
System.out.println("Starting Raw Read Tests");
System.out.println("-------------------------------------------------------------");

MetricSumTransformer sumTransformer = new MetricSumTransformer();
MetricAverageTransformer aggregateTransformer = new MetricAverageTransformer();
ArrayList<BenchmarkResult> rawReadTests = new ArrayList<BenchmarkResult>();
Expand Down Expand Up @@ -128,7 +127,7 @@ public void readBenchmarks() throws Exception
}
avgdMetrics = aggregateTransformer.transform(avgdMetrics);
result.addMetrics(avgdMetrics);

// Calculate and add bandwidth
IMetric readTimeMetric = result.getMetric(READ_TIME_METRIC);
double avgReadTime = readTimeMetric.getValue() * Units.calculateScaleConversion(readTimeMetric.getUnits().scale,Units.Scale.UNIT);
Expand Down Expand Up @@ -174,7 +173,7 @@ public void readBenchmarks() throws Exception

metrics = sumTransformer.transform(metrics);
metrics.add(new SimpleMetric((double)readTimeNS, READ_TIME_METRIC, new Units(Units.Type.SECONDS, Units.Scale.NANO)));

avgdMetrics.addAll(metrics);
}
catch(Exception e)
Expand Down Expand Up @@ -203,7 +202,7 @@ public void readBenchmarks() throws Exception

// Output plugin results
JSONArray testGroups = new JSONArray();

JSONObject rawReadGroup = new JSONObject();
rawReadGroup.put("name","Raw Read Tests");

Expand All @@ -230,7 +229,7 @@ public void readBenchmarks() throws Exception

JSONObject output = new JSONObject();
output.put("groups",testGroups);

String outputPath = "results.json";
FileWriter fileWriter = new FileWriter(outputPath);
fileWriter.write(output.toString());
Expand Down Expand Up @@ -302,7 +301,7 @@ public void readRawFileData(HPCCFile file, List<IMetric> metrics) throws Excepti
{
bytesToRead = buffer.length;
}
inputStream.read(buffer,0,bytesToRead);
inputStream.read(buffer,0,bytesToRead);

try
{
Expand All @@ -322,7 +321,7 @@ public void readRawFileData(HPCCFile file, List<IMetric> metrics) throws Excepti
hasMoreData = nextByte >= 0;
}
}

metrics.addAll(inputStream.getMetrics());
inputStream.close();
}
Expand Down Expand Up @@ -434,7 +433,7 @@ public int readFileInParallel(HPCCFile file, int numThreads) throws Exception
Integer filePartRecordCount = 0;
FieldDef recordDefinition = originalRD;
public void run()
{
{
HpccRemoteFileReader<HPCCRecord> fileReader = null;
try
{
Expand All @@ -459,14 +458,14 @@ public void run()
{
Assert.fail("Received null record during read");
}

filePartRecordCount++;
}

recordCounts[filePartIndex] = filePartRecordCount;
try
{
fileReader.close();
fileReader.close();
}
catch (Exception e){}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.hpccsystems.commons.ecl.FileFilter;
import org.hpccsystems.commons.errors.HpccFileException;
import org.hpccsystems.dfs.cluster.RemapInfo;
import org.hpccsystems.ws.client.platform.test.BaseRemoteTest;
import org.hpccsystems.ws.client.BaseRemoteTest;
import org.hpccsystems.ws.client.utils.Connection;
import org.junit.AfterClass;
import org.junit.Assert;
Expand Down
Loading

0 comments on commit 4e284c5

Please sign in to comment.