hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: problem in testing coprocessor function
Date Thu, 11 Jul 2013 14:11:55 GMT
Looks like the following (maven) dependency is missing in your project:

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>11.0.2</version>
    </dependency>

Cheers

On Thu, Jul 11, 2013 at 1:59 AM, ch huang <justlooks@gmail.com> wrote:

> i use hbase 0.94.6 ,and i am testing coprocessor function,here is my
> testing java code,and i get problem in compile it,anyone can help me?
> thanks
>
> # javac -cp '/usr/lib/hbase/*' -d test RegionObserverExample.java
> RegionObserverExample.java:12: cannot access
> com.google.common.collect.ImmutableList
> class file for com.google.common.collect.ImmutableList not found
> public class RegionObserverExample extends BaseRegionObserver {
>        ^
> 1 error
>
>
> package org.myorg;
> import java.io.IOException;
> import java.util.List;
> import org.apache.hadoop.hbase.KeyValue;
> import org.apache.hadoop.hbase.client.*;
> import org.apache.hadoop.hbase.coprocessor.*;
> import org.apache.hadoop.hbase.util.Bytes;
> public class RegionObserverExample extends BaseRegionObserver {
>         public static final byte[] FIXED_ROW = Bytes.toBytes("@@@GETTIME@
> @@");
>         public void preGet(final
> ObserverContext<RegionCoprocessorEnvironment> e,
>             final Get get, final List<KeyValue> results) throws IOException
> {
>           if (Bytes.equals(get.getRow(), FIXED_ROW)) {
>                 KeyValue kv = new KeyValue(get.getRow(), FIXED_ROW,
> FIXED_ROW,
>                   Bytes.toBytes(System.currentTimeMillis()));
>                 results.add(kv);
>           }
>         }
> }
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message