Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9F87A200BD4 for ; Fri, 16 Dec 2016 18:27:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9E1E4160B24; Fri, 16 Dec 2016 17:27:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B202C160B10 for ; Fri, 16 Dec 2016 18:27:45 +0100 (CET) Received: (qmail 43686 invoked by uid 500); 16 Dec 2016 17:27:44 -0000 Mailing-List: contact dev-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list dev@hawq.incubator.apache.org Received: (qmail 43670 invoked by uid 99); 16 Dec 2016 17:27:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Dec 2016 17:27:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1996A1800B7 for ; Fri, 16 Dec 2016 17:27:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id B356q9RXuGLH for ; Fri, 16 Dec 2016 17:27:42 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 2F46B5F36E for ; Fri, 16 Dec 2016 17:27:42 +0000 (UTC) Received: by mail-oi0-f49.google.com with SMTP id b126so84691926oia.2 for ; Fri, 16 Dec 2016 09:27:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Pd3XoBGkHdJoNjNuEcybYQu2KjgJEqf+iVAPG22nS50=; b=K4H1scOoxmkMtzr5ARdseL6hSZXl4pthxQGn8zgvZOu6zLhWlqVetv7WT2hNzRKrNq h+09YkETi6nwpuHWl8YUreMFwOPq+j6nBeDN34fHZNBkyfeW1djdJgguuNU5AlLK4pfi WDDl7zljSxcV/ccM6kjDQ/2ftGBdLzfbROFw6+UiqvunTjCtTCmZIMP3Xa//Q89Splk4 /FjC4v2Ns/M4PfpaOtWs+2lLJhPbsrgd+f9dzRrHc3QFAHTEL3+aJonBCjigsyWcN2u7 su3vuqN9KW7tyxaJsyuTPyHnFsuT3ftOp4tj06xdgsR3ckgn3SNPyi9zFAnabPoQUuTd 589g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Pd3XoBGkHdJoNjNuEcybYQu2KjgJEqf+iVAPG22nS50=; b=Bhd6FKwp7C6l1HzZytjaMuHVu3xbjj9eafCjxo+H7oCuRqwsXFscKWynsW973hzdsz SOrcVBF5uOYdEc05/d5apqWO5ux/zbJICR9Ql1egM51vx7B0/7Tuj9yre0jfCLyJFA// E8nzoF5XPNkVseIobYvENe8usHzXry8Yaf8UCQep6sSAlxPFpmMTUJhHclgmEVglsmkj C0AL+ivTDn5UNVEtwBoUU9BnJPSojyS08PVWOgHCV2lI09+33pb1zNuqzuLnEyHnSgoG KDKtJdxrLYlgGy9HTPP5M7ZbNToWrVPEWxnBqv9uFV+2IwO3bH6RHKHp31kD23ztkI3x qZ/g== X-Gm-Message-State: AIkVDXIMMwUHQq2gSvTEa4GjouXyCl/U7QaQ8GUVNuQL5Ux//5v5wl3HMchOrw1l3eFWZxVC4xHijCLT3b9TQw== X-Received: by 10.202.215.85 with SMTP id o82mr2331163oig.145.1481909258772; Fri, 16 Dec 2016 09:27:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.27.180 with HTTP; Fri, 16 Dec 2016 09:27:18 -0800 (PST) In-Reply-To: References: From: Shivram Mani Date: Fri, 16 Dec 2016 09:27:18 -0800 Message-ID: Subject: Re: Using PXF without HAWQ To: dev@hawq.incubator.apache.org Content-Type: multipart/alternative; boundary=001a113d3d14f568680543c9e213 archived-at: Fri, 16 Dec 2016 17:27:46 -0000 --001a113d3d14f568680543c9e213 Content-Type: text/plain; charset=UTF-8 Currently the only documented interface for using PXF is using HAWQ queries. The current API reference doc is from the standpoint of a PXF plugin developer to a new data format, and not quite intended for a client side user. The javadocs published isn't going to be your API quick starter guide either. So yes, please do file a hawq JIRA against PXF component requesting this. This will help external clients/db engines to leverage PXF API's direclty. On Thu, Dec 15, 2016 at 4:50 PM, Roman Shaposhnik wrote: > Hi! > > recently I got pretty excited about a possibility of using > PXF outside of its original HAWQ use case. My ultimate > wish here is to make PXF available to other Postgres-derived > databases thus connecting them to the Hadoop ecosystem of > data sources (think FDW-over-PXF). > > With that ambitious goal in mind, I started at a much smaller > MVP today and wanted to share my experience with you all. > > Basically my goal was to make PXF available to Apache Calcite > as a backend (since Calcite itself doesn't deal with storage of data, > algorithms to process data, and a repository for storing metadata). > Calcite comes with a demo that allows you to treat a directory > full of CSV files as a DB (with individual files being tables) and > I wanted to extend that demo to use PXF reading CSV files from HDFS > instead: > http://calcite.apache.org/docs/tutorial.html > https://github.com/apache/calcite/tree/master/example/ > csv/src/main/java/org/apache/calcite/adapter/csv > > Being a new to using PXF outside of HAWQ, I started looking > for any kind of a "Standalone PXF" Quickstart guide but couldn't find > any (please let me know if I missed it). What follows are my notes on > what I've been able to do so far. Let me know if they are reasonable > and I'll start collecting them on a wiki to help others get going with PXF. > > 1. My first challenge was to get a local PXF service running. I couldn't > find > any task that would help me do that so I did this: > https://issues.apache.org/jira/browse/HAWQ-1224 > > 2. My next challenge was to try and figure out the sequence of API calls > that would be required to use PXF to ready data from a CSV file stored > in a local HDFS (HDFS that happens to be backed by my local filesystem). > The problem is that I couldn't really find any API quick start guide that > would > clearly describe the objects that PXF manipulates (nouns) what it can do > with them (verbs) and, potentially, a state transition diagram to guide the > client-side writers like myself. Did I miss a doc like that or should > I file a JIRA > for it to be created? > > 3. Even when I figured out some of the calls to make, there's still no > client-side > library available to translate those into the REST calls (or may be > even short-circuit > them when running as part of the same JVM as PXF). Does this sounds like > something that needs to be addressed by PXF community? Shall I file a JIRA? > > Thanks, > Roman. > -- shivram mani --001a113d3d14f568680543c9e213--