From user-return-451-archive-asf-public=cust-asf.ponee.io@arrow.apache.org Wed May 13 00:43:59 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2478D180634 for ; Wed, 13 May 2020 02:43:59 +0200 (CEST) Received: (qmail 50448 invoked by uid 500); 13 May 2020 00:43:58 -0000 Mailing-List: contact user-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@arrow.apache.org Delivered-To: mailing list user@arrow.apache.org Received: (qmail 50438 invoked by uid 99); 13 May 2020 00:43:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 May 2020 00:43:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BCDEDC163B for ; Wed, 13 May 2020 00:43:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id qOKA1MFFC7mv for ; Wed, 13 May 2020 00:43:56 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::e30; helo=mail-vs1-xe30.google.com; envelope-from=damien.chaillou@gmail.com; receiver= Received: from mail-vs1-xe30.google.com (mail-vs1-xe30.google.com [IPv6:2607:f8b0:4864:20::e30]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id B6CED7DC62 for ; Wed, 13 May 2020 00:43:55 +0000 (UTC) Received: by mail-vs1-xe30.google.com with SMTP id y13so3080909vsk.8 for ; Tue, 12 May 2020 17:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=iIyIflVKORVUq3wsM66qoajudA3NoXQlXiRvpXIstVY=; b=TtDi1w6voIAcqkeYBVpBmk0QQ1aG5MIZ1OpVpoac7UOXtYedfKW+UMq04tOEMcnWle VyX/FfGNG7BB0ucIs/64qziBQ+7Iwp5VwG5khYeIIuNt4DLq015FJSOJGLurKXm8a/Z3 B5XUVjQwaolHehf2KmjU16rN3CFInT+SOC6wHPtxQQLAP1iu4BO1QwhE7GM/UQI8IuuS 6HxH3wTwBhFVGsy5kThGvo+8y30dFrhiIw5sQQMlHoySq0hrPkuNpdwPSFrD5atqt8Ui Lz/JGeIKd+8GGz3cdJej3JIoT65IjKYacWVPE4mlKAr3khY4hU3g0jhAvAuH0DkK6+RA xGyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=iIyIflVKORVUq3wsM66qoajudA3NoXQlXiRvpXIstVY=; b=SUYHJLCoAjIgcxFaE65ldiRmW2xSx0SwKf8kzIjwivaLqnUFbGNfktUMfem5P3g9Nb teo4B9LXn84Nkv87OnVSndg7lnNVaGMoTVKNU2Q6M2WwQGFt4a5AlfqK8XdffO8A1ZyT 1JfzWAPtYeP6EgDqvUDBhpp/2z2RhnDwV8loLrlJF13ZX+zTgVJqUHbQZzU3MNQIohcY 5UH4wCfNBWFxwF14R1MmcVe5HjVqpQabbw6J0UUmbpJidfe4LczYntqMzceZ4sYJOP2h aOxTIhByjicp2rMHVvoYgmeYlLbC4PH5dU6C/wJTc9IRu4ZlZbSB3B+k1sacvMdGbh2U Kx4w== X-Gm-Message-State: AGi0PubEoiQFTpwJEYHY3mklnstBm0GyTl8FsNGDGWiKPP7tUQP5bEJ6 PKkCFdbkSaB/MnRkfC6o5JLwFJUN3juGgxZcpfxpDNmCNdA25Q== X-Google-Smtp-Source: APiQypI9lwmZVnYgxSHYeRh3d3ottWSZIoIiK0BR2NjHQXYi/Buaf1r7n5SDv99848B/3XMNQ74NOhXXM21XqCk9ahs= X-Received: by 2002:a67:fd99:: with SMTP id k25mr17527800vsq.161.1589330634036; Tue, 12 May 2020 17:43:54 -0700 (PDT) MIME-Version: 1.0 From: Damien Chaillou Date: Tue, 12 May 2020 21:43:41 -0300 Message-ID: Subject: Example for Apache Arrow Flight To: user@arrow.apache.org Content-Type: multipart/alternative; boundary="000000000000df5a1505a57cdf54" --000000000000df5a1505a57cdf54 Content-Type: text/plain; charset="UTF-8" Hi! I'm currently playing with Apache Arrow Flight in java and cant get my head around how to implement something. In the *doGet* method, for example, I'm doing simple JDBC calls that I would like to stream over. If I understand correctly, the *FlightData*'s body should be a ArrowMessage serialised as a ByteString (?) I built from a ResultSet from my JDBC call. I though using JdbcToArrow helper class to help, but I can't find any example of how to do such thing. I came with few questions : - What is the data we must set in dataBody ? - If those are ArrowMessages, how can I map a ResultSet to this type? - How do we serialise to ByteString objects typed like ArrowMessage, Schema ... ? Could anyone point a piece of code/blog post/anything to me please ? My toy project would be a generic proxy server in front of any database with available JDBC drivers that could stream queries over Arrow Flight (gRPC). Cheers, thanks! Damien --000000000000df5a1505a57cdf54 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!

I'm currently playing with Apac= he Arrow Flight in java and cant=C2=A0get my head around how to implement s= omething.
In the doGet method, for=C2=A0example, I'm d= oing simple JDBC calls that I would like to stream over.
If I und= erstand correctly, the FlightData's=C2=A0body should be a ArrowM= essage serialised as a ByteString (?) I built from a ResultSet from my JDBC= call. I though using=C2=A0JdbcToArrow=C2=A0helper class to help, but I can't= find any example of how to do such thing.
I came with few questions := =C2=A0
  • What is the data we must set in=C2=A0dataBody ?=C2= =A0
  • If those are ArrowMessages, how can I map a ResultSet to this t= ype?
  • How do we serialise to ByteString objects typed like=C2=A0Arro= wMessage, Schema ... ?

Could anyone poin= t a piece of code/blog post/anything to me please ?

My toy project would be a generic proxy server in front of any database w= ith=C2=A0available JDBC drivers that could stream queries over Arrow Flight= (gRPC).

Cheers, thanks!

=
Damien
--000000000000df5a1505a57cdf54--