Skip to content

Commit

Permalink
fix spell incorrect (apache#10127)
Browse files Browse the repository at this point in the history
Co-authored-by: guanhongjun1 <[email protected]>
  • Loading branch information
kilient and guanhongjun1 authored Apr 5, 2021
1 parent 8a2c5cc commit e6bf50e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ private CompletableFuture<Boolean> validateTenantAdminAccess(String tenantName,
String role,
AuthenticationDataSource authData) {
try {
TenantInfo tenantInfo = pulsarResources.getTenatResources()
TenantInfo tenantInfo = pulsarResources.getTenantResources()
.get(path(POLICIES, tenantName))
.orElseThrow(() -> new RestException(Response.Status.NOT_FOUND, "Tenant does not exist"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
public class PulsarResources {

public static final int DEFAULT_OPERATION_TIMEOUT_SEC = 30;
private TenantResources tenatResources;
private TenantResources tenantResources;
private ClusterResources clusterResources;
private NamespaceResources namespaceResources;
private DynamicConfigurationResources dynamicConfigResources;
Expand All @@ -46,7 +46,7 @@ public PulsarResources(MetadataStoreExtended localMetadataStore, MetadataStoreEx
public PulsarResources(MetadataStoreExtended localMetadataStore, MetadataStoreExtended configurationMetadataStore,
int operationTimeoutSec) {
if (configurationMetadataStore != null) {
tenatResources = new TenantResources(configurationMetadataStore, operationTimeoutSec);
tenantResources = new TenantResources(configurationMetadataStore, operationTimeoutSec);
clusterResources = new ClusterResources(configurationMetadataStore, operationTimeoutSec);
namespaceResources = new NamespaceResources(configurationMetadataStore, operationTimeoutSec);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ protected static void validateAdminAccessForTenant(PulsarService pulsar, String
(isClientAuthenticated(clientAppId)), clientAppId);
}

TenantInfo tenantInfo = pulsar.getPulsarResources().getTenatResources().get(path(POLICIES, tenant))
TenantInfo tenantInfo = pulsar.getPulsarResources().getTenantResources().get(path(POLICIES, tenant))
.orElseThrow(() -> new RestException(Status.NOT_FOUND, "Tenant does not exist"));

if (pulsar.getConfiguration().isAuthenticationEnabled() && pulsar.getConfiguration().isAuthorizationEnabled()) {
Expand Down Expand Up @@ -319,7 +319,7 @@ protected static void validateAdminAccessForTenant(PulsarService pulsar, String
protected void validateClusterForTenant(String tenant, String cluster) {
TenantInfo tenantInfo;
try {
tenantInfo = pulsar().getPulsarResources().getTenatResources().get(path(POLICIES, tenant))
tenantInfo = pulsar().getPulsarResources().getTenantResources().get(path(POLICIES, tenant))
.orElseThrow(() -> new RestException(Status.NOT_FOUND, "Tenant does not exist"));
} catch (RestException e) {
log.warn("Failed to get tenant admin data for tenant {}", tenant);
Expand Down Expand Up @@ -876,7 +876,7 @@ protected PulsarResources getPulsarResources() {
}

protected TenantResources tenantResources() {
return pulsar().getPulsarResources().getTenatResources();
return pulsar().getPulsarResources().getTenantResources();
}

protected ClusterResources clusterResources() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ public void properties() throws Throwable {

// clear caches to load data from metadata-store again
MetadataCacheImpl<TenantInfo> cache = (MetadataCacheImpl<TenantInfo>) pulsar.getPulsarResources()
.getTenatResources().getCache();
.getTenantResources().getCache();
AbstractMetadataStore store = (AbstractMetadataStore) cache.getStore();
cache.invalidateAll();
store.invalidateAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public void testGetNamespaces() throws Exception {
});
// clear caches to load data from metadata-store again
MetadataCacheImpl<TenantInfo> tenantCache = (MetadataCacheImpl<TenantInfo>) pulsar.getPulsarResources()
.getTenatResources().getCache();
.getTenantResources().getCache();
AbstractMetadataStore store = (AbstractMetadataStore) tenantCache.getStore();
tenantCache.invalidateAll();
store.invalidateAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ protected static void checkAuthorization(DiscoveryService service, TopicName top
// check namespace authorization
TenantInfo tenantInfo;
try {
tenantInfo = service.getPulsarResources().getTenatResources()
tenantInfo = service.getPulsarResources().getTenantResources()
.get(path(POLICIES, topicName.getTenant()))
.orElseThrow(() -> new IllegalAccessException("Property does not exist"));
} catch (NotFoundException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public void initInBroker(ServiceConfiguration brokerConfig,
// create tenant for function worker service
try {
NamedEntity.checkName(property);
pulsarResources.getTenatResources().create(PolicyPath.path(POLICIES, property),
pulsarResources.getTenantResources().create(PolicyPath.path(POLICIES, property),
new TenantInfo(Sets.newHashSet(workerConfig.getSuperUserRoles()), Sets.newHashSet(cluster)));
LOG.info("Created property {} for function worker", property);
} catch (AlreadyExistsException e) {
Expand Down

0 comments on commit e6bf50e

Please sign in to comment.