Change in asterixdb[master]: [NO ISSUE][FUN] Add more data types for external library

2018-09-14 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][FUN] Add more data types for external library
..


Patch Set 7:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/2871/7/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/TypeValidationFunction.java
File 
asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/TypeValidationFunction.java:

PS7, Line 46: System.out.println("De-Initialized");
Can you please remove this? or at least use a logger?


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2871
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6ce73e791533b0617074536e0d841242d9e0ee31
Gerrit-PatchSet: 7
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Xikui Wang 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: Yes


Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

2018-09-11 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2960

to look at the new patch set (#4).

Change subject: WIP: Start and End of Expressions
..

WIP: Start and End of Expressions

Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/PlanTranslationUtil.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestDataset.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/metadata/MetadataTxnTest.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/IndexDropOperatorNodePushableTest.java
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/user-defined-functions/single-line-definition/single-line-definition.1.adm
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf28/udf28.1.adm
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
M 
asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/parser/FunctionParser.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/AbstractLangExpression.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Expression.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/ILangExpression.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/LiteralExpr.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/parser/ScopeChecker.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/AbstractInlineUdfsVisitor.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/CloneAndSubstituteVariablesVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/FunctionParser.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineColumnAliasVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SetOperationVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppBuiltinFunctionRewriteVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppDistinctAggregationSugarVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByAggregationSugarVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/ExpressionToVariableUtil.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppRewriteUtil.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/DeepCopyVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppCloneAndSubstituteVariablesVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppDeleteRewriteVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
M 

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

2018-09-11 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2960

to look at the new patch set (#3).

Change subject: WIP: Start and End of Expressions
..

WIP: Start and End of Expressions

Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/PlanTranslationUtil.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestDataset.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/metadata/MetadataTxnTest.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/IndexDropOperatorNodePushableTest.java
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/user-defined-functions/single-line-definition/single-line-definition.1.adm
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf28/udf28.1.adm
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
M 
asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/parser/FunctionParser.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/AbstractLangExpression.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Expression.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/ILangExpression.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/LiteralExpr.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/parser/ScopeChecker.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/AbstractInlineUdfsVisitor.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/CloneAndSubstituteVariablesVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/FunctionParser.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineColumnAliasVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SetOperationVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppBuiltinFunctionRewriteVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppDistinctAggregationSugarVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByAggregationSugarVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/ExpressionToVariableUtil.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppRewriteUtil.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/DeepCopyVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppCloneAndSubstituteVariablesVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppDeleteRewriteVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
M 

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

2018-09-10 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2960

to look at the new patch set (#2).

Change subject: WIP: Start and End of Expressions
..

WIP: Start and End of Expressions

Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/PlanTranslationUtil.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestDataset.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/metadata/MetadataTxnTest.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/IndexDropOperatorNodePushableTest.java
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/AbstractLangExpression.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Expression.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/ILangExpression.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/LiteralExpr.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/parser/ScopeChecker.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/AbstractInlineUdfsVisitor.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/CloneAndSubstituteVariablesVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/FunctionParser.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineColumnAliasVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SetOperationVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppBuiltinFunctionRewriteVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppDistinctAggregationSugarVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByAggregationSugarVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/ExpressionToVariableUtil.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppRewriteUtil.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/DeepCopyVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppCloneAndSubstituteVariablesVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppDeleteRewriteVisitor.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
M 
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
M 
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
M 
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Dataset.java
M 
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/ExternalIndexingOperations.java
M 

Change in asterixdb[stabilization-f69489]: [NO ISSUE][STO] Report batch operation failure before exiting

2018-09-06 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][STO] Report batch operation failure before exiting
..


[NO ISSUE][STO] Report batch operation failure before exiting

- user model changes: no
- storage format changes: no
- interface changes: yes

Details:
- In certain cases, caller of a batch operation call are
  interested in failure events.
- In those cases, we used to report failure after exiting
  the components but with this change, failure reporting
  happens before the exit.

Change-Id: I0c22b6bddfe8f12ef8e3c59dae0b0c585137a126
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2956
Tested-by: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Murtadha Hubail 
---
M 
asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveSourceOperatorNodePushable.java
M 
asterixdb/asterix-active/src/main/java/org/apache/asterix/active/IActiveRuntime.java
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java
M 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/IFrameTupleProcessor.java
M 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
5 files changed, 17 insertions(+), 18 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; Verified
  Murtadha Hubail: Looks good to me, approved

Objections:
  Jenkins: Violations found



diff --git 
a/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveSourceOperatorNodePushable.java
 
b/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveSourceOperatorNodePushable.java
index b1a1fcc..453ffa0 100644
--- 
a/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveSourceOperatorNodePushable.java
+++ 
b/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveSourceOperatorNodePushable.java
@@ -26,7 +26,6 @@
 import org.apache.hyracks.api.comm.IFrameWriter;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.job.JobId;
 import 
org.apache.hyracks.dataflow.std.base.AbstractUnaryOutputSourceOperatorNodePushable;
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
@@ -134,10 +133,5 @@
 @Override
 public final IFrameWriter getInputFrameWriter(int index) {
 return null;
-}
-
-@Override
-public JobId getJobId() {
-return ctx.getJobletContext().getJobId();
 }
 }
diff --git 
a/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/IActiveRuntime.java
 
b/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/IActiveRuntime.java
index 2da7193..a52f01e 100644
--- 
a/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/IActiveRuntime.java
+++ 
b/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/IActiveRuntime.java
@@ -21,7 +21,6 @@
 import java.util.concurrent.TimeUnit;
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.job.JobId;
 
 public interface IActiveRuntime {
 
@@ -42,11 +41,6 @@
  * @throws InterruptedException
  */
 void stop(long timeout, TimeUnit unit) throws HyracksDataException, 
InterruptedException;
-
-/**
- * @return the job id associated with this active runtime
- */
-JobId getJobId();
 
 /**
  * @return the runtime stats for monitoring purposes
diff --git 
a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java
 
b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java
index ba8074f..b855981 100644
--- 
a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java
+++ 
b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java
@@ -206,6 +206,12 @@
 public void finish() throws HyracksDataException {
 lsmAccessor.getCtx().setOperation(IndexOperation.UPSERT);
 }
+
+@Override
+public void fail(Throwable th) {
+// We must fail before we exit the components
+frameOpCallback.fail(th);
+}
 };
 tracer = ctx.getJobletContext().getServiceContext().getTracer();
 traceCategory = tracer.getRegistry().get(TraceUtils.LATENCY);
@@ -314,12 +320,7 @@
 public void nextFrame(ByteBuffer buffer) throws HyracksDataException {
 accessor.reset(buffer);
 int itemCount = accessor.getTupleCount();
-try {
-lsmAccessor.batchOperate(accessor, tuple, processor, 

Change in asterixdb[stabilization-f69489]: [NO ISSUE][STO] Report batch operation failure before exiting

2018-09-05 Thread abdullah alamoudi (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2956

to look at the new patch set (#2).

Change subject: [NO ISSUE][STO] Report batch operation failure before exiting
..

[NO ISSUE][STO] Report batch operation failure before exiting

- user model changes: no
- storage format changes: no
- interface changes: yes

Details:
- In certain cases, caller of a batch operation call are
  interested in failure events.
- In those cases, we used to report failure after exiting
  the components but with this change, failure reporting
  happens before the exit.

Change-Id: I0c22b6bddfe8f12ef8e3c59dae0b0c585137a126
---
M 
asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveSourceOperatorNodePushable.java
M 
asterixdb/asterix-active/src/main/java/org/apache/asterix/active/IActiveRuntime.java
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java
M 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/IFrameTupleProcessor.java
M 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
5 files changed, 17 insertions(+), 18 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/56/2956/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2956
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0c22b6bddfe8f12ef8e3c59dae0b0c585137a126
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[stabilization-f69489]: [NO ISSUE][STO] Report batch operation failure before exiting

2018-09-05 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2956

Change subject: [NO ISSUE][STO] Report batch operation failure before exiting
..

[NO ISSUE][STO] Report batch operation failure before exiting

- user model changes: no
- storage format changes: no
- interface changes: yes

Details:
- In certain cases, caller of a batch operation call are
  interested in failure events.
- In those cases, we used to report failure after exiting
  the components but with this change, failure reporting
  happens before the exit.

Change-Id: I0c22b6bddfe8f12ef8e3c59dae0b0c585137a126
---
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java
M 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/IFrameTupleProcessor.java
M 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
3 files changed, 17 insertions(+), 6 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/56/2956/1

diff --git 
a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java
 
b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java
index ba8074f..b855981 100644
--- 
a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java
+++ 
b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java
@@ -206,6 +206,12 @@
 public void finish() throws HyracksDataException {
 lsmAccessor.getCtx().setOperation(IndexOperation.UPSERT);
 }
+
+@Override
+public void fail(Throwable th) {
+// We must fail before we exit the components
+frameOpCallback.fail(th);
+}
 };
 tracer = ctx.getJobletContext().getServiceContext().getTracer();
 traceCategory = tracer.getRegistry().get(TraceUtils.LATENCY);
@@ -314,12 +320,7 @@
 public void nextFrame(ByteBuffer buffer) throws HyracksDataException {
 accessor.reset(buffer);
 int itemCount = accessor.getTupleCount();
-try {
-lsmAccessor.batchOperate(accessor, tuple, processor, 
frameOpCallback);
-} catch (Throwable th) {// NOSONAR: Must notify of all failures
-frameOpCallback.fail(th);
-throw th;
-}
+lsmAccessor.batchOperate(accessor, tuple, processor, frameOpCallback);
 if (itemCount > 0) {
 lastRecordInTimeStamp = System.currentTimeMillis();
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/IFrameTupleProcessor.java
 
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/IFrameTupleProcessor.java
index 3fbe6cd..b6192c1 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/IFrameTupleProcessor.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/IFrameTupleProcessor.java
@@ -43,4 +43,11 @@
  * Called once per batch before ending the batch process
  */
 void finish() throws HyracksDataException;
+
+/**
+ * Called when a failure is encountered processing a frame
+ *
+ * @param th
+ */
+void fail(Throwable th);
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
 
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
index aa7be86..e9f6f20 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
@@ -700,6 +700,9 @@
 try {
 processFrame(accessor, tuple, processor);
 frameOpCallback.frameCompleted();
+} catch (Throwable th) {
+processor.fail(th);
+throw th;
 } finally {
 processor.finish();
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2956
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c22b6bddfe8f12ef8e3c59dae0b0c585137a126
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb

Change in asterixdb[stabilization-f69489]: [NO ISSUE][ING] Fix race between active recovery and rebalance

2018-09-05 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][ING] Fix race between active recovery and rebalance
..


[NO ISSUE][ING] Fix race between active recovery and rebalance

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- In certain cases, a rebalance active suspend starts before
  recovery of an active job starts.
- When that happens, sometimes, the recovery task exists and
  the active job is not resumed after rebalance.

Change-Id: I66edb73950bb82baa1a1dfd892cb4b23bb7046be
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2950
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: abdullah alamoudi 
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
1 file changed, 36 insertions(+), 45 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  abdullah alamoudi: Looks good to me, approved
  Jenkins: Verified; No violations found; Verified



diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
index 5d722e7..0172b28 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
@@ -47,7 +47,6 @@
 private final IRetryPolicyFactory retryPolicyFactory;
 private final MetadataProvider metadataProvider;
 private final IClusterStateManager clusterStateManager;
-private Exception failure;
 
 public RecoveryTask(ICcApplicationContext appCtx, 
ActiveEntityEventsListener listener,
 IRetryPolicyFactory retryPolicyFactory) {
@@ -105,50 +104,46 @@
 }
 }
 
-protected Void doRecover(IRetryPolicy policy)
-throws AlgebricksException, HyracksDataException, 
InterruptedException {
+protected Void doRecover(IRetryPolicy policy) throws AlgebricksException, 
InterruptedException {
 LOGGER.log(level, "Actual Recovery task has started");
-if (listener.getState() != ActivityState.TEMPORARILY_FAILED) {
-LOGGER.log(level, "but its state is not temp failure and so we're 
just returning");
-return null;
-}
-LOGGER.log(level, "calling the policy");
+Exception failure = null;
 while (policy.retry(failure)) {
 synchronized (listener) {
-if (cancelRecovery) {
-return null;
-}
-while (clusterStateManager.getState() != ClusterState.ACTIVE) {
-if (cancelRecovery) {
-return null;
-}
+while (!cancelRecovery && clusterStateManager.getState() != 
ClusterState.ACTIVE) {
 listener.wait();
+}
+if (cancelRecovery) {
+LOGGER.log(level, "Recovery has been cancelled");
+return null;
 }
 }
 IMetadataLockManager lockManager = 
metadataProvider.getApplicationContext().getMetadataLockManager();
-
lockManager.acquireActiveEntityWriteLock(metadataProvider.getLocks(),
-listener.getEntityId().getDataverse() + '.' + 
listener.getEntityId().getEntityName());
-for (Dataset dataset : listener.getDatasets()) {
-
lockManager.acquireDataverseReadLock(metadataProvider.getLocks(), 
dataset.getDataverseName());
-
lockManager.acquireDatasetExclusiveModificationLock(metadataProvider.getLocks(),
-DatasetUtil.getFullyQualifiedName(dataset));
-}
-synchronized (listener) {
-try {
-if (cancelRecovery) {
-return null;
-}
-listener.setState(ActivityState.RECOVERING);
-listener.doStart(metadataProvider);
-return null;
-} catch (Exception e) {
-LOGGER.log(level, "Attempt to revive " + 
listener.getEntityId() + " failed", e);
-listener.setState(ActivityState.TEMPORARILY_FAILED);
-failure = e;
-} finally {
-metadataProvider.getLocks().reset();
+try {
+
lockManager.acquireActiveEntityWriteLock(metadataProvider.getLocks(),
+listener.getEntityId().getDataverse() + '.' + 
listener.getEntityId().getEntityName());
+for (Dataset dataset : listener.getDatasets()) {
+
lockManager.acquireDataverseReadLock(metadataProvider.getLocks(), 
dataset.getDataverseName());
+

Change in asterixdb[stabilization-f69489]: [NO ISSUE][ING] Fix race between active recovery and rebalance

2018-09-05 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][ING] Fix race between active recovery and rebalance
..


Patch Set 5: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2950
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I66edb73950bb82baa1a1dfd892cb4b23bb7046be
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[stabilization-f69489]: [NO ISSUE][ING] Fix race between active recovery and rebalance

2018-09-04 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2950

to look at the new patch set (#3).

Change subject: [NO ISSUE][ING] Fix race between active recovery and rebalance
..

[NO ISSUE][ING] Fix race between active recovery and rebalance

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- In certain cases, a rebalance active suspend starts before
  recovery of an active job starts.
- When that happens, sometimes, the recovery task exists and
  the active job is not resumed after rebalance.

Change-Id: I66edb73950bb82baa1a1dfd892cb4b23bb7046be
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
1 file changed, 13 insertions(+), 20 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/50/2950/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2950
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I66edb73950bb82baa1a1dfd892cb4b23bb7046be
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][ING] Fix race between active recovery and rebalance

2018-09-04 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has abandoned this change.

Change subject: [NO ISSUE][ING] Fix race between active recovery and rebalance
..


Abandoned

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2955
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I66edb73950bb82baa1a1dfd892cb4b23bb7046be
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[stabilization-f69489]: [NO ISSUE][ING] Fix race between active recovery and rebalance

2018-08-31 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][ING] Fix race between active recovery and rebalance
..


Patch Set 1:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/2950/1/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
File 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java:

PS1, Line 113: return null;
> Should we also log here as we do in the case of temporary failure? Or is th
For supportability, we should log every place we cancel to know why recovery 
didn't complete. will create a new patch


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2950
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I66edb73950bb82baa1a1dfd892cb4b23bb7046be
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: Yes


Change in asterixdb[stabilization-f69489]: [NO ISSUE][ING] Fix race between active recovery and rebalance

2018-08-31 Thread abdullah alamoudi (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2950

to look at the new patch set (#2).

Change subject: [NO ISSUE][ING] Fix race between active recovery and rebalance
..

[NO ISSUE][ING] Fix race between active recovery and rebalance

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- In certain cases, a rebalance active suspend starts before
  recovery of an active job starts.
- When that happens, sometimes, the recovery task exists and
  the active job is not resumed after rebalance.

Change-Id: I66edb73950bb82baa1a1dfd892cb4b23bb7046be
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
1 file changed, 7 insertions(+), 18 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/50/2950/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2950
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I66edb73950bb82baa1a1dfd892cb4b23bb7046be
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 


Change in asterixdb[stabilization-f69489]: [NO ISSUE][ING] Fix race between active recovery and rebalance

2018-08-31 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2950

Change subject: [NO ISSUE][ING] Fix race between active recovery and rebalance
..

[NO ISSUE][ING] Fix race between active recovery and rebalance

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- In certain cases, a rebalance active suspend starts before
  recovery of an active job starts.
- When that happens, sometimes, the recovery task exists and
  the active job is not resumed after rebalance.

Change-Id: I66edb73950bb82baa1a1dfd892cb4b23bb7046be
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/50/2950/1

diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
index 5d722e7..0460454 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
@@ -108,9 +108,14 @@
 protected Void doRecover(IRetryPolicy policy)
 throws AlgebricksException, HyracksDataException, 
InterruptedException {
 LOGGER.log(level, "Actual Recovery task has started");
-if (listener.getState() != ActivityState.TEMPORARILY_FAILED) {
-LOGGER.log(level, "but its state is not temp failure and so we're 
just returning");
-return null;
+synchronized (listener) {
+if (cancelRecovery) {
+return null;
+}
+if (listener.getState() != ActivityState.TEMPORARILY_FAILED) {
+LOGGER.log(level, "but its state is not temp failure and so 
we're just returning");
+return null;
+}
 }
 LOGGER.log(level, "calling the policy");
 while (policy.retry(failure)) {

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2950
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66edb73950bb82baa1a1dfd892cb4b23bb7046be
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi 


Change in asterixdb[stabilization-f69489]: Dummy

2018-08-31 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has abandoned this change.

Change subject: Dummy
..


Abandoned

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2947
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I3c01007aca754697579a4a53b70199e90c7edfc6
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[stabilization-f69489]: [NO ISSUE][STO] Ensure First Component ID is Initialized

2018-08-31 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][STO] Ensure First Component ID is Initialized
..


Patch Set 2: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2948
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I246f9373f950e2f9a2c63f86746462e42a3f1c62
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: Revert "[NO ISSUE][LOG] Include destination IP in thread nam...

2018-08-31 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: Revert "[NO ISSUE][LOG] Include destination IP in thread name 
on push back"
..


Revert "[NO ISSUE][LOG] Include destination IP in thread name on push back"

This reverts commit 2498d28f0584d6ab002625417622be429f5c8131.

Change-Id: I221071a8a2851bde839e67d7f0380816c249366d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2941
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Integration-Tests: Jenkins 
Contrib: Jenkins 
Reviewed-by: Murtadha Hubail 
---
M 
hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
4 files changed, 1 insertion(+), 25 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; No violations found; ; Verified
  Murtadha Hubail: Looks good to me, approved



diff --git 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
index 261e7c4..334fb5c 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
@@ -18,11 +18,9 @@
  */
 package org.apache.hyracks.comm.channels;
 
-import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 import java.util.ArrayDeque;
 import java.util.Deque;
-import java.util.Objects;
 
 import org.apache.hyracks.api.comm.IBufferAcceptor;
 import org.apache.hyracks.api.comm.IFrameWriter;
@@ -77,15 +75,7 @@
 break;
 }
 try {
-InetSocketAddress remoteAddress = 
ccb.getRemoteAddress();
-String nameBefore = Thread.currentThread().getName();
-try {
-Thread.currentThread()
-.setName(nameBefore + ":SendingTo(" + 
Objects.toString(remoteAddress) + ")");
-wait();
-} finally {
-Thread.currentThread().setName(nameBefore);
-}
+wait();
 } catch (InterruptedException e) {
 Thread.currentThread().interrupt();
 throw HyracksDataException.create(e);
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
index f7ef2aa..998acfb 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
@@ -19,7 +19,6 @@
 package org.apache.hyracks.net.protocols.muxdemux;
 
 import java.io.IOException;
-import java.net.InetSocketAddress;
 import java.nio.channels.SocketChannel;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -163,9 +162,5 @@
 return "Channel:" + channelId + "[localClose: " + localClose + " 
localCloseAck: " + localCloseAck
 + " remoteClose: " + remoteClose + " remoteCloseAck:" + 
remoteCloseAck + " readCredits: "
 + ri.getCredits() + " writeCredits: " + wi.getCredits() + "]";
-}
-
-public InetSocketAddress getRemoteAddress() {
-return cSet.getMultiplexedConnection().getRemoteAddress();
 }
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
index f5cdf2c..31a37ef 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
@@ -239,8 +239,4 @@
 ccbArray = Arrays.copyOf(ccbArray, ccbArray.length * 2);
 }
 }
-
-public MultiplexedConnection getMultiplexedConnection() {
-return mConn;
-}
 }
diff --git 

Change in asterixdb[stabilization-f69489]: [NO ISSUE][LOG] Include destination IP in thread name on pus...

2018-08-31 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][LOG] Include destination IP in thread name on push 
back
..


[NO ISSUE][LOG] Include destination IP in thread name on push back

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- In certain cases, we noticed that threads of certain jobs are
  waiting on the network boundaries to send tuples.
- In that case and in a big cluster, it is difficult to tell which
  node is pushing back.
- To make this easy, we include the IP of the receiving node
  in the thread name.

Change-Id: I81b48cb7a79de0a37f2171a1bd3b82141f89b49d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2929
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Contrib: Jenkins 
Reviewed-by: Murtadha Hubail 
Integration-Tests: Jenkins 
(cherry picked from commit 2498d28f0584d6ab002625417622be429f5c8131)
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2942
---
M 
hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
4 files changed, 25 insertions(+), 1 deletion(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; No violations found; Verified
  Murtadha Hubail: Looks good to me, approved



diff --git 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
index 334fb5c..261e7c4 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
@@ -18,9 +18,11 @@
  */
 package org.apache.hyracks.comm.channels;
 
+import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 import java.util.ArrayDeque;
 import java.util.Deque;
+import java.util.Objects;
 
 import org.apache.hyracks.api.comm.IBufferAcceptor;
 import org.apache.hyracks.api.comm.IFrameWriter;
@@ -75,7 +77,15 @@
 break;
 }
 try {
-wait();
+InetSocketAddress remoteAddress = 
ccb.getRemoteAddress();
+String nameBefore = Thread.currentThread().getName();
+try {
+Thread.currentThread()
+.setName(nameBefore + ":SendingTo(" + 
Objects.toString(remoteAddress) + ")");
+wait();
+} finally {
+Thread.currentThread().setName(nameBefore);
+}
 } catch (InterruptedException e) {
 Thread.currentThread().interrupt();
 throw HyracksDataException.create(e);
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
index 998acfb..f7ef2aa 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
@@ -19,6 +19,7 @@
 package org.apache.hyracks.net.protocols.muxdemux;
 
 import java.io.IOException;
+import java.net.InetSocketAddress;
 import java.nio.channels.SocketChannel;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -163,4 +164,8 @@
 + " remoteClose: " + remoteClose + " remoteCloseAck:" + 
remoteCloseAck + " readCredits: "
 + ri.getCredits() + " writeCredits: " + wi.getCredits() + "]";
 }
+
+public InetSocketAddress getRemoteAddress() {
+return cSet.getMultiplexedConnection().getRemoteAddress();
+}
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
index 31a37ef..f5cdf2c 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
@@ -239,4 +239,8 @@
 

Change in asterixdb[stabilization-f69489]: Dummy

2018-08-30 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2947

Change subject: Dummy
..

Dummy

Change-Id: I3c01007aca754697579a4a53b70199e90c7edfc6
---
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/47/2947/1

diff --git 
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
 
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
index b143ea9..947aac9 100644
--- 
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
+++ 
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
@@ -473,7 +473,7 @@
 if (parentDir.exists()) {
 LOGGER.warn("Actual file parent \"" + parentDir + "\" exists 
but is not a directory");
 } else if (!parentDir.mkdirs()) {
-LOGGER.warn("Unable to create actual file parent dir: " + 
parentDir);
+LOGGER.warn("Unable to create the actual file parent dir: " + 
parentDir);
 }
 }
 try (FileOutputStream out = new FileOutputStream(actualFile)) {

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2947
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c01007aca754697579a4a53b70199e90c7edfc6
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi 


Change in asterixdb[stabilization-f69489]: [NO ISSUE][RT] Allow getting the value of a span duration

2018-08-30 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][RT] Allow getting the value of a span duration
..


[NO ISSUE][RT] Allow getting the value of a span duration

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Enable getting the duration for spans. This is useful for
  delay calculations.

Change-Id: Icce0ac0a0d47a26655bf640f3f1a92506d87c30e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2940
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Till Westmann 
---
M 
hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/Span.java
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  Till Westmann: Looks good to me, approved
  Jenkins: Verified; No violations found; Verified



diff --git 
a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/Span.java
 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/Span.java
index e75a961..183cb6f 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/Span.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/Span.java
@@ -29,6 +29,10 @@
 spanNanos = unit.toNanos(span);
 }
 
+public long getSpanNanos() {
+return spanNanos;
+}
+
 public static Span start(long span, TimeUnit unit) {
 return new Span(span, unit);
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2940
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icce0ac0a0d47a26655bf640f3f1a92506d87c30e
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 


Change in asterixdb[stabilization-f69489]: [NO ISSUE][LOG] Include destination IP in thread name on pus...

2018-08-30 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2942

Change subject: [NO ISSUE][LOG] Include destination IP in thread name on push 
back
..

[NO ISSUE][LOG] Include destination IP in thread name on push back

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- In certain cases, we noticed that threads of certain jobs are
  waiting on the network boundaries to send tuples.
- In that case and in a big cluster, it is difficult to tell which
  node is pushing back.
- To make this easy, we include the IP of the receiving node
  in the thread name.

Change-Id: I81b48cb7a79de0a37f2171a1bd3b82141f89b49d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2929
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Contrib: Jenkins 
Reviewed-by: Murtadha Hubail 
Integration-Tests: Jenkins 
(cherry picked from commit 2498d28f0584d6ab002625417622be429f5c8131)
---
M 
hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
4 files changed, 25 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/42/2942/1

diff --git 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
index 334fb5c..261e7c4 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
@@ -18,9 +18,11 @@
  */
 package org.apache.hyracks.comm.channels;
 
+import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 import java.util.ArrayDeque;
 import java.util.Deque;
+import java.util.Objects;
 
 import org.apache.hyracks.api.comm.IBufferAcceptor;
 import org.apache.hyracks.api.comm.IFrameWriter;
@@ -75,7 +77,15 @@
 break;
 }
 try {
-wait();
+InetSocketAddress remoteAddress = 
ccb.getRemoteAddress();
+String nameBefore = Thread.currentThread().getName();
+try {
+Thread.currentThread()
+.setName(nameBefore + ":SendingTo(" + 
Objects.toString(remoteAddress) + ")");
+wait();
+} finally {
+Thread.currentThread().setName(nameBefore);
+}
 } catch (InterruptedException e) {
 Thread.currentThread().interrupt();
 throw HyracksDataException.create(e);
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
index 998acfb..f7ef2aa 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
@@ -19,6 +19,7 @@
 package org.apache.hyracks.net.protocols.muxdemux;
 
 import java.io.IOException;
+import java.net.InetSocketAddress;
 import java.nio.channels.SocketChannel;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -163,4 +164,8 @@
 + " remoteClose: " + remoteClose + " remoteCloseAck:" + 
remoteCloseAck + " readCredits: "
 + ri.getCredits() + " writeCredits: " + wi.getCredits() + "]";
 }
+
+public InetSocketAddress getRemoteAddress() {
+return cSet.getMultiplexedConnection().getRemoteAddress();
+}
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
index 31a37ef..f5cdf2c 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
@@ -239,4 +239,8 @@
 ccbArray = Arrays.copyOf(ccbArray, ccbArray.length * 2);
  

Change in asterixdb[master]: Revert "[NO ISSUE][LOG] Include destination IP in thread nam...

2018-08-30 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2941

Change subject: Revert "[NO ISSUE][LOG] Include destination IP in thread name 
on push back"
..

Revert "[NO ISSUE][LOG] Include destination IP in thread name on push back"

This reverts commit 2498d28f0584d6ab002625417622be429f5c8131.

Change-Id: I221071a8a2851bde839e67d7f0380816c249366d
---
M 
hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
4 files changed, 1 insertion(+), 25 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/41/2941/1

diff --git 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
index 261e7c4..334fb5c 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
@@ -18,11 +18,9 @@
  */
 package org.apache.hyracks.comm.channels;
 
-import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 import java.util.ArrayDeque;
 import java.util.Deque;
-import java.util.Objects;
 
 import org.apache.hyracks.api.comm.IBufferAcceptor;
 import org.apache.hyracks.api.comm.IFrameWriter;
@@ -77,15 +75,7 @@
 break;
 }
 try {
-InetSocketAddress remoteAddress = 
ccb.getRemoteAddress();
-String nameBefore = Thread.currentThread().getName();
-try {
-Thread.currentThread()
-.setName(nameBefore + ":SendingTo(" + 
Objects.toString(remoteAddress) + ")");
-wait();
-} finally {
-Thread.currentThread().setName(nameBefore);
-}
+wait();
 } catch (InterruptedException e) {
 Thread.currentThread().interrupt();
 throw HyracksDataException.create(e);
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
index f7ef2aa..998acfb 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
@@ -19,7 +19,6 @@
 package org.apache.hyracks.net.protocols.muxdemux;
 
 import java.io.IOException;
-import java.net.InetSocketAddress;
 import java.nio.channels.SocketChannel;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -163,9 +162,5 @@
 return "Channel:" + channelId + "[localClose: " + localClose + " 
localCloseAck: " + localCloseAck
 + " remoteClose: " + remoteClose + " remoteCloseAck:" + 
remoteCloseAck + " readCredits: "
 + ri.getCredits() + " writeCredits: " + wi.getCredits() + "]";
-}
-
-public InetSocketAddress getRemoteAddress() {
-return cSet.getMultiplexedConnection().getRemoteAddress();
 }
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
index f5cdf2c..31a37ef 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
@@ -239,8 +239,4 @@
 ccbArray = Arrays.copyOf(ccbArray, ccbArray.length * 2);
 }
 }
-
-public MultiplexedConnection getMultiplexedConnection() {
-return mConn;
-}
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
index 4c3836a..b6a392e 100644
--- 

Change in asterixdb[master]: Revert "[NO ISSUE][LOG] Include destination IP in thread nam...

2018-08-30 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has reverted this change.

Change subject: Revert "[NO ISSUE][LOG] Include destination IP in thread name 
on push back"
..


Uploaded patch set 1.

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2941
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: revert
Gerrit-Change-Id: I221071a8a2851bde839e67d7f0380816c249366d
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 


Change in asterixdb[stabilization-f69489]: [NO ISSUE][RT] Allow getting the value of a span duration

2018-08-30 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2940

Change subject: [NO ISSUE][RT] Allow getting the value of a span duration
..

[NO ISSUE][RT] Allow getting the value of a span duration

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Enable getting the duration for spans. This is useful for
  delay calculations.

Change-Id: Icce0ac0a0d47a26655bf640f3f1a92506d87c30e
---
M 
hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/Span.java
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/40/2940/1

diff --git 
a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/Span.java
 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/Span.java
index e75a961..183cb6f 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/Span.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/Span.java
@@ -29,6 +29,10 @@
 spanNanos = unit.toNanos(span);
 }
 
+public long getSpanNanos() {
+return spanNanos;
+}
+
 public static Span start(long span, TimeUnit unit) {
 return new Span(span, unit);
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2940
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icce0ac0a0d47a26655bf640f3f1a92506d87c30e
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi 


Change in asterixdb[stabilization-f69489]: [ASTERIXDB-2444][STO] Avoid Using System Clock in Storage

2018-08-28 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [ASTERIXDB-2444][STO] Avoid Using System Clock in Storage
..


Patch Set 9: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2927
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dff8ffb38ce8064a199d03b070ed1f5b924b8a4
Gerrit-PatchSet: 9
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Luo Chen 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [ASTERIXDB-2445][COMP] Nullable category handling in TypeCom...

2018-08-28 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [ASTERIXDB-2445][COMP] Nullable category handling in 
TypeComputeUtils.getResultType()
..


Patch Set 2: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2932
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0bb1e96c5a4f83a3d281811246da183d1a31e0f1
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Dmitry Lychagin 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [ASTERIXDB-2445][COMP] Nullable category handling in TypeCom...

2018-08-27 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [ASTERIXDB-2445][COMP] Nullable category handling in 
TypeComputeUtils.getResultType()
..


Patch Set 1:

Somehow, I am surprised it passed. but I am glad that it did too

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2932
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0bb1e96c5a4f83a3d281811246da183d1a31e0f1
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Dmitry Lychagin 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [ASTERIXDB-2445][COMP] Nullable category handling in TypeCom...

2018-08-27 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [ASTERIXDB-2445][COMP] Nullable category handling in 
TypeComputeUtils.getResultType()
..


Patch Set 1: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2932
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0bb1e96c5a4f83a3d281811246da183d1a31e0f1
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Dmitry Lychagin 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[stabilization-f69489]: [ASTERIXDB-2444][STO] Avoid Using System Clock in Storage

2018-08-27 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [ASTERIXDB-2444][STO] Avoid Using System Clock in Storage
..


Patch Set 3: Code-Review+2

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/2927/3/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java
File 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java:

PS3, Line 616: return MIN_VALID_COMPONENT_ID;
In what case do we get here?


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2927
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dff8ffb38ce8064a199d03b070ed1f5b924b8a4
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Luo Chen 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: Yes


Change in asterixdb[master]: [NO ISSUE][LOG] Include destination IP in thread name on pus...

2018-08-27 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][LOG] Include destination IP in thread name on push 
back
..


[NO ISSUE][LOG] Include destination IP in thread name on push back

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- In certain cases, we noticed that threads of certain jobs are
  waiting on the network boundaries to send tuples.
- In that case and in a big cluster, it is difficult to tell which
  node is pushing back.
- To make this easy, we include the IP of the receiving node
  in the thread name.

Change-Id: I81b48cb7a79de0a37f2171a1bd3b82141f89b49d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2929
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Contrib: Jenkins 
Reviewed-by: Murtadha Hubail 
Integration-Tests: Jenkins 
---
M 
hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
4 files changed, 25 insertions(+), 1 deletion(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; No violations found; ; Verified
  Murtadha Hubail: Looks good to me, approved



diff --git 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
index 334fb5c..261e7c4 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
@@ -18,9 +18,11 @@
  */
 package org.apache.hyracks.comm.channels;
 
+import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 import java.util.ArrayDeque;
 import java.util.Deque;
+import java.util.Objects;
 
 import org.apache.hyracks.api.comm.IBufferAcceptor;
 import org.apache.hyracks.api.comm.IFrameWriter;
@@ -75,7 +77,15 @@
 break;
 }
 try {
-wait();
+InetSocketAddress remoteAddress = 
ccb.getRemoteAddress();
+String nameBefore = Thread.currentThread().getName();
+try {
+Thread.currentThread()
+.setName(nameBefore + ":SendingTo(" + 
Objects.toString(remoteAddress) + ")");
+wait();
+} finally {
+Thread.currentThread().setName(nameBefore);
+}
 } catch (InterruptedException e) {
 Thread.currentThread().interrupt();
 throw HyracksDataException.create(e);
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
index 998acfb..f7ef2aa 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
@@ -19,6 +19,7 @@
 package org.apache.hyracks.net.protocols.muxdemux;
 
 import java.io.IOException;
+import java.net.InetSocketAddress;
 import java.nio.channels.SocketChannel;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -163,4 +164,8 @@
 + " remoteClose: " + remoteClose + " remoteCloseAck:" + 
remoteCloseAck + " readCredits: "
 + ri.getCredits() + " writeCredits: " + wi.getCredits() + "]";
 }
+
+public InetSocketAddress getRemoteAddress() {
+return cSet.getMultiplexedConnection().getRemoteAddress();
+}
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
index 31a37ef..f5cdf2c 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
@@ -239,4 +239,8 @@
 ccbArray = Arrays.copyOf(ccbArray, ccbArray.length * 2);
 }
 }
+
+public 

Change in asterixdb[master]: [NO ISSUE][LOG] Include destination IP in thread name on pus...

2018-08-27 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new patch set (#2).

Change subject: [NO ISSUE][LOG] Include destination IP in thread name on push 
back
..

[NO ISSUE][LOG] Include destination IP in thread name on push back

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- In certain cases, we noticed that threads of certain jobs are
  waiting on the network boundaries to send tuples.
- In that case and in a big cluster, it is difficult to tell which
  node is pushing back.
- To make this easy, we include the IP of the receiving node
  in the thread name.

Change-Id: I81b48cb7a79de0a37f2171a1bd3b82141f89b49d
---
M 
hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
4 files changed, 25 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/29/2929/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2929
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I81b48cb7a79de0a37f2171a1bd3b82141f89b49d
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][LOG] Include destination IP in thread name on pus...

2018-08-27 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2929

Change subject: [NO ISSUE][LOG] Include destination IP in thread name on push 
back
..

[NO ISSUE][LOG] Include destination IP in thread name on push back

Change-Id: I81b48cb7a79de0a37f2171a1bd3b82141f89b49d
---
M 
hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
M 
hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
4 files changed, 25 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/29/2929/1

diff --git 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
index 334fb5c..261e7c4 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-comm/src/main/java/org/apache/hyracks/comm/channels/NetworkOutputChannel.java
@@ -18,9 +18,11 @@
  */
 package org.apache.hyracks.comm.channels;
 
+import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 import java.util.ArrayDeque;
 import java.util.Deque;
+import java.util.Objects;
 
 import org.apache.hyracks.api.comm.IBufferAcceptor;
 import org.apache.hyracks.api.comm.IFrameWriter;
@@ -75,7 +77,15 @@
 break;
 }
 try {
-wait();
+InetSocketAddress remoteAddress = 
ccb.getRemoteAddress();
+String nameBefore = Thread.currentThread().getName();
+try {
+Thread.currentThread()
+.setName(nameBefore + ":SendingTo(" + 
Objects.toString(remoteAddress) + ")");
+wait();
+} finally {
+Thread.currentThread().setName(nameBefore);
+}
 } catch (InterruptedException e) {
 Thread.currentThread().interrupt();
 throw HyracksDataException.create(e);
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
index 998acfb..f7ef2aa 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelControlBlock.java
@@ -19,6 +19,7 @@
 package org.apache.hyracks.net.protocols.muxdemux;
 
 import java.io.IOException;
+import java.net.InetSocketAddress;
 import java.nio.channels.SocketChannel;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -163,4 +164,8 @@
 + " remoteClose: " + remoteClose + " remoteCloseAck:" + 
remoteCloseAck + " readCredits: "
 + ri.getCredits() + " writeCredits: " + wi.getCredits() + "]";
 }
+
+public InetSocketAddress getRemoteAddress() {
+return cSet.getMultiplexedConnection().getRemoteAddress();
+}
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
index 31a37ef..f5cdf2c 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/ChannelSet.java
@@ -239,4 +239,8 @@
 ccbArray = Arrays.copyOf(ccbArray, ccbArray.length * 2);
 }
 }
