HadoopPrincipal.java 686 B

1234567891011121314151617181920212223242526272829303132333435
  1. package com.yiidata.amc.common.principal;
  2. import org.apache.hadoop.conf.Configuration;
  3. /**
  4. * <pre>
  5. *
  6. * Created by zhenqin.
  7. * User: zhenqin
  8. * Date: 2018/4/23
  9. * Time: 10:15
  10. * Vendor: yiidata.com
  11. * To change this template use File | Settings | File Templates.
  12. *
  13. * </pre>
  14. *
  15. * @author zhenqin
  16. */
  17. public abstract class HadoopPrincipal {
  18. public Configuration getConf(String... res){
  19. return getPrincipalConf(new Configuration(), res);
  20. }
  21. /**
  22. * 获取认证的配置
  23. * @param conf Hadoop Conf
  24. * @param res 多个 site xml 信息
  25. * @return
  26. */
  27. public abstract Configuration getPrincipalConf(Configuration conf, String... res);
  28. }