Examples of coprocessorExec()


Examples of org.apache.hadoop.hbase.client.HTable.coprocessorExec()

    verifyRegionResults(table, results, ROW_C);

    Batch.Call<PingProtocol,String> helloCall =
      Batch.forMethod(PingProtocol.class, "hello", "NAME");
    results =
        table.coprocessorExec(PingProtocol.class, ROW_A, ROW_C, helloCall);


    verifyRegionResults(table, results, "Hello, NAME", ROW_A);
    verifyRegionResults(table, results, "Hello, NAME", ROW_B);
    verifyRegionResults(table, results, "Hello, NAME", ROW_C);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.coprocessorExec()

  @Test
  public void testRowRange() throws Throwable {
    HTable table = new HTable(util.getConfiguration(), TEST_TABLE);

    // test empty range
    Map<byte[],String> results = table.coprocessorExec(PingProtocol.class,
        null, null, new Batch.Call<PingProtocol,String>() {
          public String call(PingProtocol instance) {
            return instance.ping();
          }
        });
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.coprocessorExec()

    verifyRegionResults(table, results, ROW_A);
    verifyRegionResults(table, results, ROW_B);
    verifyRegionResults(table, results, ROW_C);

    // test start row + empty end
    results = table.coprocessorExec(PingProtocol.class, ROW_BC, null,
        new Batch.Call<PingProtocol,String>() {
          public String call(PingProtocol instance) {
            return instance.ping();
          }
        });
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.coprocessorExec()

    protected void clearCache() throws SQLException {
        try {
            SQLException sqlE = null;
            HTableInterface htable = this.getTable(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES);
            try {
                htable.coprocessorExec(MetaDataProtocol.class, HConstants.EMPTY_START_ROW,
                        HConstants.EMPTY_END_ROW, new Batch.Call<MetaDataProtocol, Void>() {
                    @Override
                    public Void call(MetaDataProtocol instance) throws IOException {
                      instance.clearCache();
                      return null;
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.coprocessorExec()

    }

    public static void clearMetaDataCache(Connection conn) throws Throwable {
        PhoenixConnection pconn = conn.unwrap(PhoenixConnection.class);
        HTableInterface htable = pconn.getQueryServices().getTable(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES);
        htable.coprocessorExec(MetaDataProtocol.class, HConstants.EMPTY_START_ROW,
                HConstants.EMPTY_END_ROW, new Batch.Call<MetaDataProtocol, Void>() {
            @Override
            public Void call(MetaDataProtocol instance) throws IOException {
              instance.clearCache();
              return null;
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.coprocessorExec()

    protected void clearCache() throws SQLException {
        try {
            SQLException sqlE = null;
            HTableInterface htable = this.getTable(PhoenixDatabaseMetaData.TYPE_TABLE_NAME_BYTES);
            try {
                htable.coprocessorExec(MetaDataProtocol.class, HConstants.EMPTY_START_ROW,
                        HConstants.EMPTY_END_ROW, new Batch.Call<MetaDataProtocol, Void>() {
                    @Override
                    public Void call(MetaDataProtocol instance) throws IOException {
                      instance.clearCache();
                      return null;
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.coprocessorExec()

    }

    public static void clearMetaDataCache(Connection conn) throws Throwable {
        PhoenixConnection pconn = conn.unwrap(PhoenixConnection.class);
        HTableInterface htable = pconn.getQueryServices().getTable(PhoenixDatabaseMetaData.TYPE_TABLE_NAME_BYTES);
        htable.coprocessorExec(MetaDataProtocol.class, HConstants.EMPTY_START_ROW,
                HConstants.EMPTY_END_ROW, new Batch.Call<MetaDataProtocol, Void>() {
            @Override
            public Void call(MetaDataProtocol instance) throws IOException {
              instance.clearCache();
              return null;
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.coprocessorExec()

    }

    public static void clearMetaDataCache(Connection conn) throws Throwable {
        PhoenixConnection pconn = conn.unwrap(PhoenixConnection.class);
        HTableInterface htable = pconn.getQueryServices().getTable(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES);
        htable.coprocessorExec(MetaDataProtocol.class, HConstants.EMPTY_START_ROW,
                HConstants.EMPTY_END_ROW, new Batch.Call<MetaDataProtocol, Void>() {
            @Override
            public Void call(MetaDataProtocol instance) throws IOException {
              instance.clearCache();
              return null;
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.coprocessorExec()

    protected void clearCache() throws SQLException {
        try {
            SQLException sqlE = null;
            HTableInterface htable = this.getTable(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES);
            try {
                htable.coprocessorExec(MetaDataProtocol.class, HConstants.EMPTY_START_ROW,
                        HConstants.EMPTY_END_ROW, new Batch.Call<MetaDataProtocol, Void>() {
                    @Override
                    public Void call(MetaDataProtocol instance) throws IOException {
                      instance.clearCache();
                      return null;
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.coprocessorExec()

    @Override
    public <T extends CoprocessorProtocol, R> Map<byte[], R> coprocessorExec(Class<T> protocol,
            byte[] startKey, byte[] endKey, Batch.Call<T,R> callable) throws IOException, Throwable {
        HTableInterface table = pool.getTable(tableNameString);
        try {
            return table.coprocessorExec(protocol, startKey, endKey, callable);
        } finally {
            table.close();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.