Commit 78f7b55e authored by DeleMing's avatar DeleMing

<dev>

1. 修复当日志路径为“日期/系统简称/日志”这中格式时,启动脱敏任务失败
parent 478d6132
Pipeline #21892 passed with stages
in 2 minutes and 40 seconds
...@@ -200,7 +200,7 @@ public class HdfsLogDesensitization implements Serializable { ...@@ -200,7 +200,7 @@ public class HdfsLogDesensitization implements Serializable {
List<String> logFiles = new ArrayList<>(); List<String> logFiles = new ArrayList<>();
try { try {
RemoteIterator<LocatedFileStatus> locatedFileStatusRemoteIterator = RemoteIterator<LocatedFileStatus> locatedFileStatusRemoteIterator =
fileSystem.listFiles(new Path(path), false); fileSystem.listFiles(new Path(path), true);
while (locatedFileStatusRemoteIterator.hasNext()) { while (locatedFileStatusRemoteIterator.hasNext()) {
LocatedFileStatus next = locatedFileStatusRemoteIterator.next(); LocatedFileStatus next = locatedFileStatusRemoteIterator.next();
long modificationTime = next.getModificationTime(); long modificationTime = next.getModificationTime();
......
...@@ -46,9 +46,9 @@ hdfs_uri: "hdfs://cdh-2:8020/" ...@@ -46,9 +46,9 @@ hdfs_uri: "hdfs://cdh-2:8020/"
# hdfs 用户名 # hdfs 用户名
hdfs_user: "hdfs" hdfs_user: "hdfs"
# hdfs日志源文件地址,若source为hdfs,则该地址必传,必须以斜杠结尾 # hdfs日志源文件地址,若source为hdfs,则该地址必传,必须以斜杠结尾
hdfs_src: "/tmp/datawarehouse/net22/" hdfs_src: "/tmp/datawarehouse/net23/"
# hdfs日志写入地址,非必传,默认写到hdfs-src目录下的output目录下,必须以斜杠结尾 # hdfs日志写入地址,非必传,默认写到hdfs-src目录下的output目录下,必须以斜杠结尾
hdfs_dest: "/tmp/datawarehouse/net22/output14/" hdfs_dest: "/tmp/datawarehouse/net23/output14/"
# cdh下载配置 # cdh下载配置
# cdh能执行hdfs命令的机器的ip # cdh能执行hdfs命令的机器的ip
......
  • SonarQube analysis reported 193 issues

    • 4 blocker
    • 🚫 34 critical
    • 132 major
    • 🔽 20 minor
    • 3 info

    Top 30 extra issues

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. Remove this hard-coded password. 📘
    2. Remove this hard-coded password. 📘
    3. Remove this hard-coded password. 📘
    4. Remove this hard-coded password. 📘
    5. 🚫 Define a constant instead of duplicating this literal " {\n" 11 times. 📘
    6. 🚫 [Define a constant instead of duplicating this literal " "type": \n" 11 times. 📘
    7. 🚫 Define a constant instead of duplicating this literal " "string",\n" 6 times. 📘
    8. 🚫 Define a constant instead of duplicating this literal " "null"\n" 6 times. 📘
    9. 🚫 [Define a constant instead of duplicating this literal " ]\n" 11 times.](https://git.zorkdata.com/liaomingtao/transaction-log-desensitization/blob/78f7b55ec7abf0dde9e6bebed237d39d8695abff/src/main/java/com/zorkdata/desensitization/avro/AvroSchemaDef.java#L23) 📘
    10. 🚫 Define a constant instead of duplicating this literal " },\n" 9 times. 📘
    11. 🚫 Define a constant instead of duplicating this literal " "null",\n" 5 times. 📘
    12. 🚫 Define a constant instead of duplicating this literal " {\n" 5 times. 📘
    13. 🚫 Define a constant instead of duplicating this literal " "type": "map",\n" 5 times. 📘
    14. 🚫 Define a constant instead of duplicating this literal " "values": "string"\n" 3 times. 📘
    15. 🚫 Define a constant instead of duplicating this literal " }\n" 5 times. 📘
    16. 🚫 Define a constant instead of duplicating this literal "序列化失败" 13 times. 📘
    17. 🚫 Refactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed. 📘
    18. 🚫 Refactor this method to reduce its Cognitive Complexity from 145 to the 15 allowed. 📘
    19. 🚫 Refactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed. 📘
    20. 🚫 Refactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed. 📘
    21. 🚫 Refactor this method to reduce its Cognitive Complexity from 19 to the 15 allowed. 📘
    22. 🚫 Change this "try" to a try-with-resources. (sonar.java.source not set. Assuming 7 or greater.) 📘
    23. 🚫 Refactor this code to not throw exceptions in finally blocks. 📘
    24. 🚫 Refactor this code to not throw exceptions in finally blocks. 📘
    25. 🚫 Change this "try" to a try-with-resources. (sonar.java.source not set. Assuming 7 or greater.) 📘
    26. 🚫 Define a constant instead of duplicating this literal "jobName" 6 times. 📘
    27. 🚫 Define a constant instead of duplicating this literal "2020-11-07 21:22:20" 6 times. 📘
    28. 🚫 Define a constant instead of duplicating this literal "2020-11-07 23:40:30" 6 times. 📘
    29. 🚫 Define a constant instead of duplicating this literal "YYYYMMDD-*** NodeId=, QueueId=, MsgId=*******************, Len=," 3 times. 📘
    30. 🚫 Define a constant instead of duplicating this literal "netaddr,telno,mobileno,faxno,hometelno,worktelno,fax,mobil,call" 6 times. 📘
    • ... 163 more
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment