Examples of addPartition()


Examples of org.apache.hadoop.hive.ql.plan.AddPartitionDesc.addPartition()

    for (int num = start; num < numCh; num++) {
      ASTNode child = (ASTNode) ast.getChild(num);
      switch (child.getToken().getType()) {
      case HiveParser.TOK_PARTSPEC:
        if (currentPart != null) {
          addPartitionDesc.addPartition(currentPart, currentLocation);
          currentLocation = null;
        }
        currentPart = getPartSpec(child);
        validatePartitionValues(currentPart); // validate reserved values
        validatePartSpec(tab, currentPart, child, conf, true);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.AddPartitionDesc.addPartition()

      }
    }

    // add the last one
    if (currentPart != null) {
      addPartitionDesc.addPartition(currentPart, currentLocation);
    }

    if (addPartitionDesc.getPartitionCount() == 0) {
      // nothing to do
      return;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.AddPartitionDesc.addPartition()

        Table table = db.getTable(msckDesc.getTableName());
        AddPartitionDesc apd = new AddPartitionDesc(
            table.getDbName(), table.getTableName(), false);
        try {
          for (CheckResult.PartitionResult part : partsNotInMs) {
            apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null);
            repairOutput.add("Repair: Added partition to metastore "
                + msckDesc.getTableName() + ':' + part.getPartitionName());
          }
          db.createPartitions(apd);
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.hcatalog.api.HCatClient.addPartition()

        Thread.sleep(1000); // sleep so the next add is delayed a bit

        HCatAddPartitionDesc reinstatedPartition = HCatAddPartitionDesc.create(
                DATABASE_NAME, TABLE_NAME, null, partitionSpec).build();
        client.addPartition(reinstatedPartition);

        CatalogPartition reInstatedPartition = CatalogServiceFactory.getCatalogService().getPartition(
                metastoreUrl, DATABASE_NAME, TABLE_NAME, partitionSpec);
        Assert.assertNotNull(reInstatedPartition);
    }
View Full Code Here

Examples of org.apache.hcatalog.api.HCatClient.addPartition()

        Thread.sleep(1000); // sleep so the next add is delayed a bit

        HCatAddPartitionDesc reinstatedPartition = HCatAddPartitionDesc.create(
                DATABASE_NAME, TABLE_NAME, null, partitionSpec).build();
        client.addPartition(reinstatedPartition);

        CatalogPartition reInstatedPartition = CatalogServiceFactory.getCatalogService().getPartition(
                metastoreUrl, DATABASE_NAME, TABLE_NAME, partitionSpec);
        Assert.assertNotNull(reInstatedPartition);
    }
View Full Code Here

Examples of org.apache.helix.model.Resource.addPartition()

    if (!resourceMap.containsKey(resourceName))
    {
      resourceMap.put(resourceName, new Resource(resourceName));
    }
    Resource resource = resourceMap.get(resourceName);
    resource.addPartition(partition);

  }
}
View Full Code Here

Examples of org.apache.helix.model.Resource.addPartition()

  protected Map<String, Resource> getResourceMap()
  {
    Map<String, Resource> resourceMap = new HashMap<String, Resource>();
    Resource testResource = new Resource("testResourceName");
    testResource.setStateModelDefRef("MasterSlave");
    testResource.addPartition("testResourceName_0");
    testResource.addPartition("testResourceName_1");
    testResource.addPartition("testResourceName_2");
    testResource.addPartition("testResourceName_3");
    testResource.addPartition("testResourceName_4");
    resourceMap.put("testResourceName", testResource);
View Full Code Here

Examples of org.apache.helix.model.Resource.addPartition()

  {
    Map<String, Resource> resourceMap = new HashMap<String, Resource>();
    Resource testResource = new Resource("testResourceName");
    testResource.setStateModelDefRef("MasterSlave");
    testResource.addPartition("testResourceName_0");
    testResource.addPartition("testResourceName_1");
    testResource.addPartition("testResourceName_2");
    testResource.addPartition("testResourceName_3");
    testResource.addPartition("testResourceName_4");
    resourceMap.put("testResourceName", testResource);
View Full Code Here

Examples of org.apache.helix.model.Resource.addPartition()

    Map<String, Resource> resourceMap = new HashMap<String, Resource>();
    Resource testResource = new Resource("testResourceName");
    testResource.setStateModelDefRef("MasterSlave");
    testResource.addPartition("testResourceName_0");
    testResource.addPartition("testResourceName_1");
    testResource.addPartition("testResourceName_2");
    testResource.addPartition("testResourceName_3");
    testResource.addPartition("testResourceName_4");
    resourceMap.put("testResourceName", testResource);

    return resourceMap;
View Full Code Here

Examples of org.apache.helix.model.Resource.addPartition()

    Resource testResource = new Resource("testResourceName");
    testResource.setStateModelDefRef("MasterSlave");
    testResource.addPartition("testResourceName_0");
    testResource.addPartition("testResourceName_1");
    testResource.addPartition("testResourceName_2");
    testResource.addPartition("testResourceName_3");
    testResource.addPartition("testResourceName_4");
    resourceMap.put("testResourceName", testResource);

    return resourceMap;
  }
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.