+
+public MultiplexedConnection getMultiplexedConnection() {
+return mConn;
+}
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
 
b/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
index b6a392e..4c3836a 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java
+++ 

Change in asterixdb[master]: [NO ISSUE][COMP] Fix TypeComputeUtils.getResultType

2018-08-27 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][COMP] Fix TypeComputeUtils.getResultType
..


[NO ISSUE][COMP] Fix TypeComputeUtils.getResultType

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Fix TypeComputeUtils.getResultType to either return
  unknowable or missable type.

Change-Id: Id881f2a5ad8134a3e86b2b08ce1acdc53c4948a2
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2928
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Contrib: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Dmitry Lychagin 
---
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; No violations found; ; Verified
  Dmitry Lychagin: Looks good to me, approved



diff --git 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
index 806235c..448ab4c 100644
--- 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
+++ 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
@@ -169,8 +169,7 @@
 IAType resultType = type;
 if ((category & NULLABLE) != 0 || (category & NULL) != 0) {
 resultType = AUnionType.createUnknownableType(resultType);
-}
-if ((category & MISSABLE) != 0 || (category & MISSING) != 0) {
+} else if ((category & MISSABLE) != 0 || (category & MISSING) != 0) {
 resultType = AUnionType.createMissableType(resultType);
 }
 return resultType;

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2928
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id881f2a5ad8134a3e86b2b08ce1acdc53c4948a2
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][COMP] Fix TypeComputeUtils.getResultType

