Repository: asterixdb Updated Branches: refs/heads/master d718dc4a7 -> 38553c04d
Random cleanup Change-Id: I44e64473f22d8587d6f98e8177287493e0216ecd Reviewed-on: https://asterix-gerrit.ics.uci.edu/1478 Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> BAD: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: abdullah alamoudi <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/38553c04 Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/38553c04 Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/38553c04 Branch: refs/heads/master Commit: 38553c04d56c78578d9f614a35d6912876d32cfc Parents: d718dc4 Author: Till Westmann <[email protected]> Authored: Wed Feb 1 18:14:19 2017 -0800 Committer: Till Westmann <[email protected]> Committed: Fri Feb 3 08:23:19 2017 -0800 ---------------------------------------------------------------------- .../asterix/runtime/evaluators/functions/AndDescriptor.java | 7 ++----- .../org/apache/hyracks/api/util/ExecutionTimeProfiler.java | 7 +------ .../hyracks/api/util/OperatorExecutionTimeProfiler.java | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/38553c04/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AndDescriptor.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AndDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AndDescriptor.java index b029b68..9fd5dc4 100644 --- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AndDescriptor.java +++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AndDescriptor.java @@ -87,7 +87,6 @@ public class AndDescriptor extends AbstractScalarFunctionDynamicDescriptor { public void evaluate(IFrameTupleReference tuple, IPointable result) throws HyracksDataException { resultStorage.reset(); int n = args.length; - boolean res = true; boolean metNull = false; boolean metMissing = false; for (int i = 0; i < n; i++) { @@ -112,13 +111,12 @@ public class AndDescriptor extends AbstractScalarFunctionDynamicDescriptor { ATypeTag.SERIALIZED_BOOLEAN_TYPE_TAG); } boolean argResult = ABooleanSerializerDeserializer.getBoolean(bytes, offset + 1); - if (argResult == false) { + if (! argResult) { // anything AND FALSE = FALSE booleanSerde.serialize(ABoolean.FALSE, out); result.set(resultStorage); return; } - res &= argResult; } if (metMissing) { // MISSING AND NULL = MISSING @@ -128,8 +126,7 @@ public class AndDescriptor extends AbstractScalarFunctionDynamicDescriptor { // NULL AND TRUE = NULL nullSerde.serialize(ANull.NULL, out); } else { - ABoolean aResult = res ? ABoolean.TRUE : ABoolean.FALSE; - booleanSerde.serialize(aResult, out); + booleanSerde.serialize(ABoolean.TRUE, out); } result.set(resultStorage); } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/38553c04/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/ExecutionTimeProfiler.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/ExecutionTimeProfiler.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/ExecutionTimeProfiler.java index 7673f2c..66f7f10 100644 --- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/ExecutionTimeProfiler.java +++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/ExecutionTimeProfiler.java @@ -27,29 +27,24 @@ import java.util.Map; public class ExecutionTimeProfiler { public static final boolean PROFILE_MODE = false; - public static final String INIT = "init"; private FileOutputStream fos; private String filePath; private StringBuilder sb; - private int printInterval; - private int addCount; private Object lock1 = new Object(); // [Key: Job, Value: [Key: Operator, Value: Duration of each operators]] private HashMap<String, LinkedHashMap<String, String>> spentTimePerJobMap; - public ExecutionTimeProfiler(String filePath, int printInterval) { + public ExecutionTimeProfiler(String filePath) { this.filePath = new String(filePath); this.sb = new StringBuilder(); - this.printInterval = printInterval; this.spentTimePerJobMap = new HashMap<String, LinkedHashMap<String, String>>(); } public void begin() { try { fos = ExperimentProfilerUtils.openOutputFile(filePath); - addCount = 0; } catch (IOException e) { e.printStackTrace(); throw new IllegalStateException(e); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/38553c04/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/OperatorExecutionTimeProfiler.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/OperatorExecutionTimeProfiler.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/OperatorExecutionTimeProfiler.java index b5d632b..55c7915 100644 --- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/OperatorExecutionTimeProfiler.java +++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/OperatorExecutionTimeProfiler.java @@ -31,7 +31,7 @@ public class OperatorExecutionTimeProfiler { //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss-SSS"); try { executionTimeProfiler = new ExecutionTimeProfiler(profileHomeDir + "executionTime-" - + Inet4Address.getLocalHost().getHostAddress() + ".txt", 1); + + Inet4Address.getLocalHost().getHostAddress() + ".txt"); } catch (UnknownHostException e) { e.printStackTrace(); }
