From notifications-return-158091-archive-asf-public=cust-asf.ponee.io@asterixdb.apache.org Mon Jun 7 00:06:45 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 3A08E180658 for ; Mon, 7 Jun 2021 02:06:45 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id 92CD45FDF1 for ; Mon, 7 Jun 2021 00:06:44 +0000 (UTC) Received: (qmail 68730 invoked by uid 500); 7 Jun 2021 00:06:44 -0000 Mailing-List: contact notifications-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list notifications@asterixdb.apache.org Received: (qmail 68712 invoked by uid 99); 7 Jun 2021 00:06:43 -0000 Received: from spamproc1-he-de.apache.org (HELO spamproc1-he-de.apache.org) (116.203.196.100) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2021 00:06:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamproc1-he-de.apache.org (ASF Mail Server at spamproc1-he-de.apache.org) with ESMTP id 8447F1FF47E for ; Mon, 7 Jun 2021 00:06:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamproc1-he-de.apache.org X-Spam-Flag: NO X-Spam-Score: 0.213 X-Spam-Level: X-Spam-Status: No, score=0.213 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=0.2, SPF_NONE=0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=disabled Received: from mx1-ec2-va.apache.org ([116.203.227.195]) by localhost (spamproc1-he-de.apache.org [116.203.196.100]) (amavisd-new, port 10024) with ESMTP id Xf8qaOErUW6q for ; Mon, 7 Jun 2021 00:06:41 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=128.195.1.133; helo=adrian-monk-v3.ics.uci.edu; envelope-from=do-not-reply@asterix-gerrit.ics.uci.edu; receiver= Received: from adrian-monk-v3.ics.uci.edu (adrian-monk-v3.ics.uci.edu [128.195.1.133]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 04441BDAE2 for ; Mon, 7 Jun 2021 00:06:40 +0000 (UTC) Received: from 9a050bd1316f (vitalstatistix.ics.uci.edu [128.195.52.38]) by adrian-monk-v3.ics.uci.edu (Postfix) with ESMTP id 12AD4C02A0CC; Sun, 6 Jun 2021 17:06:38 -0700 (PDT) X-Gerrit-PatchSet: 1 Date: Mon, 7 Jun 2021 00:06:38 +0000 From: AsterixDB Code Review To: Till Westmann Message-ID: Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange Subject: Change in asterixdb[cheshire-cat]: [NO ISSUE] Misc utility / cleanup X-Gerrit-Change-Id: Iae424fb99220630cb3a240cfef4cbba39b9da06b X-Gerrit-Change-Number: 11803 X-Gerrit-Project: asterixdb X-Gerrit-ChangeURL: X-Gerrit-Commit: e37b9a23a8240878e2dca40da77306dfe3194ab4 References: Reply-To: mblow@apache.org, dmitry.lychagin@couchbase.com, notifications@asterixdb.apache.org, lwhaywhu@gmail.com, tillw@apache.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.12 Content-Type: multipart/alternative; boundary="hlUHjGosf1A="; charset=UTF-8 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: 12AD4C02A0CC.A7166 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.985, required 5, ALL_TRUSTED -1.00, FSL_HELO_NON_FQDN_1 0.00, HELO_NO_DOMAIN 0.00, HTML_MESSAGE 0.00, T_KAM_HTML_FONT_INVALID 0.01, URIBL_BLOCKED 0.00, WEIRD_PORT 0.00) X-ICS-MailScanner-From: do-not-reply@asterix-gerrit.ics.uci.edu --hlUHjGosf1A= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From Michael Blow : Michael Blow has uploaded this cha= nge for review=2E ( https://asterix-gerrit=2Eics=2Euci=2Eedu/c/asterixdb/+/= 11803 ) Change subject: [NO ISSUE] Misc utility / cleanup =2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E [NO ISSUE] Misc utility / cl= eanup Change-Id: Iae424fb99220630cb3a240cfef4cbba39b9da06b --- M hyracks-f= ullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/Hyra= cksThrowingConsumer=2Ejava M hyracks-fullstack/hyracks/hyracks-util/src/mai= n/java/org/apache/hyracks/util/Span=2Ejava 2 files changed, 28 insertions(+= ), 1 deletion(-) git pull ssh://asterix-gerrit=2Eics=2Euci=2Eedu:29418= /asterixdb refs/changes/03/11803/1 diff --git a/hyracks-fullstack/hyracks/= hyracks-api/src/main/java/org/apache/hyracks/api/util/HyracksThrowingConsum= er=2Ejava b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/= hyracks/api/util/HyracksThrowingConsumer=2Ejava index b677132=2E=2E765f9d7 = 100644 --- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache= /hyracks/api/util/HyracksThrowingConsumer=2Ejava +++ b/hyracks-fullstack/hy= racks/hyracks-api/src/main/java/org/apache/hyracks/api/util/HyracksThrowing= Consumer=2Ejava @@ -18,9 +18,25 @@ */ package org=2Eapache=2Ehyracks=2Ea= pi=2Eutil; +import java=2Eutil=2Efunction=2EConsumer; + import org=2Eapa= che=2Ehyracks=2Eapi=2Eexceptions=2EHyracksDataException; +import com=2Ego= ogle=2Ecommon=2Eutil=2Econcurrent=2EUncheckedExecutionException; + @Functi= onalInterface public interface HyracksThrowingConsumer { - void proc= ess(V value) throws HyracksDataException; + void accept(V value) throws = HyracksDataException; + + @SuppressWarnings("Duplicates") + static Consumer asUnchecked(HyracksThrowingConsumer consumer) { + r= eturn input -> { + try { + consumer=2Eaccept(inpu= t); + } catch (HyracksDataException e) { + throw = new UncheckedExecutionException(e); + } + }; + } + } = diff --git a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apach= e/hyracks/util/Span=2Ejava b/hyracks-fullstack/hyracks/hyracks-util/src/mai= n/java/org/apache/hyracks/util/Span=2Ejava index dc8bc11=2E=2E1a40360 10064= 4 --- a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyr= acks/util/Span=2Ejava +++ b/hyracks-fullstack/hyracks/hyracks-util/src/main= /java/org/apache/hyracks/util/Span=2Ejava @@ -18,6 +18,7 @@ */ package o= rg=2Eapache=2Ehyracks=2Eutil; +import java=2Eutil=2Econcurrent=2ECountDow= nLatch; import java=2Eutil=2Econcurrent=2ESemaphore; import java=2Eutil= =2Econcurrent=2ETimeUnit; @@ -70,6 +71,12 @@ } @Overr= ide + public boolean await(CountDownLatch latch) throws InterruptedE= xception { + latch=2Eawait(); + return true; + = } + + @Override public String toString() { re= turn ""; } @@ -143,6 +150,10 @@ TimeUnit=2ENANO= SECONDS=2EtimedWait(monitor, remaining(TimeUnit=2ENANOSECONDS)); } += public boolean await(CountDownLatch latch) throws InterruptedException = { + return latch=2Eawait(remaining(TimeUnit=2ENANOSECONDS), TimeUnit= =2ENANOSECONDS); + } + public void loopUntilExhausted(ThrowingActio= n action) throws Exception { loopUntilExhausted(action, 0, TimeUni= t=2ENANOSECONDS); } -- To view, visit https://asterix-gerrit=2Eics= =2Euci=2Eedu/c/asterixdb/+/11803 To unsubscribe, or for help writing mail f= ilters, visit https://asterix-gerrit=2Eics=2Euci=2Eedu/settings Gerrit-Pro= ject: asterixdb Gerrit-Branch: cheshire-cat Gerrit-Change-Id: Iae424fb99220= 630cb3a240cfef4cbba39b9da06b Gerrit-Change-Number: 11803 Gerrit-PatchSet: 1= Gerrit-Owner: Michael Blow Gerrit-MessageType: newcha= nge --hlUHjGosf1A= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Michael Blow has uploaded this change for review=2E

=

View Change

[NO ISSUE] Misc utility / cleanup

Change-Id: Iae424= fb99220630cb3a240cfef4cbba39b9da06b
---
M hyracks-fullstack/hyracks/h= yracks-api/src/main/java/org/apache/hyracks/api/util/HyracksThrowingConsume= r=2Ejava
M hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apac= he/hyracks/util/Span=2Ejava
2 files changed, 28 insertions(+), 1 deletio= n(-)

git pull ssh://asterix-gerrit=2Eics=2Euci=2Eedu:29418/asteri=
xdb refs/changes/03/11803/1
diff --git a/hyracks-fullstack/hyracks/=
hyracks-api/src/main/java/org/apache/hyracks/api/util/HyracksThrowingConsum=
er=2Ejava b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/=
hyracks/api/util/HyracksThrowingConsumer=2Ejava
index b6771= 32=2E=2E765f9d7 100644
--- a/hyracks-fullstack/hyracks/hyra= cks-api/src/main/java/org/apache/hyracks/api/util/HyracksThrowingConsumer= =2Ejava
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/mai= n/java/org/apache/hyracks/api/util/HyracksThrowingConsumer=2Ejava@@ -18,9 +18,25 @@
*/
package org= =2Eapache=2Ehyracks=2Eapi=2Eutil;

+import java=2Eutil=2Efunction=2EConsumer;=
+
i= mport org=2Eapache=2Ehyracks=2Eapi=2Eexceptions=2EHyracksDataException;

+impor= t com=2Egoogle=2Ecommon=2Eutil=2Econcurrent=2EUncheckedExecutionException;<= /span>
+
@F= unctionalInterface
public interface HyracksThrowingConsume= r<V> {
- void = process(V value) throws HyracksDataException;
+ void accept(V value) throws HyracksDataExcept= ion;
+
+ @SuppressWarnings("Duplic= ates")

+ stat= ic <T> Consumer<T> asUnchecked(HyracksThrowingConsumer<T>= consumer) {
+ = return input -> {
+ try {
+= consumer=2Eaccept(input);
+ } catch (HyracksDataException e) {=
+ throw new = UncheckedExecutionException(e);
+ }
+ };
+ = }
+
= }
diff --git a/hyracks-fullstack/hyracks/hyracks-util/src/= main/java/org/apache/hyracks/util/Span=2Ejava b/hyracks-fullstack/hyracks/h= yracks-util/src/main/java/org/apache/hyracks/util/Span=2Ejava
index dc8bc11=2E=2E1a40360 100644

--- a/hyracks-fullstac= k/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/Span=2Ejava
+++ b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/or= g/apache/hyracks/util/Span=2Ejava
@@ -18,6 +18,7 @@<= br> */
package org=2Eapache=2Ehyracks=2Eutil;

+import = java=2Eutil=2Econcurrent=2ECountDownLatch;
import java=2Eu= til=2Econcurrent=2ESemaphore;
import java=2Eutil=2Econcurr= ent=2ETimeUnit;

@@ -70,6 +71,12 @@=
}