2018-08-26 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2928

Change subject: [NO ISSUE][COMP] Fix TypeComputeUtils.getResultType
..

[NO ISSUE][COMP] Fix TypeComputeUtils.getResultType

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Fix TypeComputeUtils.getResultType to either return
  unknowable or missable type.

Change-Id: Id881f2a5ad8134a3e86b2b08ce1acdc53c4948a2
---
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/28/2928/1

diff --git 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
index 806235c..448ab4c 100644
--- 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
+++ 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
@@ -169,8 +169,7 @@
 IAType resultType = type;
 if ((category & NULLABLE) != 0 || (category & NULL) != 0) {
 resultType = AUnionType.createUnknownableType(resultType);
-}
-if ((category & MISSABLE) != 0 || (category & MISSING) != 0) {
+} else if ((category & MISSABLE) != 0 || (category & MISSING) != 0) {
 resultType = AUnionType.createMissableType(resultType);
 }
 return resultType;

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2928
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id881f2a5ad8134a3e86b2b08ce1acdc53c4948a2
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][RT] Improve debuggability of runtime functions

2018-08-24 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2926

to look at the new patch set (#3).

Change subject: [NO ISSUE][RT] Improve debuggability of runtime functions
..

[NO ISSUE][RT] Improve debuggability of runtime functions

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- This change introduce util methods to facilitate debugging
  functions runtime. Runtime functions read and write
  values from and into  byte arrays.
- To allow easier inspection of such values, we provide
  a method that takes a pointable and produces an adm
  node representing the value pointed to by the pointable.

Change-Id: I33257507e9bdd3be80355218e4bafecd1c71c650
---
M 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/jackson/ObjectPool.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/AbstractVisitablePointable.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/AdmNodeUtils.java
5 files changed, 53 insertions(+), 2 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/26/2926/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2926
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I33257507e9bdd3be80355218e4bafecd1c71c650
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 


Change in asterixdb[master]: WIP: Add util methods

2018-08-22 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new patch set (#2).

Change subject: WIP: Add util methods
..

WIP: Add util methods

Change-Id: I33257507e9bdd3be80355218e4bafecd1c71c650
---
M 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/jackson/ObjectPool.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/AbstractVisitablePointable.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/AdmNodeUtils.java
5 files changed, 53 insertions(+), 2 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/26/2926/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2926
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I33257507e9bdd3be80355218e4bafecd1c71c650
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: WIP: Add util methods

2018-08-22 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2926

Change subject: WIP: Add util methods
..

WIP: Add util methods

Change-Id: I33257507e9bdd3be80355218e4bafecd1c71c650
---
M 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/jackson/ObjectPool.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/AbstractVisitablePointable.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/AdmNodeUtils.java
5 files changed, 58 insertions(+), 2 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/26/2926/1

diff --git 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/jackson/ObjectPool.java
 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/jackson/ObjectPool.java
index 5ccd9e9..8945e71 100644
--- 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/jackson/ObjectPool.java
+++ 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/jackson/ObjectPool.java
@@ -59,4 +59,9 @@
 recycledObjects.add(object);
 }
 }
