You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Nick Dimiduk <nd...@gmail.com> on 2015/08/14 00:23:31 UTC

Re: In Windows, cannot capture HBase prompt('hbase(main):001:0>') from neither standard output nor standard error using process API

dev to bcc

Hi Dinesh,

I'm not sure what you mean by "process API". Are you launching the hbase
shell as an external process? Would be better to use an HBase client. We
have a nice one in Java. We also have REST and Thrift gateways, which are
launched as separate processes. There's also Apache Phoenix, which will
give you JDBC access to HBase, though again, it's Java only at this point.
Maybe one of these will work for you?

Good luck,
-n

http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/package-summary.html#package_description
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/rest/package-summary.html
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/thrift/package-summary.html
http://phoenix.apache.org

On Thu, Aug 13, 2015 at 4:39 AM, <di...@gmail.com> wrote:

> I have configured HBase(hbase-0.98.13-hadoop2-bin.tar) in windows. It
> works well when started as shell in cmd.exe;
>
>
> When I try to run HBase through Process api in c# or java, hbase
> prompt('hbase(main):001:0>') is not received, but I could able to run HBase
> shell, execute commands and receive error/output for the same;
>
>
> Only thing is I am unable to get HBase prompt('hbase(main):001:0>');
> Please suggest the correct way.
>
>
> Thanks,
>
> Dinesh Kumar P

Re: In Windows, cannot capture HBase prompt('hbase(main):001:0>') from neither standard output nor standard error using process API

Posted by Nick Dimiduk <nd...@gmail.com>.
Okay, thanks for clarifying.

I would speculate that it has to do with how console output is handled by
the process. I personally don't know these details well. In HBase we use
jruby (a modified irb.rb as I understand it) as the foundation for our
shell tool. Perhaps there's some flag you can pass to irb to better support
your use-case? If you find something we need to change on our side, do let
us know here and/or file a JIRA. I think our version of irb is forked from
a pretty old version, so there may be upstream improvements we can
incorporate.

-n

On Fri, Aug 14, 2015 at 2:32 AM, <di...@gmail.com> wrote:

> Hi Nick,
>
>
> Thanks for your reply and letting me know about options to interact with
> HBase client;
>
>
> Please find my use case and requirement in detail;
>
>
> Requirement: Create a simple GUI editor using C# for HBase shell console
> in Windows platform;
>
>
> As a part of my learning about Hadoop and its ecosystems, I created a GUI
> editor application for Hive CLI successfully with the following steps;
> 1. From my C# application, programmatically I will start the Hive CLI in
> Command line, read the output and render it in my own GUI editor.
>
>
> 2. All these interactions I am able to do from my application which
> interacts with Hive’s running shell window
>
>
> Similarly I tried for HBase. Here I can able to execute my command and
> retrieve output with HBase, but HBase prompt(hbase(main):001:0>) alone not
> received in the output(i.e. prompt is not received from stdout or stderr of
> command line process of HBase )
>
>
> Hive CLI -
> http://archive.cloudera.com/cdh4/cdh/4/hive/language_manual/cli.html
>
>
> Please suggest me any solution or a work around to get HBase prompt along
> with output
>
>
> Best,
> DineshKumar P
>
>
>
>
>
>
> Sent from Windows Mail
>
>
>
>
>
> From: Nick Dimiduk
> Sent: ‎Friday‎, ‎14‎ ‎August‎ ‎2015 ‎03‎:‎53‎ ‎AM
> To: hbase-user
>
>
>
>
>
> dev to bcc
>
> Hi Dinesh,
>
> I'm not sure what you mean by "process API". Are you launching the hbase
> shell as an external process? Would be better to use an HBase client. We
> have a nice one in Java. We also have REST and Thrift gateways, which are
> launched as separate processes. There's also Apache Phoenix, which will
> give you JDBC access to HBase, though again, it's Java only at this point.
> Maybe one of these will work for you?
>
> Good luck,
> -n
>
>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/package-summary.html#package_description
>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/rest/package-summary.html
>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/thrift/package-summary.html
> http://phoenix.apache.org
>
> On Thu, Aug 13, 2015 at 4:39 AM, <di...@gmail.com> wrote:
>
> > I have configured HBase(hbase-0.98.13-hadoop2-bin.tar) in windows. It
> > works well when started as shell in cmd.exe;
> >
> >
> > When I try to run HBase through Process api in c# or java, hbase
> > prompt('hbase(main):001:0>') is not received, but I could able to run
> HBase
> > shell, execute commands and receive error/output for the same;
> >
> >
> > Only thing is I am unable to get HBase prompt('hbase(main):001:0>');
> > Please suggest the correct way.
> >
> >
> > Thanks,
> >
> > Dinesh Kumar P
>

