HDFSProperties.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package com.yihu.base.hdfs.properties;
  2. import com.yihu.base.common.RollingUtil;
  3. /**
  4. * Created by chenweida on 2018/2/26.
  5. */
  6. public class HDFSProperties {
  7. private String hosts;//hdfs://192.168.131.240:9000/
  8. private String path;//日志的存储路径
  9. private String fileName;//日志的名称
  10. private String rolling;//日志按照什么滚动 day week month year
  11. private String suffix = "log";//后缀
  12. public String getHosts() {
  13. return hosts;
  14. }
  15. public void setHosts(String hosts) {
  16. this.hosts = hosts;
  17. }
  18. public String getPath() {
  19. return path;
  20. }
  21. public void setPath(String path) {
  22. this.path = path;
  23. }
  24. public String getFileName() {
  25. return RollingUtil.getRollingAppendFirst(fileName, rolling, suffix);
  26. }
  27. public void setFileName(String fileName) {
  28. this.fileName = fileName;
  29. }
  30. public String getRolling() {
  31. return rolling;
  32. }
  33. public void setRolling(String rolling) {
  34. this.rolling = rolling;
  35. }
  36. public String getSuffix() {
  37. return suffix;
  38. }
  39. public void setSuffix(String suffix) {
  40. this.suffix = suffix;
  41. }
  42. }