+
+@Override
+public String toString() {
+return recycledObjects.toString();
+}
 }
diff --git 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java
 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java
index 0cba8b6..356b84c 100644
--- 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java
+++ 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java
@@ -171,7 +171,7 @@
 }
 
 @SuppressWarnings("rawtypes")
-private ISerializerDeserializer addTag(final ISerializerDeserializer 
nonTaggedSerde) {
+public static ISerializerDeserializer addTag(final ISerializerDeserializer 
nonTaggedSerde) {
 return new ISerializerDeserializer() {
 
 private static final long serialVersionUID = 1L;
diff --git 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/AbstractVisitablePointable.java
 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/AbstractVisitablePointable.java
index 2ff9357..3f0496d 100644
--- 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/AbstractVisitablePointable.java
+++ 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/AbstractVisitablePointable.java
@@ -59,4 +59,10 @@
 set(ivf.getByteArray(), ivf.getStartOffset(), ivf.getLength());
 }
 
+@Override
+public String toString() {
+return "{ \"class\" : \"" + getClass().getSimpleName() + "\", \"data\" 
: "
++ (data == null ? "null" : ("\"" + data.hashCode() + ":" + 
data.length + "\"")) + ", \"offset\" : "
++ start + ", \"length\" : " + len + " }";
+}
 }
diff --git 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
index 91c47fd..411f067 100644
--- 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
+++ 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
@@ -58,7 +58,7 @@
 }
 });
 
-public IVisitablePointable allocateEmpty() {
+public AFlatValuePointable allocateEmpty() {
 return flatValueAllocator.allocate(null);
 }
 
diff --git 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/AdmNodeUtils.java
 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/AdmNodeUtils.java
index 6f4ee17..5f788e2 100644
--- 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/AdmNodeUtils.java
+++ 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/AdmNodeUtils.java
@@ -36,6 +36,7 @@
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.BooleanPointable;
 import org.apache.hyracks.data.std.primitive.DoublePointable;
 import org.apache.hyracks.data.std.primitive.LongPointable;
@@ -56,6 +57,50 @@
 return map;
 }
 
+public static IAdmNode getAsAdmNode(IPointable pointable) {
+try {
+byte[] bytes = pointable.getByteArray();
+int offset = 

Change in asterixdb[master]: [NO ISSUE] Misc Fixes for Point MBR RTree

2018-08-15 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE] Misc Fixes for Point MBR RTree
..


Patch Set 4: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2911
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ice24112152a2d93c7d2316b7506e6d6e81f2df44
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Luo Chen 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Ian Maxon 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Taewoo Kim 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb-bad[master]: Fix tuple translators with extension datasets

2018-08-15 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: Fix tuple translators with extension datasets
..


Fix tuple translators with extension datasets

Change-Id: I39f6707392085416c01e834ac85767f79a64f9d6
---
M 
asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
1 file changed, 13 insertions(+), 13 deletions(-)

Approvals:
  abdullah alamoudi: Looks good to me, but someone else must approve
  Jenkins: Verified
  Murtadha Hubail: Looks good to me, approved



diff --git 
a/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
 
b/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
index b33dcad..fa35fd5 100644
--- 
a/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
+++ 
b/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
@@ -32,17 +32,17 @@
 
 public static final ExtensionMetadataDatasetId BAD_CHANNEL_INDEX_ID = new 
ExtensionMetadataDatasetId(
 BADMetadataExtension.BAD_METADATA_EXTENSION_ID, 
BADConstants.CHANNEL_EXTENSION_NAME);
-public static final MetadataIndexImmutableProperties PROPERTIES_CHANNEL = 
new MetadataIndexImmutableProperties(
-BADConstants.CHANNEL_EXTENSION_NAME,
-
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID,
-
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID);
+public static final MetadataIndexImmutableProperties PROPERTIES_CHANNEL =
+new 
MetadataIndexImmutableProperties(BADConstants.CHANNEL_EXTENSION_NAME,
+
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID,
+
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID);
 
-public static final ExtensionMetadataDatasetId BAD_BROKER_INDEX_ID = new 
ExtensionMetadataDatasetId(
-BADMetadataExtension.BAD_METADATA_EXTENSION_ID, 
BADConstants.BROKER_KEYWORD);
-public static final MetadataIndexImmutableProperties PROPERTIES_BROKER = 
new MetadataIndexImmutableProperties(
-BADConstants.BROKER_KEYWORD,
-
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID 
+ 1,
-
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID 
+ 1);
+public static final ExtensionMetadataDatasetId BAD_BROKER_INDEX_ID =
+new 
ExtensionMetadataDatasetId(BADMetadataExtension.BAD_METADATA_EXTENSION_ID, 
BADConstants.BROKER_KEYWORD);
+public static final MetadataIndexImmutableProperties PROPERTIES_BROKER =
+new MetadataIndexImmutableProperties(BADConstants.BROKER_KEYWORD,
+
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID 
+ 1,
+
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID 
+ 1);
 
 public static final ExtensionMetadataDatasetId BAD_PROCEDURE_INDEX_ID = 
new ExtensionMetadataDatasetId(
 BADMetadataExtension.BAD_METADATA_EXTENSION_ID, 
BADConstants.PROCEDURE_KEYWORD);
@@ -61,7 +61,7 @@
 
Arrays.asList(Arrays.asList(MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME),
 Arrays.asList(BADConstants.ChannelName)),
 0, BADMetadataRecordTypes.CHANNEL_RECORDTYPE, true, new int[] { 0, 
1 }, BAD_CHANNEL_INDEX_ID,
-new ChannelTupleTranslator(true));
+() -> new ChannelTupleTranslator(true));
 
 @SuppressWarnings({ "rawtypes", "unchecked" })
 public static final ExtensionMetadataDataset BROKER_DATASET = new 
ExtensionMetadataDataset(PROPERTIES_BROKER,
@@ -69,7 +69,7 @@
 
Arrays.asList(Arrays.asList(MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME),
 Arrays.asList(BADConstants.BrokerName)),
 0, BADMetadataRecordTypes.BROKER_RECORDTYPE, true, new int[] { 0, 
1 }, BAD_BROKER_INDEX_ID,
-new BrokerTupleTranslator(true));
+() -> new BrokerTupleTranslator(true));
 
 @SuppressWarnings({ "rawtypes", "unchecked" })
 public static final ExtensionMetadataDataset PROCEDURE_DATASET = new 
ExtensionMetadataDataset(PROPERTIES_PROCEDURE,
@@ -77,6 +77,6 @@
 
Arrays.asList(Arrays.asList(MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME),
 Arrays.asList(BADConstants.ProcedureName), 
Arrays.asList(BADConstants.FIELD_NAME_ARITY)),
 0, BADMetadataRecordTypes.PROCEDURE_RECORDTYPE, true, new int[] { 
0, 1, 2 }, BAD_PROCEDURE_INDEX_ID,
-new ProcedureTupleTranslator(true));
+() -> new ProcedureTupleTranslator(true));
 
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2909
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: 

Change in asterixdb[master]: [NO ISSUE][TXN] Fix extension datasets tuple translators

2018-08-15 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][TXN] Fix extension datasets tuple translators
..


[NO ISSUE][TXN] Fix extension datasets tuple translators

Change-Id: Ifb8a8342d0f00468e1561d91eb802c52e66b149d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2908
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Contrib: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: abdullah alamoudi 
Reviewed-by: Murtadha Hubail 
---
M 
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/ExtensionMetadataDataset.java
A 
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/IMetadataEntityTupleTranslatorFactory.java
2 files changed, 33 insertions(+), 4 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  abdullah alamoudi: Looks good to me, but someone else must approve
  Jenkins: Verified; No violations found; ; Verified
  Murtadha Hubail: Looks good to me, approved



diff --git 
a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/ExtensionMetadataDataset.java
 
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/ExtensionMetadataDataset.java
index d25f488..ebb9cac 100644
--- 
a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/ExtensionMetadataDataset.java
+++ 
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/ExtensionMetadataDataset.java
@@ -29,16 +29,16 @@
 
 private static final long serialVersionUID = 1L;
 private final ExtensionMetadataDatasetId indexId;
-private final transient IMetadataEntityTupleTranslator tupleTranslator;
+private final transient IMetadataEntityTupleTranslatorFactory 
tupleTranslatorFactory;
 
 public ExtensionMetadataDataset(MetadataIndexImmutableProperties 
indexProperties, int numFields, IAType[] keyTypes,
 List> keyNames, int numSecondaryIndexKeys, 
ARecordType payloadType, boolean isPrimaryIndex,
 int[] primaryKeyIndexes, ExtensionMetadataDatasetId indexId,
-IMetadataEntityTupleTranslator tupleTranslator) {
+IMetadataEntityTupleTranslatorFactory tupleTranslatorFactory) {
 super(indexProperties, numFields, keyTypes, keyNames, 
numSecondaryIndexKeys, payloadType, isPrimaryIndex,
 primaryKeyIndexes);
 this.indexId = indexId;
-this.tupleTranslator = tupleTranslator;
+this.tupleTranslatorFactory = tupleTranslatorFactory;
 }
 
 public ExtensionMetadataDatasetId getId() {
@@ -46,6 +46,6 @@
 }
 
 public IMetadataEntityTupleTranslator getTupleTranslator() {
-return tupleTranslator;
+return tupleTranslatorFactory.createTupleTranslator();
 }
 }
diff --git 
a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/IMetadataEntityTupleTranslatorFactory.java
 
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/IMetadataEntityTupleTranslatorFactory.java
new file mode 100644
index 000..e472383
--- /dev/null
+++ 
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/IMetadataEntityTupleTranslatorFactory.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.metadata.api;
+
+import java.io.Serializable;
+
+public interface IMetadataEntityTupleTranslatorFactory extends Serializable 
{
+
+/**
+ * @return an instance of IMetadataEntityTupleTranslator
+ */
+IMetadataEntityTupleTranslator createTupleTranslator();
+}

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2908
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb8a8342d0f00468e1561d91eb802c52e66b149d
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][FUN] Allow extensions to add aggregate functions

2018-08-15 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][FUN] Allow extensions to add aggregate functions
..


Patch Set 5: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2840
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5bec031c833938e38c989acd7aa43b8e93669602
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Dmitry Lychagin 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][EXT] Prevent NPE in close() when using TestTypedA...

2018-08-15 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][EXT] Prevent NPE in close() when using 
TestTypedAdapter
..


Patch Set 2: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2903
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If2d62ce00858ff9a9f8033bd21d5da5f1f207c56
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Xikui Wang 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb-bad[master]: Fix tuple translators with extension datasets

2018-08-15 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: Fix tuple translators with extension datasets
..


Patch Set 1: Code-Review+1

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2909
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I39f6707392085416c01e834ac85767f79a64f9d6
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][TXN] Fix extension datasets tuple translators

2018-08-15 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][TXN] Fix extension datasets tuple translators
..


Patch Set 1: Code-Review+1

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2908
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb8a8342d0f00468e1561d91eb802c52e66b149d
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb-bad[master]: Fix tuple translators with extension datasets

2018-08-15 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2909

Change subject: Fix tuple translators with extension datasets
..

Fix tuple translators with extension datasets

Change-Id: I39f6707392085416c01e834ac85767f79a64f9d6
---
M 
asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
1 file changed, 13 insertions(+), 13 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb-bad 
refs/changes/09/2909/1

diff --git 
a/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
 
b/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
index b33dcad..fa35fd5 100644
--- 
a/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
+++ 
b/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
@@ -32,17 +32,17 @@
 
 public static final ExtensionMetadataDatasetId BAD_CHANNEL_INDEX_ID = new 
ExtensionMetadataDatasetId(
 BADMetadataExtension.BAD_METADATA_EXTENSION_ID, 
BADConstants.CHANNEL_EXTENSION_NAME);
-public static final MetadataIndexImmutableProperties PROPERTIES_CHANNEL = 
new MetadataIndexImmutableProperties(
-BADConstants.CHANNEL_EXTENSION_NAME,
-
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID,
-
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID);
+public static final MetadataIndexImmutableProperties PROPERTIES_CHANNEL =
+new 
MetadataIndexImmutableProperties(BADConstants.CHANNEL_EXTENSION_NAME,
+
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID,
+
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID);
 
-public static final ExtensionMetadataDatasetId BAD_BROKER_INDEX_ID = new 
ExtensionMetadataDatasetId(
-BADMetadataExtension.BAD_METADATA_EXTENSION_ID, 
BADConstants.BROKER_KEYWORD);
-public static final MetadataIndexImmutableProperties PROPERTIES_BROKER = 
new MetadataIndexImmutableProperties(
-BADConstants.BROKER_KEYWORD,
-
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID 
+ 1,
-
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID 
+ 1);
+public static final ExtensionMetadataDatasetId BAD_BROKER_INDEX_ID =
+new 
ExtensionMetadataDatasetId(BADMetadataExtension.BAD_METADATA_EXTENSION_ID, 
BADConstants.BROKER_KEYWORD);
+public static final MetadataIndexImmutableProperties PROPERTIES_BROKER =
+new MetadataIndexImmutableProperties(BADConstants.BROKER_KEYWORD,
+
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID 
+ 1,
+
MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID 
+ 1);
 
 public static final ExtensionMetadataDatasetId BAD_PROCEDURE_INDEX_ID = 
new ExtensionMetadataDatasetId(
 BADMetadataExtension.BAD_METADATA_EXTENSION_ID, 
BADConstants.PROCEDURE_KEYWORD);
@@ -61,7 +61,7 @@
 
Arrays.asList(Arrays.asList(MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME),
 Arrays.asList(BADConstants.ChannelName)),
 0, BADMetadataRecordTypes.CHANNEL_RECORDTYPE, true, new int[] { 0, 
1 }, BAD_CHANNEL_INDEX_ID,
-new ChannelTupleTranslator(true));
+() -> new ChannelTupleTranslator(true));
 
 @SuppressWarnings({ "rawtypes", "unchecked" })
 public static final ExtensionMetadataDataset BROKER_DATASET = new 
