• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Status类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status的典型用法代码示例。如果您正苦于以下问题:Java Status类的具体用法?Java Status怎么用?Java Status使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Status类属于org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher包,在下文中一共展示了Status类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: SplitLogManager

import org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status; //导入依赖的package包/类
/**
 * Wrapper around {@link #SplitLogManager(ZooKeeperWatcher, Configuration,
 * Stoppable, String, TaskFinisher)} that provides a task finisher for
 * copying recovered edits to their final destination. The task finisher
 * has to be robust because it can be arbitrarily restarted or called
 * multiple times.
 * 
 * @param zkw
 * @param conf
 * @param stopper
 * @param serverName
 */
public SplitLogManager(ZooKeeperWatcher zkw, final Configuration conf,
    Stoppable stopper, MasterServices master, String serverName) {
  this(zkw, conf, stopper, master, serverName, new TaskFinisher() {
    @Override
    public Status finish(String workerName, String logfile) {
      try {
        HLogSplitter.finishSplitLogFile(logfile, conf);
      } catch (IOException e) {
        LOG.warn("Could not finish splitting of log file " + logfile, e);
        return Status.ERR;
      }
      return Status.DONE;
    }
  });
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:28,代码来源:SplitLogManager.java


示例2: SplitLogManager

import org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status; //导入依赖的package包/类
/**
 * Wrapper around {@link #SplitLogManager(ZooKeeperWatcher zkw, Configuration conf,
 *   Stoppable stopper, MasterServices master, ServerName serverName,
 *   boolean masterRecovery, TaskFinisher tf)}
 * that provides a task finisher for copying recovered edits to their final destination.
 * The task finisher has to be robust because it can be arbitrarily restarted or called
 * multiple times.
 *
 * @param zkw the ZK watcher
 * @param conf the HBase configuration
 * @param stopper the stoppable in case anything is wrong
 * @param master the master services
 * @param serverName the master server name
 * @param masterRecovery an indication if the master is in recovery
 */
public SplitLogManager(ZooKeeperWatcher zkw, final Configuration conf,
    Stoppable stopper, MasterServices master, ServerName serverName, boolean masterRecovery) {
  this(zkw, conf, stopper, master, serverName, masterRecovery, new TaskFinisher() {
    @Override
    public Status finish(ServerName workerName, String logfile) {
      try {
        HLogSplitter.finishSplitLogFile(logfile, conf);
      } catch (IOException e) {
        LOG.warn("Could not finish splitting of log file " + logfile, e);
        return Status.ERR;
      }
      return Status.DONE;
    }
  });
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:31,代码来源:SplitLogManager.java


示例3: SplitLogManager

import org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status; //导入依赖的package包/类
/**
 * Wrapper around {@link #SplitLogManager(ZooKeeperWatcher, Configuration,
 * Stoppable, String, TaskFinisher)} that provides a task finisher for
 * copying recovered edits to their final destination. The task finisher
 * has to be robust because it can be arbitrarily restarted or called
 * multiple times.
 * 
 * @param zkw
 * @param conf
 * @param stopper
 * @param serverName
 */
public SplitLogManager(ZooKeeperWatcher zkw, final Configuration conf,
    Stoppable stopper, String serverName) {
  this(zkw, conf, stopper, serverName, new TaskFinisher() {
    @Override
    public Status finish(String workerName, String logfile) {
      String tmpname =
        ZKSplitLog.getSplitLogDirTmpComponent(workerName, logfile);
      try {
        HLogSplitter.moveRecoveredEditsFromTemp(tmpname, logfile, conf);
      } catch (IOException e) {
        LOG.warn("Could not finish splitting of log file " + logfile);
        return Status.ERR;
      }
      return Status.DONE;
    }
  });
}
 
开发者ID:lifeng5042,项目名称:RStore,代码行数:30,代码来源:SplitLogManager.java


示例4: SplitLogManager

import org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status; //导入依赖的package包/类
/**
 * Wrapper around {@link #SplitLogManager(ZooKeeperWatcher zkw, Configuration conf,
 *   Stoppable stopper, MasterServices master, ServerName serverName, TaskFinisher tf)}
 * that provides a task finisher for copying recovered edits to their final destination.
 * The task finisher has to be robust because it can be arbitrarily restarted or called
 * multiple times.
 *
 * @param zkw the ZK watcher
 * @param conf the HBase configuration
 * @param stopper the stoppable in case anything is wrong
 * @param master the master services
 * @param serverName the master server name
 */
public SplitLogManager(ZooKeeperWatcher zkw, final Configuration conf,
    Stoppable stopper, MasterServices master, ServerName serverName) {
  this(zkw, conf, stopper, master, serverName, new TaskFinisher() {
    @Override
    public Status finish(ServerName workerName, String logfile) {
      try {
        HLogSplitter.finishSplitLogFile(logfile, conf);
      } catch (IOException e) {
        LOG.warn("Could not finish splitting of log file " + logfile, e);
        return Status.ERR;
      }
      return Status.DONE;
    }
  });
}
 
开发者ID:shenli-uiuc,项目名称:PyroDB,代码行数:29,代码来源:SplitLogManager.java


示例5: SplitLogManager

import org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status; //导入依赖的package包/类
/**
 * Wrapper around {@link #SplitLogManager(ZooKeeperWatcher zkw, Configuration conf,
 *   Stoppable stopper, MasterServices master, ServerName serverName, TaskFinisher tf)}
 * that provides a task finisher for copying recovered edits to their final destination.
 * The task finisher has to be robust because it can be arbitrarily restarted or called
 * multiple times.
 * 
 * @param zkw
 * @param conf
 * @param stopper
 * @param serverName
 */
public SplitLogManager(ZooKeeperWatcher zkw, final Configuration conf,
     Stoppable stopper, MasterServices master, ServerName serverName) {
  this(zkw, conf, stopper,  master, serverName, new TaskFinisher() {
    @Override
    public Status finish(ServerName workerName, String logfile) {
      try {
        HLogSplitter.finishSplitLogFile(logfile, conf);
      } catch (IOException e) {
        LOG.warn("Could not finish splitting of log file " + logfile, e);
        return Status.ERR;
      }
      return Status.DONE;
    }
  });
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:28,代码来源:SplitLogManager.java


示例6: getDataSetWatchSuccess

import org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status; //导入依赖的package包/类
private void getDataSetWatchSuccess(String path, byte[] data, int version) {
  if (data == null) {
    if (version == Integer.MIN_VALUE) {
      // assume all done. The task znode suddenly disappeared.
      setDone(path, SUCCESS);
      return;
    }
    tot_mgr_null_data.incrementAndGet();
    LOG.fatal("logic error - got null data " + path);
    setDone(path, FAILURE);
    return;
  }
  data = this.watcher.getRecoverableZooKeeper().removeMetaData(data);
  // LOG.debug("set watch on " + path + " got data " + new String(data));
  if (TaskState.TASK_UNASSIGNED.equals(data)) {
    LOG.debug("task not yet acquired " + path + " ver = " + version);
    handleUnassignedTask(path);
  } else if (TaskState.TASK_OWNED.equals(data)) {
    heartbeat(path, version,
        TaskState.TASK_OWNED.getWriterName(data));
  } else if (TaskState.TASK_RESIGNED.equals(data)) {
    LOG.info("task " + path + " entered state " + new String(data));
    resubmitOrFail(path, FORCE);
  } else if (TaskState.TASK_DONE.equals(data)) {
    LOG.info("task " + path + " entered state " + new String(data));
    if (taskFinisher != null && !ZKSplitLog.isRescanNode(watcher, path)) {
      if (taskFinisher.finish(TaskState.TASK_DONE.getWriterName(data),
          ZKSplitLog.getFileName(path)) == Status.DONE) {
        setDone(path, SUCCESS);
      } else {
        resubmitOrFail(path, CHECK);
      }
    } else {
      setDone(path, SUCCESS);
    }
  } else if (TaskState.TASK_ERR.equals(data)) {
    LOG.info("task " + path + " entered state " + new String(data));
    resubmitOrFail(path, CHECK);
  } else {
    LOG.fatal("logic error - unexpected zk state for path = " + path
        + " data = " + new String(data));
    setDone(path, FAILURE);
  }
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:45,代码来源:SplitLogManager.java


示例7: getDataSetWatchSuccess

import org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status; //导入依赖的package包/类
private void getDataSetWatchSuccess(String path, byte[] data, int version)
throws DeserializationException {
  if (data == null) {
    if (version == Integer.MIN_VALUE) {
      // assume all done. The task znode suddenly disappeared.
      setDone(path, SUCCESS);
      return;
    }
    SplitLogCounters.tot_mgr_null_data.incrementAndGet();
    LOG.fatal("logic error - got null data " + path);
    setDone(path, FAILURE);
    return;
  }
  data = this.watcher.getRecoverableZooKeeper().removeMetaData(data);
  SplitLogTask slt = SplitLogTask.parseFrom(data);
  if (slt.isUnassigned()) {
    LOG.debug("task not yet acquired " + path + " ver = " + version);
    handleUnassignedTask(path);
  } else if (slt.isOwned()) {
    heartbeat(path, version, slt.getServerName());
  } else if (slt.isResigned()) {
    LOG.info("task " + path + " entered state: " + slt.toString());
    resubmitOrFail(path, FORCE);
  } else if (slt.isDone()) {
    LOG.info("task " + path + " entered state: " + slt.toString());
    if (taskFinisher != null && !ZKSplitLog.isRescanNode(watcher, path)) {
      if (taskFinisher.finish(slt.getServerName(), ZKSplitLog.getFileName(path)) == Status.DONE) {
        setDone(path, SUCCESS);
      } else {
        resubmitOrFail(path, CHECK);
      }
    } else {
      setDone(path, SUCCESS);
    }
  } else if (slt.isErr()) {
    LOG.info("task " + path + " entered state: " + slt.toString());
    resubmitOrFail(path, CHECK);
  } else {
    LOG.fatal("logic error - unexpected zk state for path = " + path + " data = " + slt.toString());
    setDone(path, FAILURE);
  }
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:43,代码来源:SplitLogManager.java


示例8: finish

import org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status; //导入依赖的package包/类
/**
 * finish the partially done task. workername provides clue to where the
 * partial results of the partially done tasks are present. taskname is the
 * name of the task that was put up in zookeeper.
 * <p>
 * @param workerName
 * @param taskname
 * @return DONE if task completed successfully, ERR otherwise
 */
public Status finish(String workerName, String taskname);
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:11,代码来源:SplitLogManager.java


示例9: finish

import org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status; //导入依赖的package包/类
/**
 * finish the partially done task. workername provides clue to where the
 * partial results of the partially done tasks are present. taskname is the
 * name of the task that was put up in zookeeper.
 * <p>
 * @param workerName
 * @param taskname
 * @return DONE if task completed successfully, ERR otherwise
 */
Status finish(ServerName workerName, String taskname);
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:11,代码来源:SplitLogManager.java


示例10: finish

import org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status; //导入依赖的package包/类
/**
 * finish the partially done task. workername provides clue to where the
 * partial results of the partially done tasks are present. taskname is the
 * name of the task that was put up in zookeeper.
 * <p>
 * @param workerName
 * @param taskname
 * @return DONE if task completed successfully, ERR otherwise
 */
public Status finish(ServerName workerName, String taskname);
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:11,代码来源:SplitLogManager.java



注:本文中的org.apache.hadoop.hbase.master.SplitLogManager.TaskFinisher.Status类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PushNotificationPayload类代码示例发布时间:2022-05-22
下一篇:
Java BreadCrumber类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap