if (!namespaceConfig.getSchedulerQueueName().isEmpty()) { builder.append(ArgumentName.NAMESPACE_SCHEDULER_QUEUENAME); builder.append("='").append(namespaceConfig.getSchedulerQueueName()).append("', ");
if (!namespaceConfig.getSchedulerQueueName().isEmpty()) { builder.append(ArgumentName.NAMESPACE_SCHEDULER_QUEUENAME); builder.append("='").append(namespaceConfig.getSchedulerQueueName()).append("', ");
/** * Get queue at namespace level if it is empty returns the default queue. * * @param namespaceId NamespaceId * @return schedule queue at namespace level or default queue. */ @Nullable public String getQueue(Id.Namespace namespaceId) throws IOException, NamespaceNotFoundException { if (namespaceId.equals(Id.Namespace.SYSTEM)) { return systemQueue; } NamespaceMeta meta; try { meta = namespaceQueryAdmin.get(namespaceId.toEntityId()); } catch (NamespaceNotFoundException e) { throw e; } catch (Exception e) { throw new IOException(e); } if (meta != null) { NamespaceConfig config = meta.getConfig(); String namespaceQueue = config.getSchedulerQueueName(); return Strings.isNullOrEmpty(namespaceQueue) ? getDefaultQueue() : namespaceQueue; } else { return getDefaultQueue(); } } }
/** * Get queue at namespace level if it is empty returns the default queue. * * @param namespaceId NamespaceId * @return schedule queue at namespace level or default queue. */ @Nullable public String getQueue(Id.Namespace namespaceId) throws IOException, NamespaceNotFoundException { if (namespaceId.equals(Id.Namespace.SYSTEM)) { return systemQueue; } NamespaceMeta meta; try { meta = namespaceQueryAdmin.get(namespaceId.toEntityId()); } catch (NamespaceNotFoundException e) { throw e; } catch (Exception e) { throw new IOException(e); } if (meta != null) { NamespaceConfig config = meta.getConfig(); String namespaceQueue = config.getSchedulerQueueName(); return Strings.isNullOrEmpty(namespaceQueue) ? getDefaultQueue() : namespaceQueue; } else { return getDefaultQueue(); } } }
if (config != null && !Strings.isNullOrEmpty(config.getSchedulerQueueName())) { builder.setSchedulerQueueName(config.getSchedulerQueueName());
if (config != null && !Strings.isNullOrEmpty(config.getSchedulerQueueName())) { builder.setSchedulerQueueName(config.getSchedulerQueueName());
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(); } }
Assert.assertEquals("prod", config.getSchedulerQueueName()); Assert.assertEquals(NAME, namespace.get(NAME_FIELD).getAsString()); Assert.assertEquals(EMPTY, namespace.get(DESCRIPTION_FIELD).getAsString()); Assert.assertEquals("prod", config.getSchedulerQueueName());