ExtensionMetadataDataset(PROPERTIES_BROKER,
@@ -69,7 +69,7 @@
 
Arrays.asList(Arrays.asList(MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME),
 Arrays.asList(BADConstants.BrokerName)),
 0, BADMetadataRecordTypes.BROKER_RECORDTYPE, true, new int[] { 0, 
1 }, BAD_BROKER_INDEX_ID,
-new BrokerTupleTranslator(true));
+() -> new BrokerTupleTranslator(true));
 
 @SuppressWarnings({ "rawtypes", "unchecked" })
 public static final ExtensionMetadataDataset PROCEDURE_DATASET = new 
ExtensionMetadataDataset(PROPERTIES_PROCEDURE,
@@ -77,6 +77,6 @@
 
Arrays.asList(Arrays.asList(MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME),
 Arrays.asList(BADConstants.ProcedureName), 
Arrays.asList(BADConstants.FIELD_NAME_ARITY)),
 0, BADMetadataRecordTypes.PROCEDURE_RECORDTYPE, true, new int[] { 
0, 1, 2 }, BAD_PROCEDURE_INDEX_ID,
-new ProcedureTupleTranslator(true));
+() -> new ProcedureTupleTranslator(true));
 
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2909
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

Change in asterixdb[master]: [NO ISSUE][TXN] Fix extension datasets tuple translators

2018-08-15 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2908

Change subject: [NO ISSUE][TXN] Fix extension datasets tuple translators
..

[NO ISSUE][TXN] Fix extension datasets tuple translators

Change-Id: Ifb8a8342d0f00468e1561d91eb802c52e66b149d
---
M 
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/ExtensionMetadataDataset.java
A 
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/IMetadataEntityTupleTranslatorFactory.java
2 files changed, 33 insertions(+), 4 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/08/2908/1

diff --git 
a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/ExtensionMetadataDataset.java
 
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/ExtensionMetadataDataset.java
index d25f488..ebb9cac 100644
--- 
a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/ExtensionMetadataDataset.java
+++ 
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/ExtensionMetadataDataset.java
@@ -29,16 +29,16 @@
 
 private static final long serialVersionUID = 1L;
 private final ExtensionMetadataDatasetId indexId;
-private final transient IMetadataEntityTupleTranslator tupleTranslator;
+private final transient IMetadataEntityTupleTranslatorFactory 
tupleTranslatorFactory;
 
 public ExtensionMetadataDataset(MetadataIndexImmutableProperties 
indexProperties, int numFields, IAType[] keyTypes,
 List> keyNames, int numSecondaryIndexKeys, 
ARecordType payloadType, boolean isPrimaryIndex,
 int[] primaryKeyIndexes, ExtensionMetadataDatasetId indexId,
-IMetadataEntityTupleTranslator tupleTranslator) {
+IMetadataEntityTupleTranslatorFactory tupleTranslatorFactory) {
 super(indexProperties, numFields, keyTypes, keyNames, 
numSecondaryIndexKeys, payloadType, isPrimaryIndex,
 primaryKeyIndexes);
 this.indexId = indexId;
-this.tupleTranslator = tupleTranslator;
+this.tupleTranslatorFactory = tupleTranslatorFactory;
 }
 
 public ExtensionMetadataDatasetId getId() {
@@ -46,6 +46,6 @@
 }
 
 public IMetadataEntityTupleTranslator getTupleTranslator() {
-return tupleTranslator;
+return tupleTranslatorFactory.createTupleTranslator();
 }
 }
diff --git 
a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/IMetadataEntityTupleTranslatorFactory.java
 
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/IMetadataEntityTupleTranslatorFactory.java
new file mode 100644
index 000..e472383
--- /dev/null
+++ 
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/IMetadataEntityTupleTranslatorFactory.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.metadata.api;
+
+import java.io.Serializable;
+
+public interface IMetadataEntityTupleTranslatorFactory extends Serializable 
{
+
+/**
+ * @return an instance of IMetadataEntityTupleTranslator
+ */
+IMetadataEntityTupleTranslator createTupleTranslator();
+}

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2908
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb8a8342d0f00468e1561d91eb802c52e66b149d
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][HTTP] Fix buffer leak in HttpServer

2018-08-14 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][HTTP] Fix buffer leak in HttpServer
..


[NO ISSUE][HTTP] Fix buffer leak in HttpServer

- user model changes: no
- storage format changes: no
- interface changes: yes

Details:
- Prior to this change, cancelled requests before
  they start leak request and response buffers.
- After this change, we distinguish between cancellation
  of requests before they start or after and release resources
  accordingly.

Change-Id: I9a34142e87158385152fa0a11be39abced307fcc
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2901
Reviewed-by: Michael Blow 
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Contrib: Jenkins 
Integration-Tests: Jenkins 
---
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestHandler.java
5 files changed, 41 insertions(+), 1 deletion(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; No violations found; ; Verified
  Michael Blow: Looks good to me, approved



diff --git 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
index 38f2d23..95f8f27 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
@@ -86,4 +86,9 @@
  * Notifies the response that the channel has become inactive.
  */
 void notifyChannelInactive();
+
+/**
+ * Called on a created request that is cancelled before it is started
+ */
+void cancel();
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
index 891cc2a..adea133 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
@@ -29,6 +29,7 @@
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.handler.codec.http.DefaultHttpContent;
 import io.netty.handler.codec.http.HttpResponseStatus;
+import io.netty.util.ReferenceCountUtil;
 import io.netty.util.internal.OutOfDirectMemoryError;
 
 public class ChunkedNettyOutputStream extends OutputStream {
@@ -137,4 +138,8 @@
 public synchronized void channelWritabilityChanged() {
 notifyAll();
 }
+
+public void cancel() {
+ReferenceCountUtil.release(buffer);
+}
 }
\ No newline at end of file
diff --git 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
index cd746b1..f02654e 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
@@ -192,4 +192,9 @@
 public void notifyChannelInactive() {
 outputStream.channelWritabilityChanged();
 }
+
+@Override
+public void cancel() {
+outputStream.cancel();
+}
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
index 90e33b6..1d28472 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
@@ -111,4 +111,9 @@
 // Do nothing.
 // This response is sent as a single piece
 }
+
+@Override
+public void cancel() {
+// Do nothing, as this response doesn't allocate buffers in constructor
+}
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestHandler.java
 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestHandler.java
index 72a8ea0..1c0801c 100644
--- 

Change in asterixdb[master]: [NO ISSUE][HTTP] Fix buffer leak in HttpServer

2018-08-14 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][HTTP] Fix buffer leak in HttpServer
..


Patch Set 3: Code-Review+1

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2901
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9a34142e87158385152fa0a11be39abced307fcc
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Ian Maxon 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][HTTP] Fix buffer leak in HttpServer

2018-08-14 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2901

to look at the new patch set (#3).

Change subject: [NO ISSUE][HTTP] Fix buffer leak in HttpServer
..

[NO ISSUE][HTTP] Fix buffer leak in HttpServer

- user model changes: no
- storage format changes: no
- interface changes: yes

Details:
- Prior to this change, cancelled requests before
  they start leak request and response buffers.
- After this change, we distinguish between cancellation
  of requests before they start or after and release resources
  accordingly.

Change-Id: I9a34142e87158385152fa0a11be39abced307fcc
---
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestHandler.java
5 files changed, 41 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/01/2901/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2901
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9a34142e87158385152fa0a11be39abced307fcc
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][HTTP] Fix buffer leak in HttpServer

2018-08-14 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2901

to look at the new patch set (#2).

Change subject: [NO ISSUE][HTTP] Fix buffer leak in HttpServer
..

[NO ISSUE][HTTP] Fix buffer leak in HttpServer

- user model changes: no
- storage format changes: no
- interface changes: yes

Details:
- Prior to this change, cancelled requests before
  they start leak request and response buffers.
- After this change, we distinguish between cancellation
  of requests before they start or after and release resources
  accordingly.

Change-Id: I9a34142e87158385152fa0a11be39abced307fcc
---
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestHandler.java
5 files changed, 39 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/01/2901/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2901
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9a34142e87158385152fa0a11be39abced307fcc
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][HTTP] Fix buffer leak in HttpServer

2018-08-14 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2901

Change subject: [NO ISSUE][HTTP] Fix buffer leak in HttpServer
..

[NO ISSUE][HTTP] Fix buffer leak in HttpServer

- user model changes: no
- storage format changes: no
- interface changes: yes

Details:
- Prior to this change, cancelled requests before
  they start leak request and response buffers.
- After this change, we distinguish between cancellation
  of requests before they start or after and release resources
  accordingly.

Change-Id: I9a34142e87158385152fa0a11be39abced307fcc
---
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestHandler.java
4 files changed, 34 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/01/2901/1

diff --git 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
index 38f2d23..95f8f27 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/api/IServletResponse.java
@@ -86,4 +86,9 @@
  * Notifies the response that the channel has become inactive.
  */
 void notifyChannelInactive();
+
+/**
+ * Called on a created request that is cancelled before it is started
+ */
+void cancel();
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
index 891cc2a..adea133 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedNettyOutputStream.java
@@ -29,6 +29,7 @@
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.handler.codec.http.DefaultHttpContent;
 import io.netty.handler.codec.http.HttpResponseStatus;
+import io.netty.util.ReferenceCountUtil;
 import io.netty.util.internal.OutOfDirectMemoryError;
 
 public class ChunkedNettyOutputStream extends OutputStream {
@@ -137,4 +138,8 @@
 public synchronized void channelWritabilityChanged() {
 notifyAll();
 }
+
+public void cancel() {
+ReferenceCountUtil.release(buffer);
+}
 }
\ No newline at end of file
diff --git 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
index 90e33b6..1d28472 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/FullResponse.java
@@ -111,4 +111,9 @@
 // Do nothing.
 // This response is sent as a single piece
 }
+
+@Override
+public void cancel() {
+// Do nothing, as this response doesn't allocate buffers in constructor
+}
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestHandler.java
 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestHandler.java
index 72a8ea0..dfe27e2 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestHandler.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestHandler.java
@@ -40,6 +40,8 @@
 private final IServlet servlet;
 private final IServletRequest request;
 private final IServletResponse response;
+private boolean started = false;
+private boolean cancelled = false;
 
 public HttpRequestHandler(ChannelHandlerContext ctx, IServlet servlet, 
IServletRequest request, int chunkSize) {
 this.ctx = ctx;
@@ -52,6 +54,13 @@
 
 @Override
 public Void call() throws Exception {
+synchronized (this) {
+if (cancelled) {
+LOGGER.warn("Request cancelled before it is started");
+return null;
+}
+started = true;
+}
 try {
 ChannelFuture lastContentFuture = handle();
 if 

Change in asterixdb[master]: [NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneIn...

2018-08-14 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][RT] Follow IFrameWriter protocol in 
AbstractOneInputPushRuntime
..


[NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneInputPushRuntime

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Many implementations of AbstractOneInputPushRuntime didn't
  follow the IFrameWriter protocol causing many unexpected
  runtime exceptions.
- This change ensures that all of the subclasses implement the
  protocol correctly.

Change-Id: I5133007f298366f58b53acc9f48bc553724dd7b5
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2884
Tested-by: Jenkins 
Contrib: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Michael Blow 
---
M 
asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/aggreg/AggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputOneOutputOneFramePushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputPushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputSourcePushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/SubplanRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/sort/InMemorySortRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/NestedTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/RunningAggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamLimitRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
16 files changed, 63 insertions(+), 129 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; ; Verified
  Michael Blow: Looks good to me, approved

Objections:
  Jenkins: Violations found



diff --git 
a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
 
b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
index 74ba139..2692cc7 100644
--- 
a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
+++ 
b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
@@ -89,7 +89,7 @@
 return;
 }
 initAccessAppend(ctx);
-writer.open();
+super.open();
 } catch (ACIDException e) {
 throw HyracksDataException.create(e);
 }
@@ -139,31 +139,6 @@
 protected int computePrimaryKeyHashValue(ITupleReference tuple, int[] 
primaryKeyFields) {
 MurmurHash128Bit.hash3_x64_128(tuple, primaryKeyFields, SEED, 
longHashes);
 return Math.abs((int) longHashes[0]);
-}
-
-@Override
-public void fail() throws HyracksDataException {
-failed = true;
-if (isSink) {
-return;
-}
-writer.fail();
-}
-
-@Override
-public void close() throws HyracksDataException {
-if (isSink) {
-return;
-}
-try {
-flushIfNotFailed();
-} catch (Exception e) {
-writer.fail();
-throw e;
-} finally {
-writer.close();
-}
-appender.reset(frame, true);
 }
 
 

Change in asterixdb[master]: [NO ISSUE][TX] Fix Concurrent Access in TransactionContext

2018-08-13 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][TX] Fix Concurrent Access in TransactionContext
..


Patch Set 3: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2875
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id7cc9e67cd51e06cf78b0ea231d3970e5199573c
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][ING] Halt on active suspend or resume failures

2018-08-13 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2889

Change subject: [NO ISSUE][ING] Halt on active suspend or resume failures
..

[NO ISSUE][ING] Halt on active suspend or resume failures

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Failures during active handler suspend or resume leaves the
  system in an inconsistent state.
- When that happens, we halt and rely on the recovery to go
  back to a consistent state.

Change-Id: I00d31f704f2fa22a5e14c711b6771345ca7d000a
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveNotificationHandler.java
M 
hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ExitUtil.java
2 files changed, 41 insertions(+), 28 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/89/2889/1

diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveNotificationHandler.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveNotificationHandler.java
index 8ade9ec..359c6bf 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveNotificationHandler.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveNotificationHandler.java
@@ -44,6 +44,7 @@
 import org.apache.hyracks.api.job.JobSpecification;
 import org.apache.hyracks.api.job.JobStatus;
 import org.apache.hyracks.api.util.SingleThreadEventProcessor;
+import org.apache.hyracks.util.ExitUtil;
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -259,41 +260,51 @@
 LOGGER.log(level, "Suspending active events handler");
 suspended = true;
 }
