You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by "hsdcloud@163.com" <hs...@163.com> on 2016/03/23 04:13:42 UTC

How to get hbase row key that i used even though the method result.isEmpty( )

Hi,
like this:
Result[] result =  table.get(lg);
  List<String>  rk = new ArrayList<String>();
  for(int i=0;i<result.length;i++){
 
  if(result[i].isEmpty()){
        
  }else{
 rk.add(result[i].getRow().toString());
  }
  }   
  return rk;
}

i want to deal with  some data when result[i].isEmpty() .    i must get  hbase row key  that i used  to decide  if it exists,  the string  value  is my i want. how to get it。

Thanks & Regards

zhang_way


hsdcloud@163.com

Re: How to get hbase row key that i used even though the method result.isEmpty( )

Posted by Ted Yu <yu...@gmail.com>.
Here is isEmpty() :

  public boolean isEmpty() {

    return this.cells == null || this.cells.length == 0;

And getRow:

  public byte [] getRow() {

    if (this.row == null) {

      this.row = (this.cells == null || this.cells.length == 0) ?

          null :

So row key would be null.

FYI

On Tue, Mar 22, 2016 at 8:29 PM, Zheng, Kai <ka...@intel.com> wrote:

> I think this should go to HBase user mailing list.
>
>
>
> Regards,
>
> Kai
>
>
>
> *From:* hsdcloud@163.com [mailto:hsdcloud@163.com]
> *Sent:* Wednesday, March 23, 2016 11:14 AM
> *To:* user <us...@hadoop.apache.org>
> *Subject:* How to get hbase row key that i used even though the method
> result.isEmpty( )
>
>
>
> Hi,
>
> like this:
>
> Result[] result =  table.get(lg);
>                           List<String>  rk = new ArrayList<String>();
>                           for(int i=0;i<result.length;i++){
>
>                                       if(result[i].isEmpty()){
>
>                                       }else{
>
>  rk.add(result[i].getRow().toString());
>                                       }
>                           }
>                           return rk;
>
> }
>
>
>
> i want to deal with  some data when result[i].isEmpty() .    i must get
>  hbase row key  that i used  to decide  if it exists,  the string  value
>  is my i want. how to get it。
>
>
>
> Thanks & Regards
>
>
>
> zhang_way
> ------------------------------
>
> hsdcloud@163.com
>

Re: How to get hbase row key that i used even though the method result.isEmpty( )

Posted by Ted Yu <yu...@gmail.com>.
Here is isEmpty() :

  public boolean isEmpty() {

    return this.cells == null || this.cells.length == 0;

And getRow:

  public byte [] getRow() {

    if (this.row == null) {

      this.row = (this.cells == null || this.cells.length == 0) ?

          null :

So row key would be null.

FYI

On Tue, Mar 22, 2016 at 8:29 PM, Zheng, Kai <ka...@intel.com> wrote:

> I think this should go to HBase user mailing list.
>
>
>
> Regards,
>
> Kai
>
>
>
> *From:* hsdcloud@163.com [mailto:hsdcloud@163.com]
> *Sent:* Wednesday, March 23, 2016 11:14 AM
> *To:* user <us...@hadoop.apache.org>
> *Subject:* How to get hbase row key that i used even though the method
> result.isEmpty( )
>
>
>
> Hi,
>
> like this:
>
> Result[] result =  table.get(lg);
>                           List<String>  rk = new ArrayList<String>();
>                           for(int i=0;i<result.length;i++){
>
>                                       if(result[i].isEmpty()){
>
>                                       }else{
>
>  rk.add(result[i].getRow().toString());
>                                       }
>                           }
>                           return rk;
>
> }
>
>
>
> i want to deal with  some data when result[i].isEmpty() .    i must get
>  hbase row key  that i used  to decide  if it exists,  the string  value
>  is my i want. how to get it。
>
>
>
> Thanks & Regards
>
>
>
> zhang_way
> ------------------------------
>
> hsdcloud@163.com
>

Re: How to get hbase row key that i used even though the method result.isEmpty( )

Posted by Ted Yu <yu...@gmail.com>.
Here is isEmpty() :

  public boolean isEmpty() {

    return this.cells == null || this.cells.length == 0;

And getRow:

  public byte [] getRow() {

    if (this.row == null) {

      this.row = (this.cells == null || this.cells.length == 0) ?

          null :

So row key would be null.

FYI

On Tue, Mar 22, 2016 at 8:29 PM, Zheng, Kai <ka...@intel.com> wrote:

> I think this should go to HBase user mailing list.
>
>
>
> Regards,
>
> Kai
>
>
>
> *From:* hsdcloud@163.com [mailto:hsdcloud@163.com]
> *Sent:* Wednesday, March 23, 2016 11:14 AM
> *To:* user <us...@hadoop.apache.org>
> *Subject:* How to get hbase row key that i used even though the method
> result.isEmpty( )
>
>
>
> Hi,
>
> like this:
>
> Result[] result =  table.get(lg);
>                           List<String>  rk = new ArrayList<String>();
>                           for(int i=0;i<result.length;i++){
>
>                                       if(result[i].isEmpty()){
>
>                                       }else{
>
>  rk.add(result[i].getRow().toString());
>                                       }
>                           }
>                           return rk;
>
> }
>
>
>
> i want to deal with  some data when result[i].isEmpty() .    i must get
>  hbase row key  that i used  to decide  if it exists,  the string  value
>  is my i want. how to get it。
>
>
>
> Thanks & Regards
>
>
>
> zhang_way
> ------------------------------
>
> hsdcloud@163.com
>

Re: How to get hbase row key that i used even though the method result.isEmpty( )

Posted by Ted Yu <yu...@gmail.com>.
Here is isEmpty() :

  public boolean isEmpty() {

    return this.cells == null || this.cells.length == 0;

And getRow:

  public byte [] getRow() {

    if (this.row == null) {

      this.row = (this.cells == null || this.cells.length == 0) ?

          null :

So row key would be null.

FYI

On Tue, Mar 22, 2016 at 8:29 PM, Zheng, Kai <ka...@intel.com> wrote:

> I think this should go to HBase user mailing list.
>
>
>
> Regards,
>
> Kai
>
>
>
> *From:* hsdcloud@163.com [mailto:hsdcloud@163.com]
> *Sent:* Wednesday, March 23, 2016 11:14 AM
> *To:* user <us...@hadoop.apache.org>
> *Subject:* How to get hbase row key that i used even though the method
> result.isEmpty( )
>
>
>
> Hi,
>
> like this:
>
> Result[] result =  table.get(lg);
>                           List<String>  rk = new ArrayList<String>();
>                           for(int i=0;i<result.length;i++){
>
>                                       if(result[i].isEmpty()){
>
>                                       }else{
>
>  rk.add(result[i].getRow().toString());
>                                       }
>                           }
>                           return rk;
>
> }
>
>
>
> i want to deal with  some data when result[i].isEmpty() .    i must get
>  hbase row key  that i used  to decide  if it exists,  the string  value
>  is my i want. how to get it。
>
>
>
> Thanks & Regards
>
>
>
> zhang_way
> ------------------------------
>
> hsdcloud@163.com
>

RE: How to get hbase row key that i used even though the method result.isEmpty( )

Posted by "Zheng, Kai" <ka...@intel.com>.
I think this should go to HBase user mailing list.

Regards,
Kai

From: hsdcloud@163.com [mailto:hsdcloud@163.com]
Sent: Wednesday, March 23, 2016 11:14 AM
To: user <us...@hadoop.apache.org>
Subject: How to get hbase row key that i used even though the method result.isEmpty( )

Hi,
like this:
Result[] result =  table.get(lg);
                          List<String>  rk = new ArrayList<String>();
                          for(int i=0;i<result.length;i++){

                                      if(result[i].isEmpty()){

                                      }else{
                                                 rk.add(result[i].getRow().toString());
                                      }
                          }
                          return rk;
}

i want to deal with  some data when result[i].isEmpty() .    i must get  hbase row key  that i used  to decide  if it exists,  the string  value  is my i want. how to get it。


Thanks & Regards

zhang_way
________________________________
hsdcloud@163.com<ma...@163.com>

RE: How to get hbase row key that i used even though the method result.isEmpty( )

Posted by "Zheng, Kai" <ka...@intel.com>.
I think this should go to HBase user mailing list.

Regards,
Kai

From: hsdcloud@163.com [mailto:hsdcloud@163.com]
Sent: Wednesday, March 23, 2016 11:14 AM
To: user <us...@hadoop.apache.org>
Subject: How to get hbase row key that i used even though the method result.isEmpty( )

Hi,
like this:
Result[] result =  table.get(lg);
                          List<String>  rk = new ArrayList<String>();
                          for(int i=0;i<result.length;i++){

                                      if(result[i].isEmpty()){

                                      }else{
                                                 rk.add(result[i].getRow().toString());
                                      }
                          }
                          return rk;
}

i want to deal with  some data when result[i].isEmpty() .    i must get  hbase row key  that i used  to decide  if it exists,  the string  value  is my i want. how to get it。


Thanks & Regards

zhang_way
________________________________
hsdcloud@163.com<ma...@163.com>

RE: How to get hbase row key that i used even though the method result.isEmpty( )

Posted by "Zheng, Kai" <ka...@intel.com>.
I think this should go to HBase user mailing list.

Regards,
Kai

From: hsdcloud@163.com [mailto:hsdcloud@163.com]
Sent: Wednesday, March 23, 2016 11:14 AM
To: user <us...@hadoop.apache.org>
Subject: How to get hbase row key that i used even though the method result.isEmpty( )

Hi,
like this:
Result[] result =  table.get(lg);
                          List<String>  rk = new ArrayList<String>();
                          for(int i=0;i<result.length;i++){

                                      if(result[i].isEmpty()){

                                      }else{
                                                 rk.add(result[i].getRow().toString());
                                      }
                          }
                          return rk;
}

i want to deal with  some data when result[i].isEmpty() .    i must get  hbase row key  that i used  to decide  if it exists,  the string  value  is my i want. how to get it。


Thanks & Regards

zhang_way
________________________________
hsdcloud@163.com<ma...@163.com>

RE: How to get hbase row key that i used even though the method result.isEmpty( )

Posted by "Zheng, Kai" <ka...@intel.com>.
I think this should go to HBase user mailing list.

Regards,
Kai

From: hsdcloud@163.com [mailto:hsdcloud@163.com]
Sent: Wednesday, March 23, 2016 11:14 AM
To: user <us...@hadoop.apache.org>
Subject: How to get hbase row key that i used even though the method result.isEmpty( )

Hi,
like this:
Result[] result =  table.get(lg);
                          List<String>  rk = new ArrayList<String>();
                          for(int i=0;i<result.length;i++){

                                      if(result[i].isEmpty()){

                                      }else{
                                                 rk.add(result[i].getRow().toString());
                                      }
                          }
                          return rk;
}

i want to deal with  some data when result[i].isEmpty() .    i must get  hbase row key  that i used  to decide  if it exists,  the string  value  is my i want. how to get it。


Thanks & Regards

zhang_way
________________________________
hsdcloud@163.com<ma...@163.com>