Package co.cask.cdap.data2.dataset2

Examples of co.cask.cdap.data2.dataset2.NamespacedDatasetFramework


    this.classLoader = classLoader;
    this.dsMetricsCollector = dsMetricsCollector;
    this.programMetricsCollector = programMetricsCollector;
    // todo: should be passed in already namespaced. Refactor
    this.datasetFramework =
      new NamespacedDatasetFramework(datasetFramework,
                                     new DefaultDatasetNamespace(configuration, Namespace.USER));
  }
View Full Code Here


    throws DatasetManagementException, IOException {
    CConfiguration cConf = injector.getInstance(CConfiguration.class);

    DatasetDefinitionRegistryFactory registryFactory = injector.getInstance(DatasetDefinitionRegistryFactory.class);
    DatasetFramework datasetFramework =
      new NamespacedDatasetFramework(new InMemoryDatasetFramework(registryFactory),
                                     new DefaultDatasetNamespace(cConf, Namespace.SYSTEM));
    datasetFramework.addModule("orderedTable", new HBaseOrderedTableModule());
    datasetFramework.addModule("core", new CoreDatasetsModule());

    return datasetFramework;
  }
View Full Code Here

    ServiceHttpHandler serviceHttpHandler = injector.getInstance(ServiceHttpHandler.class);
    LocationFactory locationFactory = injector.getInstance(LocationFactory.class);
    appFabricClient = new AppFabricClient(httpHandler, serviceHttpHandler, locationFactory);
    DatasetFramework dsFramework = injector.getInstance(DatasetFramework.class);
    datasetFramework =
      new NamespacedDatasetFramework(dsFramework,
                                     new DefaultDatasetNamespace(cConf,  Namespace.USER));
    schedulerService = injector.getInstance(SchedulerService.class);
    schedulerService.startAndWait();
    discoveryClient = injector.getInstance(DiscoveryServiceClient.class);
    exploreExecutorService = injector.getInstance(ExploreExecutorService.class);
View Full Code Here

  protected final DatasetFramework dsFramework;

  public MetaTableUtil(DatasetFramework framework, CConfiguration conf) {
    this.dsFramework =
      new NamespacedDatasetFramework(framework, new DefaultDatasetNamespace(conf, Namespace.SYSTEM));
  }
View Full Code Here

  @Inject
  public MDSStreamMetaStore(CConfiguration conf, final TransactionSystemClient txClient, DatasetFramework framework) {

    final DatasetFramework dsFramework =
      new NamespacedDatasetFramework(framework, new DefaultDatasetNamespace(conf, Namespace.SYSTEM));

    txnl = Transactional.of(
        new TransactionExecutorFactory() {
          @Override
          public TransactionExecutor createExecutor(Iterable<TransactionAware> transactionAwares) {
View Full Code Here

  public MDSDatasetsRegistry(TransactionSystemClient txClient,
                             @Named("datasetMDS") DatasetFramework framework,
                             CConfiguration conf) {
    super(txClient);
    this.dsFramework =
      new NamespacedDatasetFramework(framework, new DefaultDatasetNamespace(conf, Namespace.SYSTEM));
  }
View Full Code Here

  @Inject
  public DatasetServiceStore(CConfiguration cConf, DatasetDefinitionRegistryFactory dsRegistryFactory,
                             @Named("serviceModule") DatasetModule datasetModule) throws Exception {
    DatasetFramework dsFramework =
      new NamespacedDatasetFramework(new InMemoryDatasetFramework(dsRegistryFactory),
                                     new DefaultDatasetNamespace(cConf, Namespace.SYSTEM));
    dsFramework.addModule("basicKVTable", datasetModule);
    table = DatasetsUtil.getOrCreateDataset(dsFramework, Constants.Service.SERVICE_INSTANCE_TABLE_NAME,
                                            NoTxKeyValueTable.class.getName(),
                                            DatasetProperties.EMPTY, null, null);
  }
View Full Code Here

  public DefaultMetricsTableFactory(final CConfiguration cConf,
                                    final DatasetFramework dsFramework) {
    try {
      this.cConf = cConf;
      this.dsFramework =
        new NamespacedDatasetFramework(dsFramework,
                                       new DefaultDatasetNamespace(cConf, Namespace.SYSTEM));

      this.entityCodecs = CacheBuilder.newBuilder().build(new CacheLoader<String, MetricsEntityCodec>() {
        @Override
        public MetricsEntityCodec load(String namespace) throws Exception {
View Full Code Here

          if (DatasetModule.class.isAssignableFrom(clazz)) {
            datasetFramework.addModule(moduleName, (DatasetModule) clazz.newInstance());
          } else if (Dataset.class.isAssignableFrom(clazz)) {
            // checking if type is in already
            if (!datasetFramework.hasType(clazz.getName())) {
              datasetFramework.addModule(moduleName, new SingleTypeModule((Class<Dataset>) clazz));
            }
          } else {
            String msg = String.format(
              "Cannot use class %s to add dataset module: it must be of type DatasetModule or Dataset",
              clazz.getName());
View Full Code Here

    DatasetModule module;
    if (DatasetModule.class.isAssignableFrom(clazz)) {
      module = (DatasetModule) clazz.newInstance();
    } else if (Dataset.class.isAssignableFrom(clazz)) {
      module = new SingleTypeModule(clazz);
    } else {
      String msg = String.format(
        "Cannot use class %s to instantiate dataset module: it must be of type DatasetModule or Dataset",
        clazz.getName());
      throw new IllegalArgumentException(msg);
View Full Code Here

TOP

Related Classes of co.cask.cdap.data2.dataset2.NamespacedDatasetFramework

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.