-IMetadataLockManager lockManager = 
mdProvider.getApplicationContext().getMetadataLockManager();
-Collection registeredListeners = 
entityEventListeners.values();
-for (IActiveEntityEventsListener listener : registeredListeners) {
-// write lock the listener
-// exclusive lock all the datasets
-String dataverseName = listener.getEntityId().getDataverse();
-String entityName = listener.getEntityId().getEntityName();
-if (LOGGER.isEnabled(level)) {
-LOGGER.log(level, "Suspending " + listener.getEntityId());
+try {
+IMetadataLockManager lockManager = 
mdProvider.getApplicationContext().getMetadataLockManager();
+Collection registeredListeners = 
entityEventListeners.values();
+for (IActiveEntityEventsListener listener : registeredListeners) {
+// write lock the listener
+// exclusive lock all the datasets
+String dataverseName = listener.getEntityId().getDataverse();
+String entityName = listener.getEntityId().getEntityName();
+if (LOGGER.isEnabled(level)) {
+LOGGER.log(level, "Suspending " + listener.getEntityId());
+}
+LOGGER.log(level, "Acquiring locks");
+
lockManager.acquireActiveEntityWriteLock(mdProvider.getLocks(), dataverseName + 
'.' + entityName);
+List datasets = ((ActiveEntityEventsListener) 
listener).getDatasets();
+for (Dataset dataset : datasets) {
+
lockManager.acquireDatasetExclusiveModificationLock(mdProvider.getLocks(),
+DatasetUtil.getFullyQualifiedName(dataset));
+}
+LOGGER.log(level, "locks acquired");
+((ActiveEntityEventsListener) listener).suspend(mdProvider);
+if (LOGGER.isEnabled(level)) {
+LOGGER.log(level, listener.getEntityId() + " suspended");
+}
 }
-LOGGER.log(level, "Acquiring locks");
-lockManager.acquireActiveEntityWriteLock(mdProvider.getLocks(), 
dataverseName + '.' + entityName);
-List datasets = ((ActiveEntityEventsListener) 
listener).getDatasets();
-for (Dataset dataset : datasets) {
-
lockManager.acquireDatasetExclusiveModificationLock(mdProvider.getLocks(),
-DatasetUtil.getFullyQualifiedName(dataset));
-}
-LOGGER.log(level, "locks acquired");
-((ActiveEntityEventsListener) listener).suspend(mdProvider);
-if (LOGGER.isEnabled(level)) {
-LOGGER.log(level, listener.getEntityId() + " suspended");
-}
+} catch (Throwable th) {
+LOGGER.error("Suspend active failed", th);
+ExitUtil.halt(ExitUtil.EC_ACTIVE_SUSPEND_FAILURE);
 }
 }
 
 public void resume(MetadataProvider mdProvider) throws 
HyracksDataException {
 

Change in asterixdb[master]: [NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneIn...

2018-08-12 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2884

to look at the new patch set (#5).

Change subject: [NO ISSUE][RT] Follow IFrameWriter protocol in 
AbstractOneInputPushRuntime
..

[NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneInputPushRuntime

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Many implementations of AbstractOneInputPushRuntime didn't
  follow the IFrameWriter protocol causing many unexpected
  runtime exceptions.
- This change ensures that all of the subclasses implement the
  protocol correctly.

Change-Id: I5133007f298366f58b53acc9f48bc553724dd7b5
---
M 
asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/aggreg/AggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputOneOutputOneFramePushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputPushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputSourcePushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/SubplanRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/sort/InMemorySortRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/NestedTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/RunningAggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamLimitRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
16 files changed, 63 insertions(+), 129 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/84/2884/5
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2884
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5133007f298366f58b53acc9f48bc553724dd7b5
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneIn...

2018-08-12 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2884

to look at the new patch set (#4).

Change subject: [NO ISSUE][RT] Follow IFrameWriter protocol in 
AbstractOneInputPushRuntime
..

[NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneInputPushRuntime

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Many implementations of AbstractOneInputPushRuntime didn't
  follow the IFrameWriter protocol causing many unexpected
  runtime exceptions.
- This change ensures that all of the subclasses implement the
  protocol correctly.

Change-Id: I5133007f298366f58b53acc9f48bc553724dd7b5
---
M 
asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/aggreg/AggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputOneOutputOneFramePushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputPushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputSourcePushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/SubplanRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/sort/InMemorySortRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/NestedTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/RunningAggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamLimitRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
16 files changed, 62 insertions(+), 128 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/84/2884/4
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2884
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5133007f298366f58b53acc9f48bc553724dd7b5
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][STO] Skip flush if the primary index is not open

2018-08-12 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has abandoned this change.

Change subject: [NO ISSUE][STO] Skip flush if the primary index is not open
..


Abandoned

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2699
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I3854c0dd96dae431592443e442203626eeae9dba
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Ian Maxon 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Luo Chen 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneIn...

2018-08-12 Thread abdullah alamoudi (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2884

to look at the new patch set (#3).

Change subject: [NO ISSUE][RT] Follow IFrameWriter protocol in 
AbstractOneInputPushRuntime
..

[NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneInputPushRuntime

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Many implementations of AbstractOneInputPushRuntime didn't
  follow the IFrameWriter protocol causing many unexpected
  runtime exceptions.
- This change ensures that all of the subclasses implement the
  protocol correctly.

Change-Id: I5133007f298366f58b53acc9f48bc553724dd7b5
---
M 
asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/aggreg/AggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputOneOutputOneFramePushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputPushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/SubplanRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/sort/InMemorySortRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/NestedTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/RunningAggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamLimitRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
15 files changed, 62 insertions(+), 118 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/84/2884/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2884
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5133007f298366f58b53acc9f48bc553724dd7b5
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneIn...

2018-08-12 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new patch set (#2).

Change subject: [NO ISSUE][RT] Follow IFrameWriter protocol in 
AbstractOneInputPushRuntime
..

[NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneInputPushRuntime

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Many implementations of AbstractOneInputPushRuntime didn't
  follow the IFrameWriter protocol causing many unexpected
  runtime exceptions.
- This change ensures that all of the subclasses implement the
  protocol correctly.

Change-Id: I5133007f298366f58b53acc9f48bc553724dd7b5
---
M 
asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/aggreg/AggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputOneOutputOneFramePushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputPushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/SubplanRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/sort/InMemorySortRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/NestedTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/RunningAggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamLimitRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
15 files changed, 62 insertions(+), 118 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/84/2884/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2884
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5133007f298366f58b53acc9f48bc553724dd7b5
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneIn...

2018-08-12 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2884

Change subject: [NO ISSUE][RT] Follow IFrameWriter protocol in 
AbstractOneInputPushRuntime
..

[NO ISSUE][RT] Follow IFrameWriter protocol in AbstractOneInputPushRuntime

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Many implementations of AbstractOneInputPushRuntime didn't
  follow the IFrameWriter protocol causing many unexpected
  runtime exceptions.
- This change ensures that all of the subclasses implement the
  protocol correctly.

Change-Id: I5133007f298366f58b53acc9f48bc553724dd7b5
---
M 
asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/aggreg/AggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputOneOutputOneFramePushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/base/AbstractOneInputPushRuntime.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/SubplanRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/sort/InMemorySortRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/AssignRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/EmptyTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/NestedTupleSourceRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/RunningAggregateRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamLimitRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StringStreamingRuntimeFactory.java
M 
hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
15 files changed, 68 insertions(+), 122 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/84/2884/1

diff --git 
a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
 
b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
index 74ba139..2692cc7 100644
--- 
a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
+++ 
b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/runtime/CommitRuntime.java
@@ -89,7 +89,7 @@
 return;
 }
 initAccessAppend(ctx);
-writer.open();
+super.open();
 } catch (ACIDException e) {
 throw HyracksDataException.create(e);
 }
@@ -139,31 +139,6 @@
 protected int computePrimaryKeyHashValue(ITupleReference tuple, int[] 
primaryKeyFields) {
 MurmurHash128Bit.hash3_x64_128(tuple, primaryKeyFields, SEED, 
longHashes);
 return Math.abs((int) longHashes[0]);
-}
-
-@Override
-public void fail() throws HyracksDataException {
-failed = true;
-if (isSink) {
-return;
-}
-writer.fail();
-}
-
-@Override
-public void close() throws HyracksDataException {
-if (isSink) {
-return;
-}
-try {
-flushIfNotFailed();
-} catch (Exception e) {
-writer.fail();
-throw e;
-} finally {
-writer.close();
-}
-appender.reset(frame, true);
 }
 
 @Override
diff --git 
a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/aggreg/AggregateRuntimeFactory.java
 
b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/aggreg/AggregateRuntimeFactory.java
index e99b61b..1f9cb91 

Change in asterixdb[master]: [ASTERIXDB-2398][STO] Ensure No Concurrent Access to FileMap...

2018-08-09 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [ASTERIXDB-2398][STO] Ensure No Concurrent Access to 
FileMapManager
..


Patch Set 2: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2863
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iea7fdb0b891b4ba2aaa528b42eab47b6f841672d
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [ASTERIXDB-2125] Fix RTree Bulkload Exception

2018-08-09 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [ASTERIXDB-2125] Fix RTree Bulkload Exception
..


Patch Set 3: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2864
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4267a7ce0b8621471e7a8504c448ba1f500e92db
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Luo Chen 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Ian Maxon 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Luo Chen 
Gerrit-Reviewer: Taewoo Kim (please use wangs...@gmail.com) 
Gerrit-Reviewer: Taewoo Kim 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [ASTERIXDB-2065][ING] Make stop timeout configurable

2018-08-08 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [ASTERIXDB-2065][ING] Make stop timeout configurable
..


[ASTERIXDB-2065][ING] Make stop timeout configurable

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Make timeout of a graceful stop of an active job
  configurable.

Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2845
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Contrib: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: abdullah alamoudi 
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/TestEventsListener.java
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
7 files changed, 27 insertions(+), 8 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  abdullah alamoudi: Looks good to me, approved
  Jenkins: Verified; No violations found; ; Verified



diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
index 22c9b5d..39a8402 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
@@ -74,10 +74,7 @@
 private static final EnumSet TRANSITION_STATES = 
EnumSet.of(ActivityState.RESUMING,
 ActivityState.STARTING, ActivityState.STOPPING, 
ActivityState.RECOVERING, ActivityState.CANCELLING);
 private static final String DEFAULT_ACTIVE_STATS = "{\"Stats\":\"N/A\"}";
-// TODO: Make configurable 
https://issues.apache.org/jira/browse/ASTERIXDB-2065
-protected static final long STOP_MESSAGE_TIMEOUT = 5L;
-protected static final long SUSPEND_MESSAGE_TIMEOUT = 10L;
-protected static final TimeUnit TIMEOUT_UNIT = TimeUnit.MINUTES;
+protected static final TimeUnit TIMEOUT_UNIT = TimeUnit.SECONDS;
 protected final IClusterStateManager clusterStateManager;
 protected final ActiveNotificationHandler handler;
 protected final List subscribers = new 
ArrayList<>();
@@ -521,7 +518,7 @@
 } else if (state == ActivityState.RUNNING) {
 setState(ActivityState.STOPPING);
 try {
-doStop(metadataProvider, STOP_MESSAGE_TIMEOUT, TIMEOUT_UNIT);
+doStop(metadataProvider, 
appCtx.getActiveProperties().getActiveStopTimeout(), TIMEOUT_UNIT);
 } catch (Exception e) {
 setState(ActivityState.STOPPED);
 LOGGER.log(Level.ERROR, "Failed to stop the entity " + 
entityId, e);
diff --git 
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
 
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
index 6c95958..64520a4 100644
--- 
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
+++ 
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
@@ -37,6 +37,7 @@
 import org.apache.asterix.common.api.IClusterManagementWork.ClusterState;
 import org.apache.asterix.common.api.IMetadataLockManager;
 import org.apache.asterix.common.cluster.IClusterStateManager;
+import org.apache.asterix.common.config.ActiveProperties;
 import org.apache.asterix.common.context.IStorageComponentProvider;
 import org.apache.asterix.common.exceptions.ErrorCode;
 import org.apache.asterix.external.feed.watch.WaitForStateSubscriber;
@@ -121,6 +122,7 @@
 Mockito.when(appCtx.getMetadataLockManager()).thenReturn(lockManager);
 Mockito.when(appCtx.getServiceContext()).thenReturn(ccServiceCtx);
 
Mockito.when(appCtx.getClusterStateManager()).thenReturn(clusterStateManager);
+
Mockito.when(appCtx.getActiveProperties()).thenReturn(Mockito.mock(ActiveProperties.class));
 componentProvider = new StorageComponentProvider();
 
Mockito.when(appCtx.getStorageComponentProvider()).thenReturn(componentProvider);
 
Mockito.when(ccServiceCtx.getControllerService()).thenReturn(ccService);
@@ -375,7 +377,7 @@
 testStartWhenStartSucceed();
 // suspend
 

Change in asterixdb[master]: [ASTERIXDB-2065][ING] Make stop timeout configurable

2018-08-08 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [ASTERIXDB-2065][ING] Make stop timeout configurable
..


Patch Set 9: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2845
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
Gerrit-PatchSet: 9
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [ASTERIXDB-2065][ING] Make stop timeout configurable

2018-08-08 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2845

to look at the new patch set (#9).

Change subject: [ASTERIXDB-2065][ING] Make stop timeout configurable
..

[ASTERIXDB-2065][ING] Make stop timeout configurable

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Make timeout of a graceful stop of an active job
  configurable.

Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/TestEventsListener.java
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
7 files changed, 27 insertions(+), 8 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/45/2845/9
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2845
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
Gerrit-PatchSet: 9
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [ASTERIXDB-2065][ING] Make stop timeout configurable

2018-08-08 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2845

to look at the new patch set (#8).

Change subject: [ASTERIXDB-2065][ING] Make stop timeout configurable
..

[ASTERIXDB-2065][ING] Make stop timeout configurable

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Make timeout of a graceful stop of an active job
  configurable.

Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/TestEventsListener.java
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
5 files changed, 23 insertions(+), 8 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/45/2845/8
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2845
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
Gerrit-PatchSet: 8
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [ASTERIXDB-2065][ING] Make stop timeout configurable

2018-08-08 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2845

to look at the new patch set (#7).

Change subject: [ASTERIXDB-2065][ING] Make stop timeout configurable
..

[ASTERIXDB-2065][ING] Make stop timeout configurable

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Make timeout of a graceful stop of an active job
  configurable.

Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/TestEventsListener.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
4 files changed, 21 insertions(+), 8 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/45/2845/7
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2845
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
Gerrit-PatchSet: 7
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE] Don't log interrupts as WARNings

2018-08-07 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE] Don't log interrupts as WARNings
..


Patch Set 3: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2855
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0e847b8197fa12f1ce235dde404df24196939a83
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: INVESTIGATING A LEAK

2018-08-07 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has abandoned this change.

Change subject: INVESTIGATING A LEAK
..


Abandoned

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2849
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I0322d87bdcfccaff81f914243111beacca996929
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 


Change in asterixdb[master]: [NO ISSUE] Don't log interrupts as WARNings

2018-08-07 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE] Don't log interrupts as WARNings
..


Patch Set 2: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2855
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0e847b8197fa12f1ce235dde404df24196939a83
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE] Don't log interrupts as WARNings

2018-08-07 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE] Don't log interrupts as WARNings
..


Patch Set 1: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2855
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0e847b8197fa12f1ce235dde404df24196939a83
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: INVESTIGATING A LEAK

2018-08-07 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has restored this change.

Change subject: INVESTIGATING A LEAK
..


Restored

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2849
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: restore
Gerrit-Change-Id: I0322d87bdcfccaff81f914243111beacca996929
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: INVESTIGATING A LEAK

2018-08-07 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2849

to look at the new patch set (#2).

Change subject: INVESTIGATING A LEAK
..

INVESTIGATING A LEAK

Change-Id: I0322d87bdcfccaff81f914243111beacca996929
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/49/2849/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2849
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0322d87bdcfccaff81f914243111beacca996929
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][ING] Set JobId in thread waiting for job to complete

2018-08-07 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][ING] Set JobId in thread waiting for job to complete
..


[NO ISSUE][ING] Set JobId in thread waiting for job to complete

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- When stopping an active job, set the job Id in the thread to enable
  debugging if the job gets stuck.

Change-Id: Ic19d11f150aa404522133d4d7227c758dbf0de6a
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2850
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Contrib: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Murtadha Hubail 
---
M 
asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
3 files changed, 6 insertions(+), 3 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; No violations found; ; Verified
  Murtadha Hubail: Looks good to me, approved



diff --git 
a/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
 
b/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
index 6373d6c..4adffda 100644
--- 
a/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
+++ 
b/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
@@ -172,8 +172,6 @@
 executor.execute(() -> {
 try {
 stopIfRunning(runtime, content.getTimeout(), 
content.getUnit());
-} catch (Exception e) {
-LOGGER.warn("Failed to stop runtime: {}", runtimeId, e);
 } catch (Throwable th) {
 LOGGER.warn("Failed to stop runtime: {}", runtimeId, th);
 ExitUtil.halt(ExitUtil.EC_UNCAUGHT_THROWABLE);
diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
index 77b8647..362f924 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
@@ -45,8 +45,8 @@
 import org.apache.asterix.translator.SessionOutput;
 import org.apache.commons.lang3.tuple.Triple;
 import org.apache.hyracks.api.application.INCServiceContext;
-import org.apache.hyracks.api.result.ResultSetId;
 import org.apache.hyracks.api.job.JobId;
+import org.apache.hyracks.api.result.ResultSetId;
 import org.apache.hyracks.http.api.IChannelClosedHandler;
 import org.apache.hyracks.http.api.IServletRequest;
 import org.apache.hyracks.http.server.HttpServer;
@@ -144,6 +144,7 @@
 CancelQueryRequest cancelQueryMessage =
 new CancelQueryRequest(nodeId, 
cancelQueryFuture.getFutureId(), clientContextID);
 // TODO(mblow): multicc -- need to send cancellation to the 
correct cc
+LOGGER.info("Cancelling query due to {}", 
exception.getClass().getSimpleName());
 messageBroker.sendMessageToPrimaryCC(cancelQueryMessage);
 if (wait) {
 
cancelQueryFuture.get(ExecuteStatementRequestMessage.DEFAULT_QUERY_CANCELLATION_WAIT_MILLIS,
diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
index b5432c5..22c9b5d 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
@@ -450,7 +450,9 @@
 }
 WaitForStateSubscriber subscriber = new WaitForStateSubscriber(this, 
waitFor);
 // Note: once we start sending stop messages, we can't go back until 
the entity is stopped
+final String nameBefore = Thread.currentThread().getName();
 try {
+Thread.currentThread().setName(nameBefore + " : 
WaitForCompletionForJobId: " + jobId);
 sendStopMessages(metadataProvider, timeout, unit);
 LOGGER.log(Level.DEBUG, "Waiting for its state to become " + 
waitFor);
 subscriber.sync();
@@ -460,6 +462,8 @@
 Thread.currentThread().interrupt();
 } catch (Throwable e) {
 forceStop(subscriber, e);
+} finally {
+Thread.currentThread().setName(nameBefore);
 }
 }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2850
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged

Change in asterixdb[master]: INVESTIGATING A LEAK

2018-08-06 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has abandoned this change.

Change subject: INVESTIGATING A LEAK
..


Abandoned

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2849
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I0322d87bdcfccaff81f914243111beacca996929
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][ING] Set JobId in thread waiting for job to complete

2018-08-06 Thread abdullah alamoudi (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2850

to look at the new patch set (#3).

Change subject: [NO ISSUE][ING] Set JobId in thread waiting for job to complete
..

[NO ISSUE][ING] Set JobId in thread waiting for job to complete

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- When stopping an active job, set the job Id in the thread to enable
  debugging if the job gets stuck.

Change-Id: Ic19d11f150aa404522133d4d7227c758dbf0de6a
---
M 
asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
3 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/50/2850/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2850
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic19d11f150aa404522133d4d7227c758dbf0de6a
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][ING] Set JobId in thread waiting for job to complete

2018-08-06 Thread abdullah alamoudi (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2850

to look at the new patch set (#2).

Change subject: [NO ISSUE][ING] Set JobId in thread waiting for job to complete
..

[NO ISSUE][ING] Set JobId in thread waiting for job to complete

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- When stopping an active job, set the job Id in the thread to enable
  debugging if the job gets stuck.

Change-Id: Ic19d11f150aa404522133d4d7227c758dbf0de6a
---
M 
asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/50/2850/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2850
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic19d11f150aa404522133d4d7227c758dbf0de6a
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][ING] Set JobId in thread waiting for job to complete

2018-08-06 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2850

Change subject: [NO ISSUE][ING] Set JobId in thread waiting for job to complete
..

[NO ISSUE][ING] Set JobId in thread waiting for job to complete

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- When stopping an active job, set the job Id in the thread to enable
  debugging if the job gets stuck.

Change-Id: Ic19d11f150aa404522133d4d7227c758dbf0de6a
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/50/2850/1

diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
index b5432c5..22c9b5d 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
@@ -450,7 +450,9 @@
 }
 WaitForStateSubscriber subscriber = new WaitForStateSubscriber(this, 
waitFor);
 // Note: once we start sending stop messages, we can't go back until 
the entity is stopped
+final String nameBefore = Thread.currentThread().getName();
 try {
+Thread.currentThread().setName(nameBefore + " : 
WaitForCompletionForJobId: " + jobId);
 sendStopMessages(metadataProvider, timeout, unit);
 LOGGER.log(Level.DEBUG, "Waiting for its state to become " + 
waitFor);
 subscriber.sync();
@@ -460,6 +462,8 @@
 Thread.currentThread().interrupt();
 } catch (Throwable e) {
 forceStop(subscriber, e);
+} finally {
+Thread.currentThread().setName(nameBefore);
 }
 }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2850
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic19d11f150aa404522133d4d7227c758dbf0de6a
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][OTH] Add Request Getter to HttpRequestHandler

2018-08-06 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][OTH] Add Request Getter to HttpRequestHandler
..


Patch Set 1: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2847
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I65c384449b7532a05fd89a80d6c9567320d53fba
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][STO] Notify of completion of IO request in finally

2018-08-06 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2839

to look at the new patch set (#6).

Change subject: [NO ISSUE][STO] Notify of completion of IO request in finally
..

[NO ISSUE][STO] Notify of completion of IO request in finally

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Notify completion of a request in a finally clause to ensure
  waiting thread is always notified.

Change-Id: I8b3003b47b6b181856faf82aca6e828ee014527c
---
M 
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/IoRequest.java
M 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
2 files changed, 9 insertions(+), 13 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/39/2839/6
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2839
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8b3003b47b6b181856faf82aca6e828ee014527c
Gerrit-PatchSet: 6
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: abdullah alamoudi 


Change in asterixdb[master]: INVESTIGATING A LEAK

2018-08-05 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2849

Change subject: INVESTIGATING A LEAK
..

INVESTIGATING A LEAK

Change-Id: I0322d87bdcfccaff81f914243111beacca996929
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/49/2849/1

diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
index fbafc2e..9871216 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
@@ -76,6 +76,8 @@
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
+import io.netty.util.ResourceLeakDetector;
+
 public class NCApplication extends BaseNCApplication {
 private static final Logger LOGGER = LogManager.getLogger();
 
@@ -94,6 +96,7 @@
 
 @Override
 public void init(IServiceContext serviceCtx) throws Exception {
+ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.PARANOID);
 ncServiceCtx = (INCServiceContext) serviceCtx;
 // set the node status initially to idle to indicate that it is 
pending booting
 ((NodeControllerService) 
serviceCtx.getControllerService()).setNodeStatus(NodeStatus.IDLE);

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2849
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0322d87bdcfccaff81f914243111beacca996929
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 


Change in asterixdb[master]: [ASTERIXDB-2065][ING] Make stop timeout configurable

2018-08-05 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2845

to look at the new patch set (#5).

Change subject: [ASTERIXDB-2065][ING] Make stop timeout configurable
..

[ASTERIXDB-2065][ING] Make stop timeout configurable

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Make timeout of a graceful stop of an active job
  configurable.

Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/TestEventsListener.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
4 files changed, 21 insertions(+), 8 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/45/2845/5
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2845
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][STO] Notify of completion of IO request in finally

2018-08-05 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2839

to look at the new patch set (#4).

Change subject: [NO ISSUE][STO] Notify of completion of IO request in finally
..

[NO ISSUE][STO] Notify of completion of IO request in finally

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Notify completion of a request in a finally clause to ensure
  waiting thread is always notified.

Change-Id: I8b3003b47b6b181856faf82aca6e828ee014527c
---
M 
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/IoRequest.java
M 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
2 files changed, 15 insertions(+), 17 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/39/2839/4
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2839
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8b3003b47b6b181856faf82aca6e828ee014527c
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][STO] Notify completiong of IO request in finally

2018-08-05 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][STO] Notify completiong of IO request in finally
..


Patch Set 3:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/2839/3//COMMIT_MSG
Commit Message:

PS3, Line 7: completiong
> completion*
Done


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2839
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8b3003b47b6b181856faf82aca6e828ee014527c
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: Yes


Change in asterixdb[master]: [NO ISSUE][STO] Notify completiong of IO request in finally

2018-08-05 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][STO] Notify completiong of IO request in finally
..


Patch Set 3:

(5 comments)

https://asterix-gerrit.ics.uci.edu/#/c/2839/3/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/IoRequest.java
File 
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/IoRequest.java:

PS3, Line 146: Offer failing means we're over capacity and this should be 
garbage collected
> how can we ever be over capacity?
if we have many requests, then we could exceed the size of the request pool.


https://asterix-gerrit.ics.uci.edu/#/c/2839/3/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
File 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java:

PS3, Line 145: if (LOGGER.isWarnEnabled()) {
> remove
Done


PS3, Line 204: if (LOGGER.isWarnEnabled()) {
> remove
Done


PS3, Line 205: e.getMessage()
> this is terrible, and will often be "null"- the message will already be log
I have struggled with this for sometime while doing the change. Agree it is 
horrible.


PS3, Line 713: if (LOGGER.isWarnEnabled()) {
> remove
Done


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2839
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8b3003b47b6b181856faf82aca6e828ee014527c
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: Yes


Change in asterixdb[master]: [NO ISSUE][OTH] Move Network Tracing Logs to Trace Level

2018-08-05 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][OTH] Move Network Tracing Logs to Trace Level
..


Patch Set 1: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2848
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iebc13ff6cb7b3c9086c19597ec982061672a891f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][STO] Skip flush recovery of empty resources

2018-08-04 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][STO] Skip flush recovery of empty resources
..


[NO ISSUE][STO] Skip flush recovery of empty resources

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Before this change, recovery would throw a NullPointerException
  on recovery of a flush operation on a component without
  update logs.
- Since this can happen, we simply check for the case and skip the
  flush.

Change-Id: Ib01d7513f43830109632760860d34ca3dcddeaee
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2844
Tested-by: Jenkins 
Contrib: Jenkins 
Reviewed-by: abdullah alamoudi 
Integration-Tests: Jenkins 
Reviewed-by: Murtadha Hubail 
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
1 file changed, 18 insertions(+), 12 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  abdullah alamoudi: Looks good to me, but someone else must approve
  Jenkins: Verified; ; Verified
  Murtadha Hubail: Looks good to me, approved

Objections:
  Jenkins: Violations found



diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
index 5e8a5e8..adf9960 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
@@ -296,7 +296,7 @@
 ((INcApplicationContext) 
(serviceCtx.getApplicationContext())).getIndexCheckpointManagerProvider();
 
 Map resourcesMap = 
localResourceRepository.loadAndGetAllResources();
-Map resourceId2MaxLSNMap = new HashMap<>();
+final Map resourceId2MaxLSNMap = new HashMap<>();
 TxnEntityId tempKeyTxnEntityId = new TxnEntityId(-1, -1, -1, null, -1, 
false);
 
 ILogRecord logRecord = null;
@@ -399,19 +399,25 @@
 // we only need to flush open indexes here (opened 
by previous update records)
 // if an index has no ongoing updates, then it's 
memory component must be empty
 // and there is nothing to flush
-for (IndexInfo iInfo : 
dsInfo.getIndexes().values()) {
+for (final IndexInfo iInfo : 
dsInfo.getIndexes().values()) {
 if (iInfo.isOpen() && iInfo.getPartition() == 
partition) {
-maxDiskLastLsn = 
resourceId2MaxLSNMap.get(iInfo.getResourceId());
-index = iInfo.getIndex();
-if (logRecord.getLSN() > maxDiskLastLsn
-&& 
!index.isCurrentMutableComponentEmpty()) {
-// schedule flush
-redoFlush(index, logRecord);
-redoCount++;
+Long maxLsnBeforeFlush = 
resourceId2MaxLSNMap.get(iInfo.getResourceId());
+if (maxLsnBeforeFlush != null) {
+// If there was at least one update to 
the resource.
+// IMPORTANT: Don't remove the check 
above
+// This check is to support indexes 
without transaction logs
+maxDiskLastLsn = maxLsnBeforeFlush;
+index = iInfo.getIndex();
+if (logRecord.getLSN() > maxDiskLastLsn
+&& 
!index.isCurrentMutableComponentEmpty()) {
+// schedule flush
+redoFlush(index, logRecord);
+redoCount++;
+} else {
+// TODO: update checkpoint file?
+}
 } else {
-// otherwise, do nothing since this 
component had no records when flush was
-// scheduled.. TODO: update checkpoint 
file? and do the
-// lsn checks from the checkpoint file
+// TODO: update checkpoint file?
 }
 }
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2844
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: 

Change in asterixdb[master]: [ASTERIXDB-2065][ING] Make stop timeout configurable

2018-08-03 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2845

to look at the new patch set (#4).

Change subject: [ASTERIXDB-2065][ING] Make stop timeout configurable
..

[ASTERIXDB-2065][ING] Make stop timeout configurable

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Make timeout of a graceful stop of an active job
  configurable.

Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/TestEventsListener.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
3 files changed, 15 insertions(+), 7 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/45/2845/4
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2845
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][FAIL] Improve Error Message

2018-08-03 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][FAIL] Improve Error Message
..


Patch Set 1: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2843
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0b7d4663452e83007cafed4dcd54aedbf09bdc84
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [ASTERIXDB-2065][ING] Make stop timeout configurable

2018-08-03 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2845

to look at the new patch set (#3).

Change subject: [ASTERIXDB-2065][ING] Make stop timeout configurable
..

[ASTERIXDB-2065][ING] Make stop timeout configurable

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Make timeout of a graceful stop of an active job
  configurable.

Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
2 files changed, 14 insertions(+), 6 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/45/2845/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2845
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [ASTERIXDB-2065][ING] Make stop timeout configurable

2018-08-03 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new patch set (#2).

Change subject: [ASTERIXDB-2065][ING] Make stop timeout configurable
..

[ASTERIXDB-2065][ING] Make stop timeout configurable

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Make timeout of a graceful stop of an active job
  configurable.

Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
2 files changed, 20 insertions(+), 6 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/45/2845/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2845
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [ASTERIXDB-2065][ING] Make stop timeout configurable

2018-08-03 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2845

Change subject: [ASTERIXDB-2065][ING] Make stop timeout configurable
..

[ASTERIXDB-2065][ING] Make stop timeout configurable

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Make timeout of a graceful stop of an active job
  configurable.

Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
2 files changed, 14 insertions(+), 6 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/45/2845/1

diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
index b5432c5..2b53b6d 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
@@ -74,10 +74,7 @@
 private static final EnumSet TRANSITION_STATES = 
EnumSet.of(ActivityState.RESUMING,
 ActivityState.STARTING, ActivityState.STOPPING, 
ActivityState.RECOVERING, ActivityState.CANCELLING);
 private static final String DEFAULT_ACTIVE_STATS = "{\"Stats\":\"N/A\"}";
-// TODO: Make configurable 
https://issues.apache.org/jira/browse/ASTERIXDB-2065
-protected static final long STOP_MESSAGE_TIMEOUT = 5L;
-protected static final long SUSPEND_MESSAGE_TIMEOUT = 10L;
-protected static final TimeUnit TIMEOUT_UNIT = TimeUnit.MINUTES;
+protected static final TimeUnit TIMEOUT_UNIT = TimeUnit.SECONDS;
 protected final IClusterStateManager clusterStateManager;
 protected final ActiveNotificationHandler handler;
 protected final List subscribers = new 
ArrayList<>();
@@ -517,7 +514,7 @@
 } else if (state == ActivityState.RUNNING) {
 setState(ActivityState.STOPPING);
 try {
-doStop(metadataProvider, STOP_MESSAGE_TIMEOUT, TIMEOUT_UNIT);
+doStop(metadataProvider, 
appCtx.getActiveProperties().getActiveStopTimeout(), TIMEOUT_UNIT);
 } catch (Exception e) {
 setState(ActivityState.STOPPED);
 LOGGER.log(Level.ERROR, "Failed to stop the entity " + 
entityId, e);
diff --git 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
index 8455a6f..75c6fde 100644
--- 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
+++ 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
@@ -18,6 +18,7 @@
  */
 package org.apache.asterix.common.config;
 
+import static org.apache.hyracks.control.common.config.OptionTypes.INTEGER;
 import static 
org.apache.hyracks.control.common.config.OptionTypes.LONG_BYTE_UNIT;
 import static org.apache.hyracks.util.StorageUtil.StorageUnit.MEGABYTE;
 
@@ -32,7 +33,9 @@
 ACTIVE_MEMORY_GLOBAL_BUDGET(
 LONG_BYTE_UNIT,
 StorageUtil.getLongSizeInBytes(64L, MEGABYTE),
-"The memory budget (in bytes) for the active runtime");
+"The memory budget (in bytes) for the active runtime"),
+ACTIVE_STOP_TIMEOUT(INTEGER, 300, "The maximum time to wait for a 
graceful stop of an active runtime"),
+ACTIVE_SUSPEND_TIMEOUT(INTEGER, 600, "The maximum time to wait for a 
graceful suspend of an active runtime");
 
 private final IOptionType type;
 private final Object defaultValue;
@@ -72,4 +75,12 @@
 public long getMemoryComponentGlobalBudget() {
 return accessor.getLong(Option.ACTIVE_MEMORY_GLOBAL_BUDGET);
 }
+
+public int getActiveStopTimeout() {
+return accessor.getInt(Option.ACTIVE_STOP_TIMEOUT);
+}
+
+public int getActiveSuspendTimeout() {
+return accessor.getInt(Option.ACTIVE_SUSPEND_TIMEOUT);
+}
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2845
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8d0c205a6959967dbce2b7223061ffa2f26059c
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][STO] Skip flush recovery of empty resources

2018-08-03 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][STO] Skip flush recovery of empty resources
..


Patch Set 2: Code-Review+1

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2844
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib01d7513f43830109632760860d34ca3dcddeaee
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin 
Gerrit-Reviewer: Ian Maxon 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Luo Chen 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][STO] Skip flush recovery of empty resources

2018-08-03 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new patch set (#2).

Change subject: [NO ISSUE][STO] Skip flush recovery of empty resources
..

[NO ISSUE][STO] Skip flush recovery of empty resources

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Before this change, recovery would throw a NullPointerException
  on recovery of a flush operation on a component without
  update logs.
- Since this can happen, we simply check for the case and skip the
  flush.

Change-Id: Ib01d7513f43830109632760860d34ca3dcddeaee
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
1 file changed, 18 insertions(+), 12 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/44/2844/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2844
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib01d7513f43830109632760860d34ca3dcddeaee
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: [NO ISSUE][STO] Skip flush recovery of empty resources

2018-08-03 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2844

Change subject: [NO ISSUE][STO] Skip flush recovery of empty resources
..

[NO ISSUE][STO] Skip flush recovery of empty resources

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Before this change, recovery would throw a NullPointerException
  on recovery of a flush operation on a component without
  update logs.
- Since this can happen, we simply check for the case and skip the
  flush.

Change-Id: Ib01d7513f43830109632760860d34ca3dcddeaee
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
1 file changed, 19 insertions(+), 13 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/44/2844/1

diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
index 5e8a5e8..ee75be1 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
@@ -296,7 +296,7 @@
 ((INcApplicationContext) 
(serviceCtx.getApplicationContext())).getIndexCheckpointManagerProvider();
 
 Map resourcesMap = 
localResourceRepository.loadAndGetAllResources();
-Map resourceId2MaxLSNMap = new HashMap<>();
+final Map resourceId2MaxLSNMap = new HashMap<>();
 TxnEntityId tempKeyTxnEntityId = new TxnEntityId(-1, -1, -1, null, -1, 
false);
 
 ILogRecord logRecord = null;
@@ -399,19 +399,25 @@
 // we only need to flush open indexes here (opened 
by previous update records)
 // if an index has no ongoing updates, then it's 
memory component must be empty
 // and there is nothing to flush
-for (IndexInfo iInfo : 
dsInfo.getIndexes().values()) {
+for (final IndexInfo iInfo : 
dsInfo.getIndexes().values()) {
 if (iInfo.isOpen() && iInfo.getPartition() == 
partition) {
-maxDiskLastLsn = 
resourceId2MaxLSNMap.get(iInfo.getResourceId());
-index = iInfo.getIndex();
-if (logRecord.getLSN() > maxDiskLastLsn
-&& 
!index.isCurrentMutableComponentEmpty()) {
-// schedule flush
-redoFlush(index, logRecord);
-redoCount++;
-} else {
-// otherwise, do nothing since this 
component had no records when flush was
-// scheduled.. TODO: update checkpoint 
file? and do the
-// lsn checks from the checkpoint file
+Long maxLsnBeforeFlush = 
resourceId2MaxLSNMap.get(iInfo.getResourceId());
+if (maxLsnBeforeFlush != null) {
+// If there was at least one update to 
the resource.
+// IMPORTANT: Don't remove the check 
above
+// This check is to support indexes 
without transaction logs
+maxDiskLastLsn = maxLsnBeforeFlush;
+index = iInfo.getIndex();
+if (logRecord.getLSN() > maxDiskLastLsn
+&& 
!index.isCurrentMutableComponentEmpty()) {
+// schedule flush
+redoFlush(index, logRecord);
+redoCount++;
+} else {
+// otherwise, do nothing since 
this component had no records when flush was
+// scheduled.. TODO: update 
checkpoint file? and do the
+// lsn checks from the checkpoint 
file
+}
 }
 }
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2844
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib01d7513f43830109632760860d34ca3dcddeaee
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][ING] Increase timeout for stopping ingestion

2018-08-02 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][ING] Increase timeout for stopping ingestion
..


[NO ISSUE][ING] Increase timeout for stopping ingestion

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- To allow systems under high load enough time to push
  accumulated data to storage, we increased the default
  timeout for stopping active entities to 5 minutes.

Change-Id: I3e590b1c7fdc0eb9be34d82b4b2ac1b2a2eef515
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2841
Reviewed-by: Murtadha Hubail 
Sonar-Qube: Jenkins 
Integration-Tests: Jenkins 
Tested-by: Jenkins 
Contrib: Jenkins 
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; No violations found; ; Verified
  Murtadha Hubail: Looks good to me, approved



diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
index 345080c..b5432c5 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
@@ -75,8 +75,8 @@
 ActivityState.STARTING, ActivityState.STOPPING, 
ActivityState.RECOVERING, ActivityState.CANCELLING);
 private static final String DEFAULT_ACTIVE_STATS = "{\"Stats\":\"N/A\"}";
 // TODO: Make configurable 
https://issues.apache.org/jira/browse/ASTERIXDB-2065
-protected static final long STOP_MESSAGE_TIMEOUT = 2L;
-protected static final long SUSPEND_MESSAGE_TIMEOUT = 5L;
+protected static final long STOP_MESSAGE_TIMEOUT = 5L;
+protected static final long SUSPEND_MESSAGE_TIMEOUT = 10L;
 protected static final TimeUnit TIMEOUT_UNIT = TimeUnit.MINUTES;
 protected final IClusterStateManager clusterStateManager;
 protected final ActiveNotificationHandler handler;

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2841
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e590b1c7fdc0eb9be34d82b4b2ac1b2a2eef515
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][ING] Increase timeout for stopping ingestion

2018-08-02 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has posted comments on this change.

Change subject: [NO ISSUE][ING] Increase timeout for stopping ingestion
..


Patch Set 1:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/2841/1/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
File 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java:

PS1, Line 77: // TODO: Make configurable 
https://issues.apache.org/jira/browse/ASTERIXDB-2065
> can we do this already?  there's never going to be a single value that make
Will do that in a subsequent change. For now, need this in.


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2841
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3e590b1c7fdc0eb9be34d82b4b2ac1b2a2eef515
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: Yes


Change in asterixdb[master]: [NO ISSUE][STO] Notify completiong of IO request in finally

2018-08-02 Thread abdullah alamoudi (Code Review)
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2839

to look at the new patch set (#3).

Change subject: [NO ISSUE][STO] Notify completiong of IO request in finally
..

[NO ISSUE][STO] Notify completiong of IO request in finally

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Notify completion of a request in a finally clause to ensure
  waiting thread is always notified.

Change-Id: I8b3003b47b6b181856faf82aca6e828ee014527c
---
M 
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/IoRequest.java
M 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
2 files changed, 12 insertions(+), 10 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/39/2839/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2839
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8b3003b47b6b181856faf82aca6e828ee014527c
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 


Change in asterixdb[master]: [NO ISSUE][ING] Increase timeout for stopping ingestion

2018-08-02 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2841

Change subject: [NO ISSUE][ING] Increase timeout for stopping ingestion
..

[NO ISSUE][ING] Increase timeout for stopping ingestion

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- To allow systems under high load enough time to push
  accumulated data to storage, we increased the default
  timeout for stopping active entities to 5 minutes.

Change-Id: I3e590b1c7fdc0eb9be34d82b4b2ac1b2a2eef515
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/41/2841/1

diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
index 345080c..b5432c5 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
@@ -75,8 +75,8 @@
 ActivityState.STARTING, ActivityState.STOPPING, 
ActivityState.RECOVERING, ActivityState.CANCELLING);
 private static final String DEFAULT_ACTIVE_STATS = "{\"Stats\":\"N/A\"}";
 // TODO: Make configurable 
https://issues.apache.org/jira/browse/ASTERIXDB-2065
-protected static final long STOP_MESSAGE_TIMEOUT = 2L;
-protected static final long SUSPEND_MESSAGE_TIMEOUT = 5L;
+protected static final long STOP_MESSAGE_TIMEOUT = 5L;
+protected static final long SUSPEND_MESSAGE_TIMEOUT = 10L;
 protected static final TimeUnit TIMEOUT_UNIT = TimeUnit.MINUTES;
 protected final IClusterStateManager clusterStateManager;
 protected final ActiveNotificationHandler handler;

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2841
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e590b1c7fdc0eb9be34d82b4b2ac1b2a2eef515
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 


Change in asterixdb[master]: [NO ISSUE][STO] Notify completiong of IO request in finally

2018-08-02 Thread abdullah alamoudi (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2839

to look at the new patch set (#2).

Change subject: [NO ISSUE][STO] Notify completiong of IO request in finally
..

[NO ISSUE][STO] Notify completiong of IO request in finally

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Notify completion of a request in a finally clause to ensure
  waiting thread is always notified.

Change-Id: I8b3003b47b6b181856faf82aca6e828ee014527c
---
M 
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/IoRequest.java
M 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
2 files changed, 18 insertions(+), 14 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/39/2839/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2839
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8b3003b47b6b181856faf82aca6e828ee014527c
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 


  1   2   3   4   5   6   7   8   9   10   >