Package com.cloudera.cdk.data.hbase

Examples of com.cloudera.cdk.data.hbase.HBaseDatasetRepository.create()


    String testGenericEntity = AvroUtils.inputStreamToString(
        HBaseDatasetRepositoryTest.class.getResourceAsStream("/TestGenericEntity.avsc"));
    DatasetDescriptor descriptor = new DatasetDescriptor.Builder()
        .schemaLiteral(testGenericEntity)
        .build();
    dataset = repo.create("testtable", descriptor);
    for (int i = 0; i < 10; i++) {
      dataset.put(HBaseDatasetRepositoryTest.createGenericEntity(i));
    }
  }
View Full Code Here


    // TODO: change to use namespace (CDK-140)

    DatasetDescriptor userProfileDatasetDescriptor =
        new DatasetDescriptor.Builder().schema(UserProfileModel2.SCHEMA$).build();
    userProfileDataset = repo.create("cdk_example_user_profiles.UserProfileModel2",
        userProfileDatasetDescriptor);

    DatasetDescriptor userActionsDatasetDescriptor =
        new DatasetDescriptor.Builder().schema(UserActionsModel2.SCHEMA$).build();
    userActionsDataset = repo.create("cdk_example_user_profiles.UserActionsModel2",
View Full Code Here

    userProfileDataset = repo.create("cdk_example_user_profiles.UserProfileModel2",
        userProfileDatasetDescriptor);

    DatasetDescriptor userActionsDatasetDescriptor =
        new DatasetDescriptor.Builder().schema(UserActionsModel2.SCHEMA$).build();
    userActionsDataset = repo.create("cdk_example_user_profiles.UserActionsModel2",
        userActionsDatasetDescriptor);

    DatasetDescriptor userProfileActionsDatasetDescriptor =
        new DatasetDescriptor.Builder().schema(UserProfileActionsModel2.SCHEMA$).build();
    userProfileActionsDataset = repo.create("cdk_example_user_profiles.UserProfileActionsProtocol2",
View Full Code Here

    userActionsDataset = repo.create("cdk_example_user_profiles.UserActionsModel2",
        userActionsDatasetDescriptor);

    DatasetDescriptor userProfileActionsDatasetDescriptor =
        new DatasetDescriptor.Builder().schema(UserProfileActionsModel2.SCHEMA$).build();
    userProfileActionsDataset = repo.create("cdk_example_user_profiles.UserProfileActionsProtocol2",
        userProfileActionsDatasetDescriptor);

  }

  /**
 
View Full Code Here

    HBaseDatasetRepository repo = new HBaseDatasetRepository.Builder()
        .configuration(HBaseTestUtils.getConf()).build();

    // create constituent datasets
    repo.create(tableName + ".SubEntity1", new DatasetDescriptor.Builder()
        .schema(SubEntity1.SCHEMA$)
        .build());
    repo.create(tableName + ".SubEntity2", new DatasetDescriptor.Builder()
        .schema(SubEntity2.SCHEMA$)
        .build());
View Full Code Here

    // create constituent datasets
    repo.create(tableName + ".SubEntity1", new DatasetDescriptor.Builder()
        .schema(SubEntity1.SCHEMA$)
        .build());
    repo.create(tableName + ".SubEntity2", new DatasetDescriptor.Builder()
        .schema(SubEntity2.SCHEMA$)
        .build());

    // create composite dataset
    RandomAccessDataset<Map<String, SpecificRecord>> ds = repo.load(tableName + ".SubEntity1.SubEntity2");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.