Github user Ethanlm commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2390#discussion_r147777772
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/security/auth/FixedGroupsMapping.java ---
    @@ -0,0 +1,69 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + * <p>
    + * http://www.apache.org/licenses/LICENSE-2.0
    + * <p>
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.storm.security.auth;
    +
    +import java.io.IOException;
    +import java.util.Set;
    +import java.util.HashSet;
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +import org.apache.storm.Config;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +
    +public class FixedGroupsMapping implements IGroupMappingServiceProvider {
    +
    +    public static Logger LOG = 
LoggerFactory.getLogger(FixedGroupsMapping.class);
    +    public static final String STORM_FIXED_GROUP_MAPPING = 
"storm.fixed.group.mapping";
    +    public Map<String, Set<String>> cachedGroups = new HashMap<String, 
Set<String>>();
    +
    +    /**
    +     * Invoked once immediately after construction
    +     *
    +     * @param storm_conf Storm configuration
    +     */
    +    @Override
    +    public void prepare(Map storm_conf) {
    +        Map<?, ?> params = (Map<?, ?>) 
storm_conf.get(Config.STORM_GROUP_MAPPING_SERVICE_PARAMS);
    +        Map<String, Set<String>> mapping = (Map<String, Set<String>>) 
params.get(STORM_FIXED_GROUP_MAPPING);
    --- End diff --
    
    Should we use `stormConf` instead of `storm_conf`? 
    Do we want to use Map<String, Object> instead of Map<?, ?>?


---

Reply via email to