@Override
+ public boolea= n await(CountDownLatch latch) throws InterruptedException {
+ latch=2Eawait();
=
+ return true;
+ }
<= span style=3D"color: hsl(120, 100%, 40%);">+

+ @Override
public = String toString() {
return "<INFINITE&= gt;";
}
@@ -143,6 +150,10 @@<= /span>
TimeUnit=2ENANOSECONDS=2EtimedWait(monitor, remain= ing(TimeUnit=2ENANOSECONDS));
}

+ public boolean await= (CountDownLatch latch) throws InterruptedException {
+ return latch=2Eawait(remaining(Ti= meUnit=2ENANOSECONDS), TimeUnit=2ENANOSECONDS);
+ }
+
public void loopUntilExhausted(Throwing= Action action) throws Exception {
loopUntilExhaust= ed(action, 0, TimeUnit=2ENANOSECONDS);
}

To view, visit change 11803=2E To unsubscribe, or = for help writing mail filters, visit settings=2E

<= div style=3D"display:none"> Gerrit-Project: asterixdb
Gerrit-Branch: cheshire-cat
Gerrit-Change-Id: Iae424fb99220630cb3a240cfef4cbba39b9da06b
Gerrit-Change-Number: 11803
Gerrit-PatchSet: 1
Gerrit= -Owner: Michael Blow <mblow@apache=2Eorg>
Gerrit-MessageType: newchange
--hlUHjGosf1A=--