private boolean hasCustomLocation(NamespaceMeta namespaceMeta) { return !Strings.isNullOrEmpty(namespaceMeta.getConfig().getRootDirectory()); }
private boolean hasCustomLocation(NamespaceMeta namespaceMeta) { return !Strings.isNullOrEmpty(namespaceMeta.getConfig().getRootDirectory()); }
private boolean hasCustomMapping(NamespaceMeta metadata) { NamespaceConfig config = metadata.getConfig(); return !(Strings.isNullOrEmpty(config.getRootDirectory()) && Strings.isNullOrEmpty(config.getHbaseNamespace()) && Strings.isNullOrEmpty(config.getHiveDatabase())); }
private boolean hasCustomMapping(NamespaceMeta metadata) { NamespaceConfig config = metadata.getConfig(); return !(Strings.isNullOrEmpty(config.getRootDirectory()) && Strings.isNullOrEmpty(config.getHbaseNamespace()) && Strings.isNullOrEmpty(config.getHiveDatabase())); }
@Override public Location get(NamespaceMeta namespaceMeta) throws IOException { String rootDirectory = namespaceMeta.getConfig().getRootDirectory(); if (Strings.isNullOrEmpty(rootDirectory)) { // if no custom mapping was specified, then use the default namespaces location return get(namespaceMeta.getNamespaceId()); } return locationFactory.create(namespaceMeta.getConfig().getRootDirectory()); } }
@Override public Location get(NamespaceMeta namespaceMeta) throws IOException { String rootDirectory = namespaceMeta.getConfig().getRootDirectory(); if (Strings.isNullOrEmpty(rootDirectory)) { // if no custom mapping was specified, then use the default namespaces location return get(namespaceMeta.getNamespaceId()); } return locationFactory.create(namespaceMeta.getConfig().getRootDirectory()); } }
@Override public Location get(NamespaceMeta namespaceMeta) throws IOException { String rootDirectory = namespaceMeta.getConfig().getRootDirectory(); if (Strings.isNullOrEmpty(rootDirectory)) { // if no custom mapping was specified, then use the default namespaces location return getNonCustomMappedLocation(namespaceMeta.getNamespaceId()); } return Locations.getLocationFromAbsolutePath(locationFactory, rootDirectory); }
builder.append("='").append(namespaceConfig.getSchedulerQueueName()).append("', "); if (namespaceConfig.getRootDirectory() != null) { builder.append(ArgumentName.NAMESPACE_ROOT_DIR); builder.append("='").append(namespaceConfig.getRootDirectory()).append("', ");
builder.append("='").append(namespaceConfig.getSchedulerQueueName()).append("', "); if (namespaceConfig.getRootDirectory() != null) { builder.append(ArgumentName.NAMESPACE_ROOT_DIR); builder.append("='").append(namespaceConfig.getRootDirectory()).append("', ");
@Override public Location get(NamespaceMeta namespaceMeta) throws IOException { String rootDirectory = namespaceMeta.getConfig().getRootDirectory(); if (isReservedNamespace(namespaceMeta.getNamespaceId()) || Strings.isNullOrEmpty(rootDirectory)) { // if no custom mapping was specified, then use the default namespaces location return getNonCustomMappedLocation(namespaceMeta.getNamespaceId()); } return Locations.getLocationFromAbsolutePath(locationFactory, rootDirectory); }
existingConfig.getHiveDatabase())); if (!Strings.isNullOrEmpty(metadata.getConfig().getRootDirectory())) { validatePath(metadata.getName(), metadata.getConfig().getRootDirectory()); if (hasSubDirRelationship(existingConfig.getRootDirectory(), metadata.getConfig().getRootDirectory())) { throw new BadRequestException(String.format("Failed to create namespace %s with custom " + "location %s. A namespace '%s' already exists " + "have a subdirectory relationship.", metadata.getName(), metadata.getConfig().getRootDirectory(), existingNamespaceMeta.getName(), existingConfig.getRootDirectory()));
existingConfig.getHiveDatabase())); if (!Strings.isNullOrEmpty(metadata.getConfig().getRootDirectory())) { validatePath(metadata.getName(), metadata.getConfig().getRootDirectory()); if (hasSubDirRelationship(existingConfig.getRootDirectory(), metadata.getConfig().getRootDirectory())) { throw new BadRequestException(String.format("Failed to create namespace %s with custom " + "location %s. A namespace '%s' already exists " + "have a subdirectory relationship.", metadata.getName(), metadata.getConfig().getRootDirectory(), existingNamespaceMeta.getName(), existingConfig.getRootDirectory()));
public Builder(NamespaceMeta meta) { this.name = meta.getName(); this.description = meta.getDescription(); NamespaceConfig config = meta.getConfig(); if (config != null) { this.schedulerQueueName = config.getSchedulerQueueName(); this.rootDirectory = config.getRootDirectory(); this.hbaseNamespace = config.getHbaseNamespace(); this.hiveDatabase = config.getHiveDatabase(); this.principal = config.getPrincipal(); this.groupName = config.getGroupName(); this.keytabURIWithoutVersion = config.getKeytabURIWithoutVersion(); this.keytabURIVersion = config.getKeytabURIVersion(); this.exploreAsPrincipal = config.isExploreAsPrincipal(); } }
public Builder(NamespaceMeta meta) { this.name = meta.getName(); this.description = meta.getDescription(); NamespaceConfig config = meta.getConfig(); if (config != null) { this.schedulerQueueName = config.getSchedulerQueueName(); this.rootDirectory = config.getRootDirectory(); this.hbaseNamespace = config.getHbaseNamespace(); this.hiveDatabase = config.getHiveDatabase(); this.principal = config.getPrincipal(); this.groupName = config.getGroupName(); this.keytabURIWithoutVersion = config.getKeytabURIWithoutVersion(); this.keytabURIVersion = config.getKeytabURIVersion(); this.exploreAsPrincipal = config.isExploreAsPrincipal(); } }