gobblin.annotation.Alias.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中gobblin.annotation.Alias.<init>()方法的一些代码示例,展示了Alias.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Alias.<init>()方法的具体详情如下:
包路径:gobblin.annotation.Alias
类名称:Alias
方法名:<init>

Alias.<init>介绍

暂无

代码示例

代码示例来源:origin: com.linkedin.gobblin/gobblin-utility

@Alias(value = "time")
public static class Factory implements LimiterFactory {
 public static final String MAX_SECONDS_KEY = "maxSeconds";
 @Override
 public Limiter buildLimiter(Config config) {
  if (!config.hasPath(MAX_SECONDS_KEY)) {
   throw new RuntimeException("Missing key " + MAX_SECONDS_KEY);
  }
  return new TimeBasedLimiter(config.getLong(MAX_SECONDS_KEY));
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-utility

@Alias(value = FACTORY_ALIAS)
public static class Factory implements LimiterFactory {
 public static final String COUNT_KEY = "maxPermits";
 @Override
 public Limiter buildLimiter(Config config) {
  if (!config.hasPath(COUNT_KEY)) {
   throw new IllegalArgumentException("Missing key " + COUNT_KEY);
  }
  return new CountBasedLimiter(config.getLong(COUNT_KEY));
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-compaction

@Alias("RecompactBasedOnCombination")
public static class Factory implements RecompactionConditionFactory {
 @Override public RecompactionCondition createRecompactionCondition (Dataset dataset) {
  return new RecompactionCombineCondition(dataset);
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-utility

@Alias(value = "qps")
public static class Factory implements LimiterFactory {
 public static final String QPS_KEY = "qps";
 @Override
 public Limiter buildLimiter(Config config) {
  if (!config.hasPath(QPS_KEY)) {
   throw new RuntimeException("Missing key " + QPS_KEY);
  }
  return new RateBasedLimiter(config.getLong(QPS_KEY));
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-runtime

@Alias("fs")
public class FsDatasetStateStoreFactory implements DatasetStateStore.Factory {
 @Override
 public DatasetStateStore<JobState.DatasetState> createStateStore(Config config) {
  try {
   return FsDatasetStateStore.createStateStore(config, FsDatasetStateStore.class.getName());
  } catch (Exception e) {
   throw new RuntimeException("Failed to create FsDatasetStateStore with factory", e);
  }
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-runtime

@Alias("metrics")
public static class Factory implements GobblinInstancePluginFactory {
 @Override
 public GobblinInstancePlugin createPlugin(GobblinInstanceDriver instance) {
  return new GobblinMetricsPlugin(instance);
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-compaction

@Alias("SimpleCompactorCompletionHook")
 public static class Factory implements CompactorCompletionListenerFactory {
  @Override public CompactorCompletionListener createCompactorCompactionListener (State state) {
   return new SimpleCompactorCompletionListener (state);
  }
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-compaction

/**
 * A {@link CompactionSuiteFactory} that handles {@link CompactionAvroSuite} creation logic.
 */
@Alias("CompactionAvroSuiteFactory")
public class CompactionAvroSuiteFactory implements CompactionSuiteFactory {
 public CompactionAvroSuite createSuite (State state) {
  return new CompactionAvroSuite (state);
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-utility

@Alias(value = "PoolBasedLimiter")
public static class Factory implements LimiterFactory {
 public static final String POOL_SIZE_KEY = "poolSize";
 @Override
 public Limiter buildLimiter(Config config) {
  if (!config.hasPath(POOL_SIZE_KEY)) {
   throw new IllegalArgumentException("Missing key " + POOL_SIZE_KEY);
  }
  return new PoolBasedLimiter(config.getInt(POOL_SIZE_KEY));
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-runtime

@Alias("noop")
public class NoopEventMetadataGenerator implements EventMetadataGenerator{
 public Map<String, String> getMetadata(JobContext jobContext, EventName eventName) {
  return ImmutableMap.of();
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-compaction

@Alias("RecompactBasedOnRatio")
public static class Factory implements RecompactionConditionFactory {
 @Override public RecompactionCondition createRecompactionCondition (Dataset dataset) {
  return new RecompactionConditionBasedOnRatio (dataset);
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-compaction

/**
 * Factory to create an instance of type {@link KafkaAuditCountHttpClient}
 */
@Alias("KafkaAuditCountHttpClientFactory")
public class KafkaAuditCountHttpClientFactory implements AuditCountClientFactory {

 public KafkaAuditCountHttpClient createAuditCountClient (State state)  {
  return new KafkaAuditCountHttpClient(state);
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-throttling-service-server

@Alias(FACTORY_ALIAS)
public static class Factory implements ThrottlingPolicyFactory.SpecificPolicyFactory {
 @Override
 public ThrottlingPolicy createPolicy(SharedLimiterKey key, SharedResourcesBroker<ThrottlingServerScopes> broker, Config config) {
  Preconditions.checkArgument(config.hasPath(COUNT_KEY), "Missing key " + COUNT_KEY);
  return new CountBasedPolicy(config.getLong(COUNT_KEY));
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-throttling-service-server

@Alias(FACTORY_ALIAS)
public static class Factory implements ThrottlingPolicyFactory.SpecificPolicyFactory {
 @Override
 public ThrottlingPolicy createPolicy(SharedLimiterKey key, SharedResourcesBroker<ThrottlingServerScopes> broker, Config config) {
  return new QPSPolicy(config);
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-runtime

@Alias("noop")
public static class Factory implements DatasetStateStore.Factory {
 @Override
 public DatasetStateStore<JobState.DatasetState> createStateStore(Config config) {
  // dummy root dir for noop state store
  Config config2 = config.withValue(ConfigurationKeys.STATE_STORE_ROOT_DIR_KEY, ConfigValueFactory.fromAnyRef(""));
  return FsDatasetStateStore.createStateStore(config2, NoopDatasetStateStore.class.getName());
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-data-management

@Alias(value="DataFlowTopologyPickerByHadoopFsSource")
public class DataFlowTopologyPickerByHadoopFsSource implements DataFlowTopologyPickerBySource {

 @Override
 public Config getPreferredRoutes(Config allTopologies, EndPoint source) {
  Preconditions.checkArgument(source instanceof HadoopFsEndPoint,
    "source is NOT expectecd class " + HadoopFsEndPoint.class.getCanonicalName());

  HadoopFsEndPoint hadoopFsSource = (HadoopFsEndPoint)source;
  String clusterName = hadoopFsSource.getClusterName();

  Preconditions.checkArgument(allTopologies.hasPath(clusterName),
    "Can not find preferred topology for cluster name " + clusterName);
  return allTopologies.getConfig(clusterName);
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-compaction

/**
 * Factory to create an instance of type {@link PinotAuditCountHttpClient}
 */
@Alias("PinotAuditCountHttpClientFactory")
public class PinotAuditCountHttpClientFactory implements AuditCountClientFactory {

 public PinotAuditCountHttpClient createAuditCountClient (State state) {
  return new PinotAuditCountHttpClient(state);
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-compaction

@Alias("RecompactBasedOnFileCount")
public static class Factory implements RecompactionConditionFactory {
 @Override public RecompactionCondition createRecompactionCondition (Dataset dataset) {
  return new RecompactionConditionBasedOnFileCount (dataset);
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-compaction

@Alias("RecompactBasedOnDuration")
public static class Factory implements RecompactionConditionFactory {
 @Override public RecompactionCondition createRecompactionCondition (Dataset dataset) {
  return new RecompactionConditionBasedOnDuration (dataset);
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-throttling-service-server

@Alias(FACTORY_ALIAS)
public static class Factory implements ThrottlingPolicyFactory.SpecificPolicyFactory {
 @Override
 public ThrottlingPolicy createPolicy(SharedLimiterKey key,
   SharedResourcesBroker<ThrottlingServerScopes> broker, Config config) {
  return new NoopPolicy();
 }
}

相关文章