Package com.alibaba.wasp.storage

Examples of com.alibaba.wasp.storage.StorageActionManager


  public boolean connect() {
    try {
      Configuration conf = getConf();
      metaTable = conf.get(FConstants.METASTORE_TABLE,
          FConstants.DEFAULT_METASTORE_TABLE);
      hbaseActionManager = new StorageActionManager(conf);
    } catch (Exception e) {
      return false;
    }
    return true;
  }
View Full Code Here


    return transcation;
  }

  @Test
  public void testTwoPhaseCommit() throws IOException {
    StorageActionManager actionManager = new StorageActionManager(TEST_UTIL.getConfiguration());
    TwoPhaseCommitProtocol twoPhaseCommit =  TwoPhaseCommit.getInstance(actionManager);
    boolean ret = twoPhaseCommit.submit(getTranscation());
    assertTrue(ret);
  }
View Full Code Here

public class ResultInHBasePrinter {

  public static void printTablesRs(String type, Configuration conf,
      String tablename, String indexName, Log LOG) throws IOException {
    StorageActionManager manager = new StorageActionManager(conf);

    String indexTableName = FConstants.WASP_TABLE_INDEX_PREFIX + tablename
        + FConstants.TABLE_ROW_SEP + indexName;

    try {
      LOG.info("rs begin " + type);
      // manager.scan(".META.", new Scan());
      // manager.scan(StorageTableNameBuilder.buildEntityTableName("TEST_TABLE"),
      // new Scan());
      // ResultScanner fmeters = manager.scan("_FMETA_", new Scan());
      ResultScanner indexrs = manager.scan(indexTableName, new Scan());
      ResultScanner rs = manager.scan(FConstants.WASP_TABLE_ENTITY_PREFIX
          + tablename, new Scan());
      // LOG.info("rs fmeta");
      // print(fmeters);
      LOG.info("rs table " + type);
      print(rs, LOG);
View Full Code Here

  public static void printFMETA(Configuration conf, Log LOG) throws IOException {
    printTable("fmeta", "_FMETA_", conf, LOG);
  }

  public static void printTable(String type, String table, Configuration conf, Log LOG) throws IOException {
    StorageActionManager manager = new StorageActionManager(conf);
    try {
      ResultScanner fmeters = manager.scan(table, new Scan());
      LOG.info("rs " + type);
      print(fmeters, LOG);
      LOG.info("rs end");
    } catch (UnsupportedEncodingException e1) {
      e1.printStackTrace();
View Full Code Here

  public PublisherBuilder() {
  }

  public Publisher build(Configuration conf, EntityGroupInfo entityGroupInfo) {
    try {
      return new Publisher(entityGroupInfo, new StorageActionManager(conf));
    } catch (IOException e) {
      LOG.error("new HBaseActionManager in Subscriber error", e);
      return null;
    }
  }
View Full Code Here

  public SubscriberBuilder() {
  }

  public Subscriber build(EntityGroup entityGroup) {
    try {
      return new Subscriber(entityGroup, new StorageActionManager(
          entityGroup.getConf()));
    } catch (IOException e) {
      LOG.error("new HBaseActionManager in Subscriber error", e);
      return null;
    }
View Full Code Here

    this.rpcTimeout = conf.getInt(FConstants.WASP_RPC_TIMEOUT_KEY,
        FConstants.DEFAULT_WASP_RPC_TIMEOUT);

    this.abortRequested = false;
    this.stopped = false;
    this.actionManager = new StorageActionManager(conf);

    // Server to handle client requests.
    String hostname = Strings.domainNamePointerToHostName(DNS.getDefaultHost(
        conf.get("wasp.fserver.dns.interface", "default"),
        conf.get("wasp.fserver.dns.nameserver", "default")));
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.storage.StorageActionManager

Copyright © 2018 www.massapicom. 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.