NonHadoopPrincipal.java 797 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package com.yiidata.amc.common.principal;
  2. import org.apache.commons.lang.StringUtils;
  3. import org.apache.hadoop.conf.Configuration;
  4. /**
  5. *
  6. * 无加密的
  7. *
  8. *
  9. * <pre>
  10. *
  11. * Created by zhenqin.
  12. * User: zhenqin
  13. * Date: 2018/4/23
  14. * Time: 10:15
  15. * Vendor: yiidata.com
  16. * To change this template use File | Settings | File Templates.
  17. *
  18. * </pre>
  19. *
  20. * @author zhenqin
  21. */
  22. public class NonHadoopPrincipal extends HadoopPrincipal {
  23. /**
  24. * 无加密的 Conf
  25. * @param conf 配置
  26. * @return
  27. */
  28. @Override
  29. public Configuration getPrincipalConf(Configuration conf, String... res) {
  30. for (String re : res) {
  31. if(StringUtils.isBlank(re)) {
  32. continue;
  33. }
  34. conf.addResource(re);
  35. }
  36. return conf;
  37. }
  38. }