Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> Re: Unable to add co-processor to table through HBase api


+
anil gupta 2012-10-17, 18:04
+
Ramkrishna.S.Vasudevan 2012-10-18, 04:27
+
anil gupta 2012-10-16, 22:35
Copy link to this message
-
Re: Unable to add co-processor to table through HBase api
I forgot to mention that I am using HBase0.92.1

On Tue, Oct 16, 2012 at 5:35 PM, anil gupta <[EMAIL PROTECTED]> wrote:

> Hi All,
>
> I would like to add a RegionObserver to a HBase table through HBase api. I
> don't want to put this RegionObserver as a user or system co-processor in
> hbase-site.xml since this is specific to a table. So, option of using hbase
> properties is out. I have already copied the jar file in the classpath of
> region server and restarted the cluster.
>
> Can any one point out the problem in following code for adding the
> co-processor to the table:
>     private void modifyTable(String name) throws IOException
>     {
>     Configuration conf = HBaseConfiguration.create();
>     HBaseAdmin hAdmin = new HBaseAdmin(conf);
>     hAdmin.disableTable("txn_subset");
>     if(!hAdmin.isTableEnabled("txn_subset"))
>     {
>       System.err.println("Trying to add coproc to table"); // using err so
> that it's easy to read this on eclipse console.
>
> hAdmin.getTableDescriptor(Bytes.toBytes("txn_subset")).addCoprocessor("com.intuit.hbase.poc.coprocessor.observer.IhubTxnRegionObserver");
>       if(
> hAdmin.getTableDescriptor(Bytes.toBytes("txn_subset")).hasCoprocessor("com.intuit.hbase.poc.coprocessor.observer.IhubTxnRegionObserver")
> )
>       {
>         System.err.println("YIPPPPPPPPPIEEEEE!!!!!!!");
>       }
>       hAdmin.enableTable("ihub_txn_subset");
>     }
>     hAdmin.close();
>         }*
> *
> --
> Thanks & Regards,
> Anil Gupta
>

--
Thanks & Regards,
Anil Gupta
+
Ramkrishna.S.Vasudevan 2012-10-17, 04:44
+
anil gupta 2012-10-18, 21:16
+
Anoop Sam John 2012-10-19, 04:43
+
anil gupta 2012-10-19, 04:58
+
Ramkrishna.S.Vasudevan 2012-10-19, 05:23
+
anil gupta 2012-10-19, 16:07
+
anil gupta 2012-10-19, 05:31
+
Anoop Sam John 2012-10-19, 05:37
+
Ramkrishna.S.Vasudevan 2012-10-19, 05:40
+
anil gupta 2012-10-19, 05:51
+
Ramkrishna.S.Vasudevan 2012-10-19, 05:54
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB