You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2020/06/19 12:32:25 UTC
[asterixdb] branch master updated (51c5b05 -> 60b27fc)
This is an automated email from the ASF dual-hosted git repository.
mblow pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git.
from 51c5b05 Merge "Merge commit '0163af68d0' from 'gerrit/mad-hatter'"
new 8ef9889 [NO ISSUE][MISC] HyracksException.getParams() type, += Throwing helpers
new 619b8c5 [ASTERIXDB-2743][EXT] Skip not found files when querying S3 external dataset
new 2d5bd95 [NO ISSUE] update log4j -> 2.13.3
new 605b81c Merge from branch 'gerrit/stabilization-f69489'
new e6dac7c [ASTERIXDB-2744][COMP] Fix compiler error during index selection
new 60b27fc Merge branch 'gerrit/mad-hatter'
The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../optimizer/rules/am/BTreeAccessMethod.java | 3 +-
asterixdb/asterix-app/pom.xml | 1 -
.../asterix/test/runtime/ExecutionTestUtil.java | 17 +++++++----
.../btree-composite-key-non-enforced-04.sqlpp | 33 ++++++++++++++++++++
.../btree-composite-key-non-enforced-04.plan | 17 +++++++++++
.../btree-index-composite-key-04.1.ddl.sqlpp | 29 ++++++++++++++++++
.../btree-index-composite-key-04.2.update.sqlpp | 35 ++++++++++++++++++++++
.../btree-index-composite-key-04.3.query.sqlpp | 24 +++++++++++++++
.../btree-index-composite-key-04.3.adm} | 0
.../test/resources/runtimets/testsuite_sqlpp.xml | 5 ++++
.../input/record/reader/aws/AwsS3InputStream.java | 11 +++++++
asterixdb/pom.xml | 1 +
.../hyracks/api/exceptions/HyracksException.java | 2 +-
.../org/apache/hyracks/util/ThrowingFunction.java | 24 +++++++++++++++
.../org/apache/hyracks/util/ThrowingSupplier.java | 24 +++++++++++++++
hyracks-fullstack/pom.xml | 10 +++++--
16 files changed, 225 insertions(+), 11 deletions(-)
create mode 100644 asterixdb/asterix-app/src/test/resources/optimizerts/queries/open-index-non-enforced/btree-composite-key-non-enforced/btree-composite-key-non-enforced-04.sqlpp
create mode 100644 asterixdb/asterix-app/src/test/resources/optimizerts/results/open-index-non-enforced/btree-composite-key-non-enforced/btree-composite-key-non-enforced-04.plan
create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.1.ddl.sqlpp
create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.2.update.sqlpp
create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.3.query.sqlpp
copy asterixdb/asterix-app/src/test/resources/runtimets/results/{resolution/field_accessor_1/field_accessor_1.7.adm => open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.3.adm} (100%)
create mode 100644 hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingFunction.java
create mode 100644 hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingSupplier.java
[asterixdb] 06/06: Merge branch 'gerrit/mad-hatter'
Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 60b27fc1e367302948cad211787ad4aef62620c2
Merge: 51c5b05 e6dac7c
Author: Michael Blow <mb...@apache.org>
AuthorDate: Thu Jun 18 21:12:31 2020 -0400
Merge branch 'gerrit/mad-hatter'
Change-Id: I7894843a40748c44dcfc3c6a118c663bb25b3586
.../optimizer/rules/am/BTreeAccessMethod.java | 3 +-
asterixdb/asterix-app/pom.xml | 1 -
.../asterix/test/runtime/ExecutionTestUtil.java | 17 +++++++----
.../btree-composite-key-non-enforced-04.sqlpp | 33 ++++++++++++++++++++
.../btree-composite-key-non-enforced-04.plan | 17 +++++++++++
.../btree-index-composite-key-04.1.ddl.sqlpp | 29 ++++++++++++++++++
.../btree-index-composite-key-04.2.update.sqlpp | 35 ++++++++++++++++++++++
.../btree-index-composite-key-04.3.query.sqlpp | 24 +++++++++++++++
.../btree-index-composite-key-04.3.adm | 1 +
.../test/resources/runtimets/testsuite_sqlpp.xml | 5 ++++
.../input/record/reader/aws/AwsS3InputStream.java | 11 +++++++
asterixdb/pom.xml | 1 +
.../hyracks/api/exceptions/HyracksException.java | 2 +-
.../org/apache/hyracks/util/ThrowingFunction.java | 24 +++++++++++++++
.../org/apache/hyracks/util/ThrowingSupplier.java | 24 +++++++++++++++
hyracks-fullstack/pom.xml | 10 +++++--
16 files changed, 226 insertions(+), 11 deletions(-)
[asterixdb] 05/06: [ASTERIXDB-2744][COMP] Fix compiler error during
index selection
Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit e6dac7c4e059782367d58b0ff48fdd47e10e4d5c
Author: Dmitry Lychagin <dm...@couchbase.com>
AuthorDate: Thu Jun 11 13:33:26 2020 -0700
[ASTERIXDB-2744][COMP] Fix compiler error during index selection
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Fix NullPointerException in BTreeAccessMethod.createKeyVarsAndExprs()
when there is a composite key.
Change-Id: Ie49a5940afa35c3c2af26a7e7f029a1f73e469f3
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/6743
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Ali Alsuliman <al...@gmail.com>
---
.../optimizer/rules/am/BTreeAccessMethod.java | 3 +-
.../btree-composite-key-non-enforced-04.sqlpp | 33 ++++++++++++++++++++
.../btree-composite-key-non-enforced-04.plan | 17 +++++++++++
.../btree-index-composite-key-04.1.ddl.sqlpp | 29 ++++++++++++++++++
.../btree-index-composite-key-04.2.update.sqlpp | 35 ++++++++++++++++++++++
.../btree-index-composite-key-04.3.query.sqlpp | 24 +++++++++++++++
.../btree-index-composite-key-04.3.adm | 1 +
.../test/resources/runtimets/testsuite_sqlpp.xml | 5 ++++
8 files changed, 146 insertions(+), 1 deletion(-)
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/BTreeAccessMethod.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/BTreeAccessMethod.java
index 4b6fc36..164a505 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/BTreeAccessMethod.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/BTreeAccessMethod.java
@@ -570,8 +570,9 @@ public class BTreeAccessMethod implements IAccessMethod {
if (lowKeyLimits[0] == null && lowKeyLimits[i] != null || lowKeyLimits[0] != null && lowKeyLimits[i] == null
|| highKeyLimits[0] == null && highKeyLimits[i] != null
|| highKeyLimits[0] != null && highKeyLimits[i] == null) {
- numSecondaryKeys--;
+ numSecondaryKeys = i;
primaryIndexPostProccessingIsNeeded = true;
+ break;
}
}
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/open-index-non-enforced/btree-composite-key-non-enforced/btree-composite-key-non-enforced-04.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/open-index-non-enforced/btree-composite-key-non-enforced/btree-composite-key-non-enforced-04.sqlpp
new file mode 100644
index 0000000..583dc72
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/open-index-non-enforced/btree-composite-key-non-enforced/btree-composite-key-non-enforced-04.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+/*
+* Description : Index selection for non-enforced indexes.
+* Expected Res : Success
+*/
+drop dataverse test if exists;
+create dataverse test;
+use test;
+
+create dataset TestOpen(c_id int64 not unknown) open type primary key c_id;
+
+create index idx_xyz on TestOpen(c_x:string, c_y:int64, c_z:string);
+
+select value t.c_value
+from TestOpen t
+where c_x = "x2" AND c_y > 1 AND c_z = "z2";
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/open-index-non-enforced/btree-composite-key-non-enforced/btree-composite-key-non-enforced-04.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/open-index-non-enforced/btree-composite-key-non-enforced/btree-composite-key-non-enforced-04.plan
new file mode 100644
index 0000000..f7c87c1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/open-index-non-enforced/btree-composite-key-non-enforced/btree-composite-key-non-enforced-04.plan
@@ -0,0 +1,17 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STABLE_SORT [$$29(ASC)] |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- BTREE_SEARCH |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.1.ddl.sqlpp
new file mode 100644
index 0000000..dea0b9c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.1.ddl.sqlpp
@@ -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.
+ */
+/*
+* Description : Index selection for non-enforced indexes.
+* Expected Res : Success
+*/
+drop dataverse test if exists;
+create dataverse test;
+use test;
+
+create dataset TestOpen(c_id int64 not unknown) open type primary key c_id;
+
+create index idx_xyz on TestOpen(c_x:string, c_y:int64, c_z:string);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.2.update.sqlpp
new file mode 100644
index 0000000..2b7580d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.2.update.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+use test;
+
+insert into TestOpen ({
+ "c_id": 1,
+ "c_x": "x1",
+ "c_y": 1,
+ "c_z": "z1",
+ "c_value": 1
+});
+insert into TestOpen ({
+ "c_id": 2,
+ "c_x": "x2",
+ "c_y": 2,
+ "c_z": "z2",
+ "c_value": 2
+});
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.3.query.sqlpp
new file mode 100644
index 0000000..9bd5957
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+use test;
+
+select value t.c_value
+from TestOpen t
+where c_x = "x2" AND c_y > 1 AND c_z = "z2";
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.3.adm
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/open-index-non-enforced/index-selection/btree-index-composite-key-04/btree-index-composite-key-04.3.adm
@@ -0,0 +1 @@
+2
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index f127fbd..06ccf56 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -6639,6 +6639,11 @@
<output-dir compare="Text">btree-index-composite-key-03</output-dir>
</compilation-unit>
</test-case>
+ <test-case FilePath="open-index-non-enforced/index-selection">
+ <compilation-unit name="btree-index-composite-key-04">
+ <output-dir compare="Text">btree-index-composite-key-04</output-dir>
+ </compilation-unit>
+ </test-case>
<test-case FilePath="open-index-non-enforced/correlated-index-selection">
<compilation-unit name="btree-index-01">
<output-dir compare="Text">btree-index-01</output-dir>
[asterixdb] 04/06: Merge from branch 'gerrit/stabilization-f69489'
Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 605b81cb372693528fc81e4a66431b6a46778be7
Merge: 619b8c5 2d5bd95
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Sun Jun 14 08:40:38 2020 -0400
Merge from branch 'gerrit/stabilization-f69489'
Change-Id: I388f3af0307d5482da4cfd559a7373fa4887c425
asterixdb/asterix-app/pom.xml | 1 -
asterixdb/pom.xml | 1 +
hyracks-fullstack/pom.xml | 10 ++++++++--
3 files changed, 9 insertions(+), 3 deletions(-)
diff --cc asterixdb/pom.xml
index 9daf70f,81e53c5..72a658e
--- a/asterixdb/pom.xml
+++ b/asterixdb/pom.xml
@@@ -73,15 -71,13 +73,16 @@@
<global.itest.excludes/>
<itest.includes>${global.itest.includes}</itest.includes>
<itest.excludes>${global.itest.excludes}</itest.excludes>
+ <license.stage>compile</license.stage>
+ <resource.stage>process-classes</resource.stage>
<!-- Versions under dependencymanagement or used in many projects via properties -->
- <algebricks.version>0.3.4.2-SNAPSHOT</algebricks.version>
- <hyracks.version>0.3.4.2-SNAPSHOT</hyracks.version>
+ <algebricks.version>0.3.5-SNAPSHOT</algebricks.version>
+ <hyracks.version>0.3.5-SNAPSHOT</hyracks.version>
<hadoop.version>2.8.5</hadoop.version>
<jacoco.version>0.7.6.201602180812</jacoco.version>
+ <log4j.version>2.13.3</log4j.version>
+ <awsjavasdk.version>2.10.83</awsjavasdk.version>
<implementation.title>Apache AsterixDB - ${project.name}</implementation.title>
<implementation.url>https://asterixdb.apache.org/</implementation.url>
[asterixdb] 02/06: [ASTERIXDB-2743][EXT] Skip not found files when
querying S3 external dataset
Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 619b8c53b95bb4a67a6a527fbf41a63b0522173e
Author: Hussain Towaileb <Hu...@Gmail.com>
AuthorDate: Thu Jun 11 17:49:45 2020 +0300
[ASTERIXDB-2743][EXT] Skip not found files when querying S3 external dataset
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- When querying an S3 external dataset, if some files are not found
due to possiblity getting deleted while querying, skip the filies
and continue to the next ones instead of failing.
Change-Id: I6d3e691a1714228f1844faf05095cf8aa439ea1d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/6723
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Hussain Towaileb <hu...@gmail.com>
Reviewed-by: Ali Alsuliman <al...@gmail.com>
---
.../external/input/record/reader/aws/AwsS3InputStream.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/aws/AwsS3InputStream.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/aws/AwsS3InputStream.java
index bcbf540..9e10e6a 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/aws/AwsS3InputStream.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/record/reader/aws/AwsS3InputStream.java
@@ -33,13 +33,19 @@ import org.apache.asterix.external.util.ExternalDataConstants;
import org.apache.asterix.external.util.ExternalDataUtils;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.api.util.CleanupUtils;
+import org.apache.hyracks.util.LogRedactionUtil;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import software.amazon.awssdk.core.exception.SdkException;
import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.model.GetObjectRequest;
+import software.amazon.awssdk.services.s3.model.NoSuchKeyException;
public class AwsS3InputStream extends AbstractMultipleInputStream {
+ private static final Logger LOGGER = LogManager.getLogger();
+
// Configuration
private final Map<String, String> configuration;
@@ -83,6 +89,11 @@ public class AwsS3InputStream extends AbstractMultipleInputStream {
// the header, then the S3 stream gets closed in the close method
try {
in = s3Client.getObject(getObjectRequest);
+ } catch (NoSuchKeyException ex) {
+ LOGGER.debug(() -> "Key " + LogRedactionUtil.userData(getObjectRequest.key()) + " was not found in bucket "
+ + getObjectRequest.bucket());
+ nextFileIndex++;
+ return advance();
} catch (SdkException ex) {
throw new RuntimeDataException(ErrorCode.EXTERNAL_SOURCE_ERROR, ex.getMessage());
}
[asterixdb] 01/06: [NO ISSUE][MISC] HyracksException.getParams()
type, += Throwing helpers
Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 8ef98896877ee33d0480a916ed070487634f29d7
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Tue Jun 9 16:48:11 2020 -0400
[NO ISSUE][MISC] HyracksException.getParams() type, += Throwing helpers
Change-Id: I0aa740452d40719da33bcb25ecec6c09e45c9dd1
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/6703
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Ali Alsuliman <al...@gmail.com>
---
.../asterix/test/runtime/ExecutionTestUtil.java | 17 +++++++++------
.../hyracks/api/exceptions/HyracksException.java | 2 +-
.../org/apache/hyracks/util/ThrowingFunction.java | 24 ++++++++++++++++++++++
.../org/apache/hyracks/util/ThrowingSupplier.java | 24 ++++++++++++++++++++++
4 files changed, 60 insertions(+), 7 deletions(-)
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ExecutionTestUtil.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ExecutionTestUtil.java
index 4ed36c6..30ebc1d 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ExecutionTestUtil.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ExecutionTestUtil.java
@@ -19,7 +19,6 @@
package org.apache.asterix.test.runtime;
import java.io.File;
-import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
@@ -34,6 +33,7 @@ import org.apache.asterix.testframework.xml.TestSuite;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.hyracks.api.config.IOption;
import org.apache.hyracks.control.nc.NodeControllerService;
+import org.apache.hyracks.util.ThrowingSupplier;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -123,8 +123,12 @@ public class ExecutionTestUtil {
HDFSCluster.getInstance().cleanup();
}
+ saveFailedXml(() -> File.createTempFile("failed", ".xml"));
+ }
+
+ public static void saveFailedXml(ThrowingSupplier<File> destFileSupplier) throws Exception {
if (FailedGroup != null && FailedGroup.getTestCase().size() > 0) {
- File temp = File.createTempFile("failed", ".xml");
+ File failedFile = destFileSupplier.get();
javax.xml.bind.JAXBContext jaxbCtx = null;
jaxbCtx = javax.xml.bind.JAXBContext.newInstance(TestSuite.class.getPackage().getName());
javax.xml.bind.Marshaller marshaller = null;
@@ -133,11 +137,12 @@ public class ExecutionTestUtil {
TestSuite failedSuite = new TestSuite();
failedSuite.setResultOffsetPath("results");
failedSuite.setQueryOffsetPath("queries");
+ failedSuite.setQueryFileExtension(".sqlpp");
failedSuite.getTestGroup().add(FailedGroup);
- marshaller.marshal(failedSuite, temp);
- System.err.println("The failed.xml is written to :" + temp.getAbsolutePath()
- + ". You can copy it to only.xml by the following cmd:" + "\rcp " + temp.getAbsolutePath() + " "
- + Paths.get("./src/test/resources/runtimets/only.xml").toAbsolutePath());
+ marshaller.marshal(failedSuite, failedFile);
+ LOGGER.error("#####");
+ LOGGER.error("##### the failed.xml is written to {}", failedFile.getAbsolutePath());
+ LOGGER.error("#####");
}
}
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksException.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksException.java
index 89e46de..46a9b66 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksException.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksException.java
@@ -130,7 +130,7 @@ public class HyracksException extends IOException implements IFormattedException
return errorCode;
}
- public Object[] getParams() {
+ public Serializable[] getParams() {
return params;
}
diff --git a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingFunction.java b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingFunction.java
new file mode 100644
index 0000000..d18b41b
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingFunction.java
@@ -0,0 +1,24 @@
+/*
+ * 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.hyracks.util;
+
+@FunctionalInterface
+public interface ThrowingFunction<I, R> {
+ R process(I input) throws Exception;
+}
diff --git a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingSupplier.java b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingSupplier.java
new file mode 100644
index 0000000..28f5e29
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ThrowingSupplier.java
@@ -0,0 +1,24 @@
+/*
+ * 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.hyracks.util;
+
+@FunctionalInterface
+public interface ThrowingSupplier<T> {
+ T get() throws Exception;
+}
[asterixdb] 03/06: [NO ISSUE] update log4j -> 2.13.3
Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 2d5bd95fc75b08acb0dbb92f1e6b1d327a4d96db
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Sat Jun 13 12:51:06 2020 -0400
[NO ISSUE] update log4j -> 2.13.3
Change-Id: Ic447ac0a092af188e4a420d68d726367efd19514
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/6783
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Hussain Towaileb <hu...@gmail.com>
---
asterixdb/asterix-app/pom.xml | 1 -
asterixdb/pom.xml | 1 +
hyracks-fullstack/pom.xml | 10 ++++++++--
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/asterixdb/asterix-app/pom.xml b/asterixdb/asterix-app/pom.xml
index b10265d..d23f760 100644
--- a/asterixdb/asterix-app/pom.xml
+++ b/asterixdb/asterix-app/pom.xml
@@ -639,7 +639,6 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jul</artifactId>
- <version>2.12.1</version>
</dependency>
<dependency>
<groupId>org.apache.asterix</groupId>
diff --git a/asterixdb/pom.xml b/asterixdb/pom.xml
index c05e236..81e53c5 100644
--- a/asterixdb/pom.xml
+++ b/asterixdb/pom.xml
@@ -77,6 +77,7 @@
<hyracks.version>0.3.4.2-SNAPSHOT</hyracks.version>
<hadoop.version>2.8.5</hadoop.version>
<jacoco.version>0.7.6.201602180812</jacoco.version>
+ <log4j.version>2.13.3</log4j.version>
<implementation.title>Apache AsterixDB - ${project.name}</implementation.title>
<implementation.url>https://asterixdb.apache.org/</implementation.url>
diff --git a/hyracks-fullstack/pom.xml b/hyracks-fullstack/pom.xml
index aa989be..d8168ef 100644
--- a/hyracks-fullstack/pom.xml
+++ b/hyracks-fullstack/pom.xml
@@ -69,6 +69,7 @@
<!-- Versions under dependencymanagement or used in many projects via properties -->
<hadoop.version>2.8.5</hadoop.version>
<jacoco.version>0.7.6.201602180812</jacoco.version>
+ <log4j.version>2.13.3</log4j.version>
<implementation.title>Apache Hyracks and Algebricks - ${project.name}</implementation.title>
<implementation.url>https://asterixdb.apache.org/</implementation.url>
@@ -228,12 +229,17 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
- <version>2.13.1</version>
+ <version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
- <version>2.13.1</version>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-jul</artifactId>
+ <version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>