/** * Create an instance of {@link XPartSpec } * */ public XPartSpec createXPartSpec() { return new XPartSpec(); }
/** * Create an instance of {@link XPartSpec } * */ public XPartSpec createXPartSpec() { return new XPartSpec(); }
xp.setUpdatePeriod(XUpdatePeriod.valueOf(upParam)); LinkedHashMap<String, String> partSpec = p.getSpec(); xp.setFullPartitionSpec(new XPartSpec()); for (Map.Entry<String, String> entry : partSpec.entrySet()) { XPartSpecElement e = new XPartSpecElement(); xp.setNonTimePartitionSpec(new XPartSpec()); for (Map.Entry<String, String> entry : partSpec.entrySet()) { if (timePartCols.contains(entry.getKey())) {
xp.setUpdatePeriod(XUpdatePeriod.valueOf(upParam)); LinkedHashMap<String, String> partSpec = p.getSpec(); xp.setFullPartitionSpec(new XPartSpec()); for (Map.Entry<String, String> entry : partSpec.entrySet()) { XPartSpecElement e = new XPartSpecElement(); xp.setNonTimePartitionSpec(new XPartSpec()); for (Map.Entry<String, String> entry : partSpec.entrySet()) { if (timePartCols.contains(entry.getKey())) {
private XPartition createPartition(String cubeTableName, final List<XTimePartSpecElement> timePartSpecs, String updatePeriod) { XPartition xp = cubeObjectFactory.createXPartition(); xp.setLocation(new Path(new File("target").getAbsolutePath(), "part/test_part").toString()); xp.setFactOrDimensionTableName(cubeTableName); xp.setNonTimePartitionSpec(new XPartSpec()); xp.setTimePartitionSpec(new XTimePartSpec()); xp.setPartitionParameters(new XProperties()); xp.setSerdeParameters(new XProperties()); for (XTimePartSpecElement timePartSpec : timePartSpecs) { xp.getTimePartitionSpec().getPartSpecElement().add(timePartSpec); } if (updatePeriod==null) { xp.setUpdatePeriod(XUpdatePeriod.HOURLY); } else { XUpdatePeriod updatePeriod1=XUpdatePeriod.valueOf(updatePeriod.toUpperCase()); xp.setUpdatePeriod(updatePeriod1); } return xp; }