private static void setDimensionProperties(Map<String, String> props, Set<CubeDimAttribute> dimensions) { for (CubeDimAttribute dimension : dimensions) { dimension.addProperties(props); } }
private static void setAttributedProperties(Map<String, String> props, Set<CubeDimAttribute> attributes) { for (CubeDimAttribute attr : attributes) { attr.addProperties(props); } }
private static void setAttributedProperties(Map<String, String> props, Set<CubeDimAttribute> attributes) { for (CubeDimAttribute attr : attributes) { attr.addProperties(props); } }
private static void setDimensionProperties(Map<String, String> props, Set<CubeDimAttribute> dimensions) { for (CubeDimAttribute dimension : dimensions) { dimension.addProperties(props); } }
@Override public void addProperties(Map<String, String> props) { super.addProperties(props); for (int i = 0; i < hierarchy.size(); i++) { CubeDimAttribute dim = hierarchy.get(i); props.put(MetastoreUtil.getHierachyElementKeyName(getName(), i), getHierarchyElement(dim)); dim.addProperties(props); } }
@Override public void addProperties(Map<String, String> props) { super.addProperties(props); for (int i = 0; i < hierarchy.size(); i++) { CubeDimAttribute dim = hierarchy.get(i); props.put(MetastoreUtil.getHierachyElementKeyName(getName(), i), getHierarchyElement(dim)); dim.addProperties(props); } }
@Override public void addProperties(Map<String, String> props) { super.addProperties(props); props.put(MetastoreUtil.getDimTypePropertyKey(getName()), type); if (numOfDistinctValues.isPresent()) { props.put(MetastoreUtil.getDimNumOfDistinctValuesPropertyKey(getName()), String.valueOf(numOfDistinctValues.get())); } if (values.isPresent() && !this.values.get().isEmpty()) { props.put(MetastoreUtil.getInlineDimensionValuesKey(getName()), MetastoreUtil.getStr(values.get())); } }
@Override public void addProperties(Map<String, String> props) { super.addProperties(props); props.put(MetastoreUtil.getDimTypePropertyKey(getName()), type); if (numOfDistinctValues.isPresent()) { props.put(MetastoreUtil.getDimNumOfDistinctValuesPropertyKey(getName()), String.valueOf(numOfDistinctValues.get())); } if (values.isPresent() && !this.values.get().isEmpty()) { props.put(MetastoreUtil.getInlineDimensionValuesKey(getName()), MetastoreUtil.getStr(values.get())); } }
/** * Alters the dimension if already existing or just adds if it is new dimension * * @param dimension the dim attribute */ public void alterDimension(@NonNull CubeDimAttribute dimension) { // Replace dimension if already existing if (dimMap.containsKey(dimension.getName().toLowerCase())) { dimensions.remove(getDimAttributeByName(dimension.getName())); log.info("Replacing dimension {} with {}", getDimAttributeByName(dimension.getName()), dimension); } dimensions.add(dimension); dimMap.put(dimension.getName().toLowerCase(), dimension); MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getCubeDimensionListKey(getName()), dimensions); dimension.addProperties(getProperties()); }
/** * Alters the dimension if already existing or just adds if it is new dimension * * @param dimension the dim attribute */ public void alterDimension(@NonNull CubeDimAttribute dimension) { // Replace dimension if already existing if (dimMap.containsKey(dimension.getName().toLowerCase())) { dimensions.remove(getDimAttributeByName(dimension.getName())); log.info("Replacing dimension {} with {}", getDimAttributeByName(dimension.getName()), dimension); } dimensions.add(dimension); dimMap.put(dimension.getName().toLowerCase(), dimension); MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getCubeDimensionListKey(getName()), dimensions); dimension.addProperties(getProperties()); }
/** * Alters the attribute if already existing or just adds if it is new attribute * * @param attribute */ public void alterAttribute(@NonNull CubeDimAttribute attribute) { // Replace dimension if already existing if (attributeMap.containsKey(attribute.getName().toLowerCase())) { attributes.remove(getAttributeByName(attribute.getName())); log.info("Replacing attribute {} with {}", getAttributeByName(attribute.getName()), attribute); } attributes.add(attribute); attributeMap.put(attribute.getName().toLowerCase(), attribute); MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getDimAttributeListKey(getName()), attributes); attribute.addProperties(getProperties()); }
/** * Alters the attribute if already existing or just adds if it is new attribute * * @param attribute */ public void alterAttribute(@NonNull CubeDimAttribute attribute) { // Replace dimension if already existing if (attributeMap.containsKey(attribute.getName().toLowerCase())) { attributes.remove(getAttributeByName(attribute.getName())); log.info("Replacing attribute {} with {}", getAttributeByName(attribute.getName()), attribute); } attributes.add(attribute); attributeMap.put(attribute.getName().toLowerCase(), attribute); MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getDimAttributeListKey(getName()), attributes); attribute.addProperties(getProperties()); }