@JsonCreator public EasySubScan( @JsonProperty("userName") String userName, @JsonProperty("files") List<FileWorkImpl> files, // @JsonProperty("storage") StoragePluginConfig storageConfig, // @JsonProperty("format") FormatPluginConfig formatConfig, // @JacksonInject StoragePluginRegistry engineRegistry, // @JsonProperty("columns") List<SchemaPath> columns, // @JsonProperty("selectionRoot") String selectionRoot ) throws IOException, ExecutionSetupException { super(userName); this.formatPlugin = (EasyFormatPlugin<?>) engineRegistry.getFormatPlugin(storageConfig, formatConfig); Preconditions.checkNotNull(this.formatPlugin); this.files = files; this.columns = columns; this.selectionRoot = selectionRoot; }
@JsonCreator public EasyGroupScan( @JsonProperty("userName") String userName, @JsonProperty("files") List<String> files, // @JsonProperty("storage") StoragePluginConfig storageConfig, // @JsonProperty("format") FormatPluginConfig formatConfig, // @JacksonInject StoragePluginRegistry engineRegistry, // @JsonProperty("columns") List<SchemaPath> columns, @JsonProperty("selectionRoot") String selectionRoot ) throws IOException, ExecutionSetupException { this(ImpersonationUtil.resolveUserName(userName), new FileSelection(files, true), (EasyFormatPlugin<?>)engineRegistry.getFormatPlugin(storageConfig, formatConfig), columns, selectionRoot); }
@JsonCreator public ParquetGroupScan( // @JsonProperty("userName") String userName, @JsonProperty("entries") List<ReadEntryWithPath> entries, // @JsonProperty("storage") StoragePluginConfig storageConfig, // @JsonProperty("format") FormatPluginConfig formatConfig, // @JacksonInject StoragePluginRegistry engineRegistry, // @JsonProperty("columns") List<SchemaPath> columns, // @JsonProperty("selectionRoot") String selectionRoot // ) throws IOException, ExecutionSetupException { super(ImpersonationUtil.resolveUserName(userName)); this.columns = columns; if (formatConfig == null) { formatConfig = new ParquetFormatConfig(); } Preconditions.checkNotNull(storageConfig); Preconditions.checkNotNull(formatConfig); this.formatPlugin = (ParquetFormatPlugin) engineRegistry.getFormatPlugin(storageConfig, formatConfig); Preconditions.checkNotNull(formatPlugin); this.fs = ImpersonationUtil.createFileSystem(getUserName(), formatPlugin.getFsConf()); this.formatConfig = formatPlugin.getConfig(); this.entries = entries; this.selectionRoot = selectionRoot; init(); }
@JsonCreator public EasyWriter( @JsonProperty("child") PhysicalOperator child, @JsonProperty("userName") String userName, @JsonProperty("location") String location, @JsonProperty("options") WriterOptions options, @JsonProperty("sortColumns") List<String> sortColumns, @JsonProperty("storage") StoragePluginConfig storageConfig, @JsonProperty("format") FormatPluginConfig formatConfig, @JacksonInject StoragePluginRegistry engineRegistry) throws IOException, ExecutionSetupException { super(child, userName, options); this.plugin = (FileSystemPlugin) engineRegistry.getPlugin(storageConfig); this.formatPlugin = (EasyFormatPlugin<?>) engineRegistry.getFormatPlugin(storageConfig, formatConfig); Preconditions.checkNotNull(formatPlugin, "Unable to load format plugin for provided format config."); this.location = location; }
@JsonCreator public EasyWriter( @JsonProperty("child") PhysicalOperator child, @JsonProperty("location") String location, @JsonProperty("partitionColumns") List<String> partitionColumns, @JsonProperty("storageStrategy") StorageStrategy storageStrategy, @JsonProperty("storage") StoragePluginConfig storageConfig, @JsonProperty("format") FormatPluginConfig formatConfig, @JacksonInject StoragePluginRegistry engineRegistry) throws IOException, ExecutionSetupException { super(child); this.formatPlugin = (EasyFormatPlugin<?>) engineRegistry.getFormatPlugin(storageConfig, formatConfig); Preconditions.checkNotNull(formatPlugin, "Unable to load format plugin for provided format config."); this.location = location; this.partitionColumns = partitionColumns; setStorageStrategy(storageStrategy); }
@JsonCreator public EasyGroupScan( @JsonProperty("userName") String userName, @JsonProperty("files") List<String> files, // @JsonProperty("storage") StoragePluginConfig storageConfig, // @JsonProperty("format") FormatPluginConfig formatConfig, // @JacksonInject StoragePluginRegistry engineRegistry, // @JsonProperty("columns") List<SchemaPath> columns, @JsonProperty("selectionRoot") String selectionRoot ) throws IOException, ExecutionSetupException { this(ImpersonationUtil.resolveUserName(userName), FileSelection.create(null, files, selectionRoot), (EasyFormatPlugin<?>)engineRegistry.getFormatPlugin(storageConfig, formatConfig), columns, selectionRoot); }
@JsonCreator public ParquetRowGroupScan( // @JacksonInject StoragePluginRegistry registry, // @JsonProperty("userName") String userName, // @JsonProperty("storage") StoragePluginConfig storageConfig, // @JsonProperty("format") FormatPluginConfig formatConfig, // @JsonProperty("entries") LinkedList<RowGroupReadEntry> rowGroupReadEntries, // @JsonProperty("columns") List<SchemaPath> columns, // @JsonProperty("selectionRoot") String selectionRoot, // @JsonProperty("filter") LogicalExpression filter ) throws ExecutionSetupException { this(userName, (ParquetFormatPlugin) registry.getFormatPlugin(Preconditions.checkNotNull(storageConfig), Preconditions.checkNotNull(formatConfig)), rowGroupReadEntries, columns, selectionRoot, filter); }
@JsonCreator public ParquetWriter( @JsonProperty("child") PhysicalOperator child, @JsonProperty("location") String location, @JsonProperty("partitionColumns") List<String> partitionColumns, @JsonProperty("storageStrategy") StorageStrategy storageStrategy, @JsonProperty("storage") StoragePluginConfig storageConfig, @JacksonInject StoragePluginRegistry engineRegistry) throws IOException, ExecutionSetupException { super(child); this.formatPlugin = (ParquetFormatPlugin) engineRegistry.getFormatPlugin(storageConfig, new ParquetFormatConfig()); Preconditions.checkNotNull(formatPlugin, "Unable to load format plugin for provided format config."); this.location = location; this.partitionColumns = partitionColumns; setStorageStrategy(storageStrategy); }
public Object findInjectableValueId(AnnotatedMember paramAnnotatedMember) { JacksonInject localJacksonInject = (JacksonInject)paramAnnotatedMember.getAnnotation(JacksonInject.class); if (localJacksonInject == null) return null; String str = localJacksonInject.value(); if (str.length() == 0) { if (!(paramAnnotatedMember instanceof AnnotatedMethod)) return paramAnnotatedMember.getRawType().getName(); AnnotatedMethod localAnnotatedMethod = (AnnotatedMethod)paramAnnotatedMember; if (localAnnotatedMethod.getParameterCount() == 0) return paramAnnotatedMember.getRawType().getName(); return localAnnotatedMethod.getRawParameterType(0).getName(); } return str; }
/** * Creates a new {@link MemcachedBucketConfig}. * * @param env the bootstrap part of environment object. * @param rev the revision of the config. * @param name the name of the bucket. * @param uri the URI for this bucket. * @param streamingUri the streaming URI for this bucket. * @param nodeInfos related node information. * @param portInfos port info for the nodes, including services. */ @JsonCreator public DefaultMemcachedBucketConfig( @JacksonInject("env")ConfigParserEnvironment env, @JsonProperty("rev") long rev, @JsonProperty("name") String name, @JsonProperty("uri") String uri, @JsonProperty("streamingUri") String streamingUri, @JsonProperty("nodes") List<NodeInfo> nodeInfos, @JsonProperty("nodesExt") List<PortInfo> portInfos, @JsonProperty("bucketCapabilities") List<BucketCapabilities> bucketCapabilities) { super(name, BucketNodeLocator.KETAMA, uri, streamingUri, nodeInfos, portInfos, bucketCapabilities); this.env = env; this.rev = rev; this.ketamaNodes = new TreeMap<Long, NodeInfo>(); populateKetamaNodes(); }
@JsonCreator public KafkaConsumer( @JsonProperty("consumerProps") Properties consumerProps, @JsonProperty("topic") String topic, @JsonProperty("readers") int readers, @JacksonInject MessageRouter router, @JacksonInject ObjectMapper jsonMapper ) { Preconditions.checkNotNull(consumerProps); Preconditions.checkNotNull(topic); Preconditions.checkNotNull(consumerProps.getProperty("group.id")); Preconditions.checkNotNull(consumerProps.getProperty("zookeeper.connect")); String timeoutStr = consumerProps.getProperty("consumer.timeout.ms"); Preconditions.checkNotNull(timeoutStr); Preconditions.checkArgument(Long.parseLong(timeoutStr) > 0); this.consumerProps = consumerProps; this.topic = topic; this.readers = readers == 0 ? 1 : readers; this.router = router; this.jsonMapper = jsonMapper; }
@JsonCreator public FileSystemCreateTableEntry(@JsonProperty("storageConfig") FileSystemConfig storageConfig, @JsonProperty("formatConfig") FormatPluginConfig formatConfig, @JsonProperty("location") String location, @JsonProperty("partitionColumn") List<String> partitionColumns, @JacksonInject StoragePluginRegistry engineRegistry) throws ExecutionSetupException { this.storageConfig = storageConfig; this.formatPlugin = engineRegistry.getFormatPlugin(storageConfig, formatConfig); this.location = location; this.partitionColumns = partitionColumns; }
@JsonCreator public FileSystemTrainModelEntry(@JsonProperty("storageConfig") FileSystemConfig storageConfig, @JsonProperty("formatConfig") FormatPluginConfig formatConfig, @JsonProperty("location") String location, @JsonProperty("partitionColumn") List<String> partitionColumns, @JacksonInject StoragePluginRegistry engineRegistry) throws ExecutionSetupException { this.storageConfig = storageConfig; this.formatPlugin = engineRegistry.getFormatPlugin(storageConfig, formatConfig); this.location = location; this.partitionColumns = partitionColumns; }
@JsonCreator public SystemTableScan( // @JsonProperty("table") SystemTable table, // @JacksonInject StoragePluginRegistry engineRegistry // ) throws IOException, ExecutionSetupException { super((String)null); this.table = table; this.plugin = (SystemTablePlugin) engineRegistry.getPlugin(SystemTablePluginConfig.INSTANCE); }
@JsonCreator public EasyWriter( @JsonProperty("child") PhysicalOperator child, @JsonProperty("location") String location, @JsonProperty("partitionColumns") List<String> partitionColumns, @JsonProperty("storage") StoragePluginConfig storageConfig, @JsonProperty("format") FormatPluginConfig formatConfig, @JacksonInject StoragePluginRegistry engineRegistry) throws IOException, ExecutionSetupException { super(child); this.formatPlugin = (EasyFormatPlugin<?>) engineRegistry.getFormatPlugin(storageConfig, formatConfig); Preconditions.checkNotNull(formatPlugin, "Unable to load format plugin for provided format config."); this.location = location; this.partitionColumns = partitionColumns; }
@JsonCreator public ParquetRowGroupScan( // @JacksonInject StoragePluginRegistry registry, // @JsonProperty("userName") String userName, // @JsonProperty("storage") StoragePluginConfig storageConfig, // @JsonProperty("format") FormatPluginConfig formatConfig, // @JsonProperty("entries") LinkedList<RowGroupReadEntry> rowGroupReadEntries, // @JsonProperty("columns") List<SchemaPath> columns, // @JsonProperty("selectionRoot") String selectionRoot // ) throws ExecutionSetupException { this(userName, (ParquetFormatPlugin) registry.getFormatPlugin(Preconditions.checkNotNull(storageConfig), formatConfig == null ? new ParquetFormatConfig() : formatConfig), rowGroupReadEntries, columns, selectionRoot); }
@JsonCreator public ParquetWriter( @JsonProperty("child") PhysicalOperator child, @JsonProperty("location") String location, @JsonProperty("partitionColumns") List<String> partitionColumns, @JsonProperty("storage") StoragePluginConfig storageConfig, @JacksonInject StoragePluginRegistry engineRegistry) throws IOException, ExecutionSetupException { super(child); this.formatPlugin = (ParquetFormatPlugin) engineRegistry.getFormatPlugin(storageConfig, new ParquetFormatConfig()); Preconditions.checkNotNull(formatPlugin, "Unable to load format plugin for provided format config."); this.location = location; this.partitionColumns = partitionColumns; }
@JsonCreator public MongoSubScan( @JacksonInject StoragePluginRegistry registry, @JsonProperty("userName") String userName, @JsonProperty("mongoPluginConfig") StoragePluginConfig mongoPluginConfig, @JsonProperty("chunkScanSpecList") LinkedList<MongoSubScanSpec> chunkScanSpecList, @JsonProperty("columns") List<SchemaPath> columns) throws ExecutionSetupException { super(userName); this.columns = columns; this.mongoPluginConfig = (MongoStoragePluginConfig) mongoPluginConfig; this.mongoStoragePlugin = (MongoStoragePlugin) registry .getPlugin(mongoPluginConfig); this.chunkScanSpecList = chunkScanSpecList; }
@JsonCreator public MongoGroupScan( @JsonProperty("userName") String userName, @JsonProperty("mongoScanSpec") MongoScanSpec scanSpec, @JsonProperty("storage") MongoStoragePluginConfig storagePluginConfig, @JsonProperty("columns") List<SchemaPath> columns, @JacksonInject StoragePluginRegistry pluginRegistry) throws IOException, ExecutionSetupException { this(userName, (MongoStoragePlugin) pluginRegistry.getPlugin(storagePluginConfig), scanSpec, columns); }
@JsonCreator public JdbcSubScan( @JsonProperty("sql") String sql, @JsonProperty("config") StoragePluginConfig config, @JacksonInject StoragePluginRegistry plugins) throws ExecutionSetupException { super(""); this.sql = sql; this.plugin = (JdbcStoragePlugin) plugins.getPlugin(config); }
@JsonCreator public JdbcGroupScan( @JsonProperty("sql") String sql, @JsonProperty("config") StoragePluginConfig config, @JsonProperty("rows") double rows, @JacksonInject StoragePluginRegistry plugins) throws ExecutionSetupException { super(""); this.sql = sql; this.plugin = (JdbcStoragePlugin) plugins.getPlugin(config); this.rows = rows; }
@JsonCreator public HBaseGroupScan(@JsonProperty("userName") String userName, @JsonProperty("hbaseScanSpec") HBaseScanSpec hbaseScanSpec, @JsonProperty("storage") HBaseStoragePluginConfig storagePluginConfig, @JsonProperty("columns") List<SchemaPath> columns, @JacksonInject StoragePluginRegistry pluginRegistry) throws IOException, ExecutionSetupException { this (userName, (HBaseStoragePlugin) pluginRegistry.getPlugin(storagePluginConfig), hbaseScanSpec, columns); }
@JsonCreator public HBaseSubScan(@JacksonInject StoragePluginRegistry registry, @JsonProperty("userName") String userName, @JsonProperty("storage") StoragePluginConfig storage, @JsonProperty("regionScanSpecList") LinkedList<HBaseSubScanSpec> regionScanSpecList, @JsonProperty("columns") List<SchemaPath> columns) throws ExecutionSetupException { super(userName); hbaseStoragePlugin = (HBaseStoragePlugin) registry.getPlugin(storage); this.regionScanSpecList = regionScanSpecList; this.storage = (HBaseStoragePluginConfig) storage; this.columns = columns; }
@JsonCreator public HiveScan(@JsonProperty("userName") final String userName, @JsonProperty("hive-table") final HiveReadEntry hiveReadEntry, @JsonProperty("storage-plugin") final String storagePluginName, @JsonProperty("columns") final List<SchemaPath> columns, @JacksonInject final StoragePluginRegistry pluginRegistry) throws ExecutionSetupException { super(userName); this.hiveReadEntry = hiveReadEntry; this.storagePluginName = storagePluginName; this.storagePlugin = (HiveStoragePlugin) pluginRegistry.getPlugin(storagePluginName); this.columns = columns; getSplitsWithUGI(); endpoints = storagePlugin.getContext().getBits(); }
@JsonCreator public HiveDrillNativeParquetScan(@JsonProperty("userName") String userName, @JsonProperty("hive-table") HiveReadEntry hiveReadEntry, @JsonProperty("storage-plugin") String storagePluginName, @JsonProperty("columns") List<SchemaPath> columns, @JacksonInject StoragePluginRegistry pluginRegistry) throws ExecutionSetupException { super(userName, hiveReadEntry, storagePluginName, columns, pluginRegistry); }
@JsonCreator public DictionaryLookupPOP(@JacksonInject StoragePluginRegistry registry, @JsonProperty("child") PhysicalOperator child, @JsonProperty("dictionaryEncodedFields") Map<String, GlobalDictionaryFieldInfo> dictionaryEncodedFields) { super(child); this.registry = registry; this.dictionaryEncodedFields = dictionaryEncodedFields; }
@JsonCreator public WriterCommitterPOP( @JsonProperty("tempLocation") String tempLocation, @JsonProperty("finalLocation") String finalLocation, @JsonProperty("userName") String userName, @JsonProperty("pluginConfig") FileSystemConfig config, @JsonProperty("child") PhysicalOperator child, @JacksonInject StoragePluginRegistry engineRegistry ) throws ExecutionSetupException { super(child, userName); this.tempLocation = tempLocation; this.finalLocation = finalLocation; this.plugin = Preconditions.checkNotNull((FileSystemPlugin) engineRegistry.getPlugin(config)); }
@JsonCreator public InfoSchemaGroupScan(@JsonProperty("table") InfoSchemaTableType table, @JsonProperty("filter") InfoSchemaFilter filter, @JacksonInject StoragePluginRegistry pluginRegistry ) throws ExecutionSetupException { this(table, filter, fromRegistry(pluginRegistry)); }
@JsonCreator public InfoSchemaSubScan(@JsonProperty("table") InfoSchemaTableType table, @JsonProperty("filter") InfoSchemaFilter filter, @JacksonInject StoragePluginRegistry pluginRegistry ) throws ExecutionSetupException { this(table, filter, InfoSchemaGroupScan.fromRegistry(pluginRegistry)); }
/**************************************** * Members NOT used in equals()/hashCode()! ****************************************/ // NONE! @JsonCreator public SystemTableScan( // @JsonProperty("table") SystemTable table, // @JacksonInject StoragePluginRegistry engineRegistry // ) throws IOException, ExecutionSetupException { super(null, table.getSchema(), null); this.table = table; this.plugin = (SystemTablePlugin) engineRegistry.getPlugin(SystemTablePluginConfig.INSTANCE); }
@JsonCreator public FileSystemCreateTableEntry(@JsonProperty("userName") String userName, @JsonProperty("storageConfig") FileSystemConfig storageConfig, @JsonProperty("formatConfig") FormatPluginConfig formatConfig, @JsonProperty("location") String location, @JsonProperty("options") WriterOptions options, @JacksonInject StoragePluginRegistry engineRegistry) throws ExecutionSetupException { this.userName = userName; this.plugin = (FileSystemPlugin) engineRegistry.getPlugin(storageConfig); this.formatPlugin = engineRegistry.getFormatPlugin(storageConfig, formatConfig); this.location = location; this.options = options; }
@JsonCreator public ParquetWriter( @JsonProperty("child") PhysicalOperator child, @JsonProperty("userName") String userName, @JsonProperty("location") String location, @JsonProperty("options") WriterOptions options, @JsonProperty("storage") StoragePluginConfig storageConfig, @JacksonInject StoragePluginRegistry engineRegistry) throws IOException, ExecutionSetupException { super(child, userName, options); this.plugin = (FileSystemPlugin) engineRegistry.getPlugin(storageConfig); this.formatPlugin = (ParquetFormatPlugin) engineRegistry.getFormatPlugin(storageConfig, new ParquetFormatConfig()); Preconditions.checkNotNull(formatPlugin, "Unable to load format plugin for provided format config."); this.location = location; }
@JsonCreator public HBaseGroupScan(@JsonProperty("userName") String userName, @JsonProperty("hbaseScanSpec") HBaseScanSpec hbaseScanSpec, @JsonProperty("storage") HBaseStoragePluginConfig storagePluginConfig, @JsonProperty("columns") List<SchemaPath> columns, @JacksonInject StoragePluginRegistry pluginRegistry, @JsonProperty("schema") BatchSchema schema, @JsonProperty("tableSchemaPath") List<String> tablePath) throws IOException, ExecutionSetupException { this (userName, (HBaseStoragePlugin) pluginRegistry.getPlugin(storagePluginConfig), hbaseScanSpec, columns, schema, tablePath); }
@JsonCreator public HBaseSubScan(@JacksonInject StoragePluginRegistry registry, @JsonProperty("userName") String userName, @JsonProperty("storage") StoragePluginConfig storage, @JsonProperty("regionScanSpecList") LinkedList<HBaseSubScanSpec> regionScanSpecList, @JsonProperty("columns") List<SchemaPath> columns, @JsonProperty("schema") BatchSchema schema, @JsonProperty("tableSchemaPath") List<String> tableSchemaPath ) throws ExecutionSetupException { super(userName, schema, tableSchemaPath, columns); hbaseStoragePlugin = (HBaseStoragePlugin) registry.getPlugin(storage); this.regionScanSpecList = regionScanSpecList; this.storage = (HBaseStoragePluginConfig) storage; this.columns = columns; }
@JsonCreator public ElasticIndex( @JacksonInject(CurentNameInjectable.CURRENT_NAME) String name, @JsonProperty("aliases") List<String> aliases, @JsonProperty("mappings") Map<String, ElasticMapping> mappings) { this.name = name; this.aliases = aliases == null ? ImmutableList.<String>of() : ImmutableList.copyOf(aliases); this.mappings = asList(mappings); }
@JsonCreator public ElasticMapping( @JacksonInject(CurentNameInjectable.CURRENT_NAME) String name, @JsonProperty("properties") Map<String, ElasticField> fields) { super(); this.name = name; this.fields = asList(fields); this.composite = false; }
@JsonCreator public DynamoSubScan(@JacksonInject StoragePluginRegistry registry, @JsonProperty("storage") StoragePluginConfig storage, @JsonProperty("specs") List<DynamoSubReadSpec> subReadList, @JsonProperty("columns") List<SchemaPath> columns, @JsonProperty("client") ClientProperties client, @JsonProperty("scanProps") ParallelScanProperties scanProps, @JsonProperty("table") DynamoTableDefinition table) throws ExecutionSetupException { this((DynamoStoragePlugin) registry.getPlugin(storage), storage, subReadList, columns, client, scanProps, table); }
@JsonCreator public DynamoGroupScan(@JsonProperty(DynamoGroupScanSpec.NAME) DynamoGroupScanSpec dynamoSpec, @JsonProperty("storage") DynamoStoragePluginConfig storagePluginConfig, @JsonProperty("columns") List<SchemaPath> columns, @JsonProperty("scan") ParallelScanProperties scan, @JsonProperty("client") ClientProperties client, @JacksonInject StoragePluginRegistry pluginRegistry) throws IOException, ExecutionSetupException { this((DynamoStoragePlugin) pluginRegistry.getPlugin(storagePluginConfig), dynamoSpec, columns, scan, client); }
/** * Constructor */ @JsonCreator public Config(@JacksonInject("location") URI location, @JsonProperty("includes") List<String> includes, @JsonProperty("properties") @JsonDeserialize(as = LinkedHashMap.class, keyAs = String.class, contentAs = String.class) Map<String, String> properties, @JsonProperty("paths") @JsonDeserialize(contentAs = Path.class) List<Path> paths, @JsonProperty("repeats") @JsonDeserialize(contentAs = Repeat.class) List<Repeat> repeats) { this(location, includes, properties == null ? null : ConfigUtil.mapToList(properties, Property::new), paths, repeats); }