You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by Adrian Acosta Mitjans <am...@estudiantes.uci.cu> on 2013/04/19 19:16:45 UTC
Mapreduce
Hello:
I'm working in a proyect, and i'm using hbase for storage the data, y have this method that work great but without the performance i'm looking for, so i want is to make the same but using mapreduce.
public ArrayList<MyObject> findZ(String z) throws IOException {
ArrayList<MyObject> rows = new ArrayList<MyObject>();
Configuration conf = HBaseConfiguration.create();
HTable table = new HTable(conf, "test");
Scan s = new Scan();
s.addColumn(Bytes.toBytes("x"), Bytes.toBytes("y"));
ResultScanner scanner = table.getScanner(s);
try {
for (Result rr : scanner) {
if (Bytes.toString(rr.getValue(Bytes.toBytes("x"), Bytes.toBytes("y"))).equals(z)) {
rows.add(getInformation(Bytes.toString(rr.getRow())));
}
}
} finally {
scanner.close();
}
return archivos;
}
The getInformation method take all the columns and convert the row in MyObject type.
I just want a example or a link to a tutorial that make something like this, i want to get a result type as answer and not a number to count words, like many a found.
My natural language is spanish, so sorry if something is not well writing.
Thanks.
http://www.uci.cu
Re: Mapreduce
Posted by 정종운 <sh...@gmail.com>.
http://hbase.apache.org/book/mapreduce.example.html
2013/4/20 Hemanth Yamijala <yh...@thoughtworks.com>
> As this is a HBase specific question, it will be better to ask this
> question on the HBase user mailing list.
>
> Thanks
> Hemanth
>
>
> On Fri, Apr 19, 2013 at 10:46 PM, Adrian Acosta Mitjans <
> amitjans@estudiantes.uci.cu> wrote:
>
>> Hello:
>>
>> I'm working in a proyect, and i'm using hbase for storage the data, y
>> have this method that work great but without the performance i'm looking
>> for, so i want is to make the same but using mapreduce.
>>
>>
>> public ArrayList<MyObject> findZ(String z) throws IOException {
>>
>> ArrayList<MyObject> rows = new ArrayList<MyObject>();
>> Configuration conf = HBaseConfiguration.create();
>> HTable table = new HTable(conf, "test");
>> Scan s = new Scan();
>> s.addColumn(Bytes.toBytes("x"), Bytes.toBytes("y"));
>> ResultScanner scanner = table.getScanner(s);
>> try {
>> for (Result rr : scanner) {
>> if (Bytes.toString(rr.getValue(Bytes.toBytes("x"),
>> Bytes.toBytes("y"))).equals(z)) {
>> rows.add(getInformation(Bytes.toString(rr.getRow())));
>> }
>> }
>> } finally {
>> scanner.close();
>> }
>> return archivos;
>> }
>>
>> The getInformation method take all the columns and convert the row in
>> MyObject type.
>>
>> I just want a example or a link to a tutorial that make something like
>> this, i want to get a result type as answer and not a number to count
>> words, like many a found.
>>
>> My natural language is spanish, so sorry if something is not well writing.
>>
>> Thanks.
>> <http://www.uci.cu/>
>>
>>
>
Re: Mapreduce
Posted by 정종운 <sh...@gmail.com>.
http://hbase.apache.org/book/mapreduce.example.html
2013/4/20 Hemanth Yamijala <yh...@thoughtworks.com>
> As this is a HBase specific question, it will be better to ask this
> question on the HBase user mailing list.
>
> Thanks
> Hemanth
>
>
> On Fri, Apr 19, 2013 at 10:46 PM, Adrian Acosta Mitjans <
> amitjans@estudiantes.uci.cu> wrote:
>
>> Hello:
>>
>> I'm working in a proyect, and i'm using hbase for storage the data, y
>> have this method that work great but without the performance i'm looking
>> for, so i want is to make the same but using mapreduce.
>>
>>
>> public ArrayList<MyObject> findZ(String z) throws IOException {
>>
>> ArrayList<MyObject> rows = new ArrayList<MyObject>();
>> Configuration conf = HBaseConfiguration.create();
>> HTable table = new HTable(conf, "test");
>> Scan s = new Scan();
>> s.addColumn(Bytes.toBytes("x"), Bytes.toBytes("y"));
>> ResultScanner scanner = table.getScanner(s);
>> try {
>> for (Result rr : scanner) {
>> if (Bytes.toString(rr.getValue(Bytes.toBytes("x"),
>> Bytes.toBytes("y"))).equals(z)) {
>> rows.add(getInformation(Bytes.toString(rr.getRow())));
>> }
>> }
>> } finally {
>> scanner.close();
>> }
>> return archivos;
>> }
>>
>> The getInformation method take all the columns and convert the row in
>> MyObject type.
>>
>> I just want a example or a link to a tutorial that make something like
>> this, i want to get a result type as answer and not a number to count
>> words, like many a found.
>>
>> My natural language is spanish, so sorry if something is not well writing.
>>
>> Thanks.
>> <http://www.uci.cu/>
>>
>>
>
Re: Mapreduce
Posted by 정종운 <sh...@gmail.com>.
http://hbase.apache.org/book/mapreduce.example.html
2013/4/20 Hemanth Yamijala <yh...@thoughtworks.com>
> As this is a HBase specific question, it will be better to ask this
> question on the HBase user mailing list.
>
> Thanks
> Hemanth
>
>
> On Fri, Apr 19, 2013 at 10:46 PM, Adrian Acosta Mitjans <
> amitjans@estudiantes.uci.cu> wrote:
>
>> Hello:
>>
>> I'm working in a proyect, and i'm using hbase for storage the data, y
>> have this method that work great but without the performance i'm looking
>> for, so i want is to make the same but using mapreduce.
>>
>>
>> public ArrayList<MyObject> findZ(String z) throws IOException {
>>
>> ArrayList<MyObject> rows = new ArrayList<MyObject>();
>> Configuration conf = HBaseConfiguration.create();
>> HTable table = new HTable(conf, "test");
>> Scan s = new Scan();
>> s.addColumn(Bytes.toBytes("x"), Bytes.toBytes("y"));
>> ResultScanner scanner = table.getScanner(s);
>> try {
>> for (Result rr : scanner) {
>> if (Bytes.toString(rr.getValue(Bytes.toBytes("x"),
>> Bytes.toBytes("y"))).equals(z)) {
>> rows.add(getInformation(Bytes.toString(rr.getRow())));
>> }
>> }
>> } finally {
>> scanner.close();
>> }
>> return archivos;
>> }
>>
>> The getInformation method take all the columns and convert the row in
>> MyObject type.
>>
>> I just want a example or a link to a tutorial that make something like
>> this, i want to get a result type as answer and not a number to count
>> words, like many a found.
>>
>> My natural language is spanish, so sorry if something is not well writing.
>>
>> Thanks.
>> <http://www.uci.cu/>
>>
>>
>
Re: Mapreduce
Posted by 정종운 <sh...@gmail.com>.
http://hbase.apache.org/book/mapreduce.example.html
2013/4/20 Hemanth Yamijala <yh...@thoughtworks.com>
> As this is a HBase specific question, it will be better to ask this
> question on the HBase user mailing list.
>
> Thanks
> Hemanth
>
>
> On Fri, Apr 19, 2013 at 10:46 PM, Adrian Acosta Mitjans <
> amitjans@estudiantes.uci.cu> wrote:
>
>> Hello:
>>
>> I'm working in a proyect, and i'm using hbase for storage the data, y
>> have this method that work great but without the performance i'm looking
>> for, so i want is to make the same but using mapreduce.
>>
>>
>> public ArrayList<MyObject> findZ(String z) throws IOException {
>>
>> ArrayList<MyObject> rows = new ArrayList<MyObject>();
>> Configuration conf = HBaseConfiguration.create();
>> HTable table = new HTable(conf, "test");
>> Scan s = new Scan();
>> s.addColumn(Bytes.toBytes("x"), Bytes.toBytes("y"));
>> ResultScanner scanner = table.getScanner(s);
>> try {
>> for (Result rr : scanner) {
>> if (Bytes.toString(rr.getValue(Bytes.toBytes("x"),
>> Bytes.toBytes("y"))).equals(z)) {
>> rows.add(getInformation(Bytes.toString(rr.getRow())));
>> }
>> }
>> } finally {
>> scanner.close();
>> }
>> return archivos;
>> }
>>
>> The getInformation method take all the columns and convert the row in
>> MyObject type.
>>
>> I just want a example or a link to a tutorial that make something like
>> this, i want to get a result type as answer and not a number to count
>> words, like many a found.
>>
>> My natural language is spanish, so sorry if something is not well writing.
>>
>> Thanks.
>> <http://www.uci.cu/>
>>
>>
>
Re: Mapreduce
Posted by Hemanth Yamijala <yh...@thoughtworks.com>.
As this is a HBase specific question, it will be better to ask this
question on the HBase user mailing list.
Thanks
Hemanth
On Fri, Apr 19, 2013 at 10:46 PM, Adrian Acosta Mitjans <
amitjans@estudiantes.uci.cu> wrote:
> Hello:
>
> I'm working in a proyect, and i'm using hbase for storage the data, y have
> this method that work great but without the performance i'm looking for, so
> i want is to make the same but using mapreduce.
>
>
> public ArrayList<MyObject> findZ(String z) throws IOException {
>
> ArrayList<MyObject> rows = new ArrayList<MyObject>();
> Configuration conf = HBaseConfiguration.create();
> HTable table = new HTable(conf, "test");
> Scan s = new Scan();
> s.addColumn(Bytes.toBytes("x"), Bytes.toBytes("y"));
> ResultScanner scanner = table.getScanner(s);
> try {
> for (Result rr : scanner) {
> if (Bytes.toString(rr.getValue(Bytes.toBytes("x"),
> Bytes.toBytes("y"))).equals(z)) {
> rows.add(getInformation(Bytes.toString(rr.getRow())));
> }
> }
> } finally {
> scanner.close();
> }
> return archivos;
> }
>
> The getInformation method take all the columns and convert the row in
> MyObject type.
>
> I just want a example or a link to a tutorial that make something like
> this, i want to get a result type as answer and not a number to count
> words, like many a found.
>
> My natural language is spanish, so sorry if something is not well writing.
>
> Thanks.
> <http://www.uci.cu/>
>
>
Re: Mapreduce
Posted by Hemanth Yamijala <yh...@thoughtworks.com>.
As this is a HBase specific question, it will be better to ask this
question on the HBase user mailing list.
Thanks
Hemanth
On Fri, Apr 19, 2013 at 10:46 PM, Adrian Acosta Mitjans <
amitjans@estudiantes.uci.cu> wrote:
> Hello:
>
> I'm working in a proyect, and i'm using hbase for storage the data, y have
> this method that work great but without the performance i'm looking for, so
> i want is to make the same but using mapreduce.
>
>
> public ArrayList<MyObject> findZ(String z) throws IOException {
>
> ArrayList<MyObject> rows = new ArrayList<MyObject>();
> Configuration conf = HBaseConfiguration.create();
> HTable table = new HTable(conf, "test");
> Scan s = new Scan();
> s.addColumn(Bytes.toBytes("x"), Bytes.toBytes("y"));
> ResultScanner scanner = table.getScanner(s);
> try {
> for (Result rr : scanner) {
> if (Bytes.toString(rr.getValue(Bytes.toBytes("x"),
> Bytes.toBytes("y"))).equals(z)) {
> rows.add(getInformation(Bytes.toString(rr.getRow())));
> }
> }
> } finally {
> scanner.close();
> }
> return archivos;
> }
>
> The getInformation method take all the columns and convert the row in
> MyObject type.
>
> I just want a example or a link to a tutorial that make something like
> this, i want to get a result type as answer and not a number to count
> words, like many a found.
>
> My natural language is spanish, so sorry if something is not well writing.
>
> Thanks.
> <http://www.uci.cu/>
>
>
Re: Mapreduce
Posted by Hemanth Yamijala <yh...@thoughtworks.com>.
As this is a HBase specific question, it will be better to ask this
question on the HBase user mailing list.
Thanks
Hemanth
On Fri, Apr 19, 2013 at 10:46 PM, Adrian Acosta Mitjans <
amitjans@estudiantes.uci.cu> wrote:
> Hello:
>
> I'm working in a proyect, and i'm using hbase for storage the data, y have
> this method that work great but without the performance i'm looking for, so
> i want is to make the same but using mapreduce.
>
>
> public ArrayList<MyObject> findZ(String z) throws IOException {
>
> ArrayList<MyObject> rows = new ArrayList<MyObject>();
> Configuration conf = HBaseConfiguration.create();
> HTable table = new HTable(conf, "test");
> Scan s = new Scan();
> s.addColumn(Bytes.toBytes("x"), Bytes.toBytes("y"));
> ResultScanner scanner = table.getScanner(s);
> try {
> for (Result rr : scanner) {
> if (Bytes.toString(rr.getValue(Bytes.toBytes("x"),
> Bytes.toBytes("y"))).equals(z)) {
> rows.add(getInformation(Bytes.toString(rr.getRow())));
> }
> }
> } finally {
> scanner.close();
> }
> return archivos;
> }
>
> The getInformation method take all the columns and convert the row in
> MyObject type.
>
> I just want a example or a link to a tutorial that make something like
> this, i want to get a result type as answer and not a number to count
> words, like many a found.
>
> My natural language is spanish, so sorry if something is not well writing.
>
> Thanks.
> <http://www.uci.cu/>
>
>
Re: Mapreduce
Posted by Hemanth Yamijala <yh...@thoughtworks.com>.
As this is a HBase specific question, it will be better to ask this
question on the HBase user mailing list.
Thanks
Hemanth
On Fri, Apr 19, 2013 at 10:46 PM, Adrian Acosta Mitjans <
amitjans@estudiantes.uci.cu> wrote:
> Hello:
>
> I'm working in a proyect, and i'm using hbase for storage the data, y have
> this method that work great but without the performance i'm looking for, so
> i want is to make the same but using mapreduce.
>
>
> public ArrayList<MyObject> findZ(String z) throws IOException {
>
> ArrayList<MyObject> rows = new ArrayList<MyObject>();
> Configuration conf = HBaseConfiguration.create();
> HTable table = new HTable(conf, "test");
> Scan s = new Scan();
> s.addColumn(Bytes.toBytes("x"), Bytes.toBytes("y"));
> ResultScanner scanner = table.getScanner(s);
> try {
> for (Result rr : scanner) {
> if (Bytes.toString(rr.getValue(Bytes.toBytes("x"),
> Bytes.toBytes("y"))).equals(z)) {
> rows.add(getInformation(Bytes.toString(rr.getRow())));
> }
> }
> } finally {
> scanner.close();
> }
> return archivos;
> }
>
> The getInformation method take all the columns and convert the row in
> MyObject type.
>
> I just want a example or a link to a tutorial that make something like
> this, i want to get a result type as answer and not a number to count
> words, like many a found.
>
> My natural language is spanish, so sorry if something is not well writing.
>
> Thanks.
> <http://www.uci.cu/>
>
>