当前位置: 首页>>代码示例>>Java>>正文


Java ExternalConsistencyMode类代码示例

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


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

示例1: initKuduConfig

import org.apache.kudu.client.ExternalConsistencyMode; //导入依赖的package包/类
/***
 * A simple init of the kudu connection config. Override this if you would like to fine tune hte connection parameters
 * @param kuduTableName The Kudu table name
 * @param kuduMasters The master hosts of the Kudu cluster.
 */
public void initKuduConfig(String kuduTableName, List<String> kuduMasters)
{
  apexKuduConnectionBuilder = new ApexKuduConnection.ApexKuduConnectionBuilder()
    .withTableName(kuduTableName)
    .withExternalConsistencyMode(ExternalConsistencyMode.COMMIT_WAIT)
    .withFlushMode(SessionConfiguration.FlushMode.AUTO_FLUSH_SYNC)
    .withNumberOfBossThreads(1)
    .withNumberOfWorkerThreads(2)
    .withSocketReadTimeOutAs(3000)
    .withOperationTimeOutAs(3000);
  for ( String aMasterAndHost: kuduMasters ) {
    apexKuduConnectionBuilder = apexKuduConnectionBuilder.withAPossibleMasterHostAs(aMasterAndHost);
  }
  apexKuduConnectionInfo = apexKuduConnectionBuilder;
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:21,代码来源:IncrementalStepScanInputOperator.java

示例2: openKuduSession

import org.apache.kudu.client.ExternalConsistencyMode; //导入依赖的package包/类
private KuduSession openKuduSession(List<ConfigIssue> issues) {
  KuduSession session = kuduClient.newSession();
  try {
    session.setExternalConsistencyMode(ExternalConsistencyMode.valueOf(configBean.consistencyMode.name()));
  } catch (IllegalArgumentException ex) {
    issues.add(
        getContext().createConfigIssue(
            Groups.KUDU.name(),
            KuduConfigBean.CONF_PREFIX + CONSISTENCY_MODE,
            Errors.KUDU_02
        )
    );
  }
  session.setMutationBufferSpace(configBean.mutationBufferSpace);
  session.setFlushMode(SessionConfiguration.FlushMode.MANUAL_FLUSH);
  return session;
}
 
开发者ID:streamsets,项目名称:datacollector,代码行数:18,代码来源:KuduTarget.java

示例3: initKuduConfig

import org.apache.kudu.client.ExternalConsistencyMode; //导入依赖的package包/类
private void initKuduConfig(String kuduTableName, List<String> kuduMasters)
{
  apexKuduConnectionBuilder = new ApexKuduConnection.ApexKuduConnectionBuilder()
    .withTableName(kuduTableName)
    .withExternalConsistencyMode(ExternalConsistencyMode.COMMIT_WAIT)
    .withFlushMode(SessionConfiguration.FlushMode.AUTO_FLUSH_SYNC)
    .withNumberOfBossThreads(1)
    .withNumberOfWorkerThreads(2)
    .withSocketReadTimeOutAs(3000)
    .withOperationTimeOutAs(3000);
  for ( String aMasterAndHost: kuduMasters ) {
    apexKuduConnectionBuilder = apexKuduConnectionBuilder.withAPossibleMasterHostAs(aMasterAndHost);
  }
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:15,代码来源:BaseKuduOutputOperator.java

示例4: getKuduConnectionConfig

import org.apache.kudu.client.ExternalConsistencyMode; //导入依赖的package包/类
@Override
ApexKuduConnection.ApexKuduConnectionBuilder getKuduConnectionConfig()
{
  return new ApexKuduConnection.ApexKuduConnectionBuilder()
      .withAPossibleMasterHostAs(KuduClientTestCommons.kuduMasterAddresses)
      .withTableName(KuduClientTestCommons.tableName)
      .withExternalConsistencyMode(ExternalConsistencyMode.COMMIT_WAIT)
      .withFlushMode(SessionConfiguration.FlushMode.AUTO_FLUSH_SYNC)
      .withNumberOfBossThreads(1)
      .withNumberOfWorkerThreads(2)
      .withSocketReadTimeOutAs(3000)
      .withOperationTimeOutAs(3000);
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:14,代码来源:SimpleKuduOutputOperator.java

示例5: setExternalConsistencyMode

import org.apache.kudu.client.ExternalConsistencyMode; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void setExternalConsistencyMode(ExternalConsistencyMode consistencyMode) {
  session.setExternalConsistencyMode(consistencyMode);
}
 
开发者ID:danburkert,项目名称:kudu-ts,代码行数:6,代码来源:WriteBatch.java

示例6: getExternalConsistencyMode

import org.apache.kudu.client.ExternalConsistencyMode; //导入依赖的package包/类
public ExternalConsistencyMode getExternalConsistencyMode()
{
  return externalConsistencyMode;
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:5,代码来源:KuduExecutionContext.java

示例7: setExternalConsistencyMode

import org.apache.kudu.client.ExternalConsistencyMode; //导入依赖的package包/类
public void setExternalConsistencyMode(ExternalConsistencyMode externalConsistencyMode)
{
  this.externalConsistencyMode = externalConsistencyMode;
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:5,代码来源:KuduExecutionContext.java

示例8: withExternalConsistencyMode

import org.apache.kudu.client.ExternalConsistencyMode; //导入依赖的package包/类
public ApexKuduConnectionBuilder withExternalConsistencyMode(ExternalConsistencyMode externalConsistencyMode)
{
  this.externalConsistencyMode = externalConsistencyMode;
  isExternalConsistencyModeSet = true;
  return this;
}
 
开发者ID:apache,项目名称:apex-malhar,代码行数:7,代码来源:ApexKuduConnection.java


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