Re: In Windows, cannot capture HBase prompt('hbase(main):001:0>') from neither standard output nor standard error using process API

Posted by di...@gmail.com.
Hi Nick,


Thanks for your reply and letting me know about options to interact with HBase client;


Please find my use case and requirement in detail;


Requirement: Create a simple GUI editor using C# for HBase shell console in Windows platform;


As a part of my learning about Hadoop and its ecosystems, I created a GUI editor application for Hive CLI successfully with the following steps;  
1. From my C# application, programmatically I will start the Hive CLI in Command line, read the output and render it in my own GUI editor.


2. All these interactions I am able to do from my application which interacts with Hive’s running shell window


Similarly I tried for HBase. Here I can able to execute my command and retrieve output with HBase, but HBase prompt(hbase(main):001:0>) alone not received in the output(i.e. prompt is not received from stdout or stderr of command line process of HBase )


Hive CLI - http://archive.cloudera.com/cdh4/cdh/4/hive/language_manual/cli.html


Please suggest me any solution or a work around to get HBase prompt along with output


Best,
DineshKumar P






Sent from Windows Mail





From: Nick Dimiduk
Sent: ‎Friday‎, ‎14‎ ‎August‎ ‎2015 ‎03‎:‎53‎ ‎AM
To: hbase-user





dev to bcc

Hi Dinesh,

I'm not sure what you mean by "process API". Are you launching the hbase
shell as an external process? Would be better to use an HBase client. We
have a nice one in Java. We also have REST and Thrift gateways, which are
launched as separate processes. There's also Apache Phoenix, which will
give you JDBC access to HBase, though again, it's Java only at this point.
Maybe one of these will work for you?

Good luck,
-n

http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/package-summary.html#package_description
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/rest/package-summary.html
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/thrift/package-summary.html
http://phoenix.apache.org

On Thu, Aug 13, 2015 at 4:39 AM, <di...@gmail.com> wrote:

> I have configured HBase(hbase-0.98.13-hadoop2-bin.tar) in windows. It
> works well when started as shell in cmd.exe;
>
>
> When I try to run HBase through Process api in c# or java, hbase
> prompt('hbase(main):001:0>') is not received, but I could able to run HBase
> shell, execute commands and receive error/output for the same;
>
>
> Only thing is I am unable to get HBase prompt('hbase(main):001:0>');
> Please suggest the correct way.
>
>
> Thanks,
>
> Dinesh Kumar P

Re: In Windows, cannot capture HBase prompt('hbase(main):001:0>') from neither standard output nor standard error using process API

Posted by Ted Yu <yu...@gmail.com>.
I think Dinesh was referring to:
http://docs.oracle.com/javase/7/docs/api/java/lang/Process.html

Cheers

On Thu, Aug 13, 2015 at 3:23 PM, Nick Dimiduk <nd...@gmail.com> wrote:

> dev to bcc
>
> Hi Dinesh,
>
> I'm not sure what you mean by "process API". Are you launching the hbase
> shell as an external process? Would be better to use an HBase client. We
> have a nice one in Java. We also have REST and Thrift gateways, which are
> launched as separate processes. There's also Apache Phoenix, which will
> give you JDBC access to HBase, though again, it's Java only at this point.
> Maybe one of these will work for you?
>
> Good luck,
> -n
>
>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/package-summary.html#package_description
>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/rest/package-summary.html
>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/thrift/package-summary.html
> http://phoenix.apache.org
>
> On Thu, Aug 13, 2015 at 4:39 AM, <di...@gmail.com> wrote:
>
> > I have configured HBase(hbase-0.98.13-hadoop2-bin.tar) in windows. It
> > works well when started as shell in cmd.exe;
> >
> >
> > When I try to run HBase through Process api in c# or java, hbase
> > prompt('hbase(main):001:0>') is not received, but I could able to run
> HBase
> > shell, execute commands and receive error/output for the same;
> >
> >
> > Only thing is I am unable to get HBase prompt('hbase(main):001:0>');
> > Please suggest the correct way.
> >
> >
> > Thanks,
> >
> > Dinesh Kumar P
>