Commit 1400f1ee authored by DeleMing's avatar DeleMing

<dev>

1. 修改问题
parent e390bb16
Pipeline #21555 passed with stages
in 3 minutes and 19 seconds
......@@ -22,5 +22,7 @@ public final class GeneralConstants {
public static final String SYMBOL_STR = "&";
public static final String CODE_MSG = "CODE,MSG;";
public static final String SEMICOLON = ";";
public static final int NUM2 = 2;
public static final int NUM4 = 4;
}
......@@ -110,9 +110,21 @@ public class DesensitizationFunction<T, R> extends RichFlatMapFunction<Tuple2<Ob
if (sourceMessage.contains(GeneralConstants.CODE_MSG)) {
String[] ansArrTemp = sourceMessage.split(GeneralConstants.CODE_MSG);
String ansArr = ansArrTemp[1];
int commaIndex = ansArr.indexOf(GeneralConstants.SEMICOLON);
String keysString = ansArr.substring(0, commaIndex);
String valuesString = ansArr.substring(commaIndex);
// 此处还有其他情况
String[] ans = ansArr.split(GeneralConstants.SEMICOLON);
String keysString = null;
String valuesString = null;
if (ans.length >= GeneralConstants.NUM4) {
keysString = ans[2];
valuesString = ans[3];
} else {
int commaIndex = ansArr.indexOf(GeneralConstants.SEMICOLON);
keysString = ansArr.substring(0, commaIndex);
valuesString = ansArr.substring(commaIndex);
if (ansArr.length() > commaIndex) {
valuesString = ansArr.substring(commaIndex + 1);
}
}
String[] keysArr = keysString.split(GeneralConstants.COMMA);
List<Integer> valueIndex = new ArrayList<>();
for (int i = 0; i < keysArr.length; i++) {
......@@ -121,11 +133,20 @@ public class DesensitizationFunction<T, R> extends RichFlatMapFunction<Tuple2<Ob
valueIndex.add(i);
}
}
messageSuffixDesc
.append(ansArrTemp[0])
.append(GeneralConstants.CODE_MSG)
.append(ansArrTemp[1].split(GeneralConstants.SEMICOLON)[0])
.append(GeneralConstants.COMMA);
if (ans.length >= GeneralConstants.NUM4) {
messageSuffixDesc
.append(ansArrTemp[0])
.append(GeneralConstants.CODE_MSG)
.append(ans[0]).append(GeneralConstants.SEMICOLON)
.append(ans[1]).append(GeneralConstants.SEMICOLON)
.append(ans[2]).append(GeneralConstants.SEMICOLON);
} else {
messageSuffixDesc
.append(ansArrTemp[0])
.append(GeneralConstants.CODE_MSG)
.append(ansArrTemp[1].split(GeneralConstants.SEMICOLON)[0])
.append(GeneralConstants.SEMICOLON);
}
String[] valueArr = valuesString.split(GeneralConstants.COMMA);
int valueSize = valueArr.length / keysArr.length;
List<Integer> ansValueIndex = getAnsValueIndex(valueIndex, valueSize, keysArr.length);
......@@ -142,6 +163,12 @@ public class DesensitizationFunction<T, R> extends RichFlatMapFunction<Tuple2<Ob
messageSuffixDesc.append(value).append(GeneralConstants.COMMA);
}
}
if (ans.length >= GeneralConstants.NUM4) {
messageSuffixDesc.append(GeneralConstants.SEMICOLON);
for (int i = 4; i < ans.length; i++) {
messageSuffixDesc.append(ans[i]).append(GeneralConstants.SEMICOLON);
}
}
} else {
log.error("message不包含CODE,MSG;");
messageSuffixDesc.append(messageSuffixDesc);
......@@ -183,11 +210,20 @@ public class DesensitizationFunction<T, R> extends RichFlatMapFunction<Tuple2<Ob
if (messageSuffix.contains(GeneralConstants.CODE_MSG)) {
String[] ansArrTemp = messageSuffix.split(GeneralConstants.CODE_MSG);
String ansArr = ansArrTemp[1];
int commaIndex = ansArr.indexOf(GeneralConstants.SEMICOLON);
String keysString = ansArr.substring(0, commaIndex);
String valuesString = ansArr.substring(commaIndex);
if (ansArr.length() > commaIndex) {
valuesString = ansArr.substring(commaIndex + 1);
// 此处还有其他情况
String[] ans = ansArr.split(GeneralConstants.SEMICOLON);
String keysString = null;
String valuesString = null;
if (ans.length >= GeneralConstants.NUM4) {
keysString = ans[2];
valuesString = ans[3];
} else {
int commaIndex = ansArr.indexOf(GeneralConstants.SEMICOLON);
keysString = ansArr.substring(0, commaIndex);
valuesString = ansArr.substring(commaIndex);
if (ansArr.length() > commaIndex) {
valuesString = ansArr.substring(commaIndex + 1);
}
}
String[] keysArr = keysString.split(GeneralConstants.COMMA);
List<Integer> valueIndex = new ArrayList<>();
......@@ -197,11 +233,20 @@ public class DesensitizationFunction<T, R> extends RichFlatMapFunction<Tuple2<Ob
valueIndex.add(i);
}
}
messageSuffixDesc
.append(ansArrTemp[0])
.append(GeneralConstants.CODE_MSG)
.append(ansArrTemp[1].split(GeneralConstants.SEMICOLON)[0])
.append(GeneralConstants.SEMICOLON);
if (ans.length >= GeneralConstants.NUM4) {
messageSuffixDesc
.append(ansArrTemp[0])
.append(GeneralConstants.CODE_MSG)
.append(ans[0]).append(GeneralConstants.SEMICOLON)
.append(ans[1]).append(GeneralConstants.SEMICOLON)
.append(ans[2]).append(GeneralConstants.SEMICOLON);
} else {
messageSuffixDesc
.append(ansArrTemp[0])
.append(GeneralConstants.CODE_MSG)
.append(ansArrTemp[1].split(GeneralConstants.SEMICOLON)[0])
.append(GeneralConstants.SEMICOLON);
}
String[] valueArr = valuesString.split(GeneralConstants.COMMA);
int valueSize = valueArr.length / keysArr.length;
List<Integer> ansValueIndex = getAnsValueIndex(valueIndex, valueSize, keysArr.length);
......@@ -218,6 +263,12 @@ public class DesensitizationFunction<T, R> extends RichFlatMapFunction<Tuple2<Ob
messageSuffixDesc.append(value).append(GeneralConstants.COMMA);
}
}
if (ans.length >= GeneralConstants.NUM4) {
messageSuffixDesc.append(GeneralConstants.SEMICOLON);
for (int i = 4; i < ans.length; i++) {
messageSuffixDesc.append(ans[i]).append(GeneralConstants.SEMICOLON);
}
}
} else {
log.error("message不包含CODE,MSG;");
messageSuffixDesc.append(messageSuffixDesc);
......
......@@ -24,6 +24,7 @@ import org.apache.hadoop.fs.LocatedFileStatus;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.RemoteIterator;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.compress.CompressionCodec;
  • 🔽 Remove this unused import 'org.apache.hadoop.io.compress.CompressionCodec'. 📘

Please register or sign in to reply
import org.apache.hadoop.mapred.FileOutputFormat;
import org.apache.hadoop.mapred.JobConf;
......
......@@ -6,8 +6,8 @@ end_time: "2021-02-26 23:59:59"
# 任务配置
job_name: "国泰交易日志脱敏job"
# 并行度HdfsLogDesensitization
source.parallelism: "4"
transformer.parallelism: "4"
source.parallelism: "1"
transformer.parallelism: "1"
sink.parallelism: "1"
# 是否过滤维度中hostname字段,若填*则不过滤,若需要包含如‘c9’的hostname,则填写c9
......@@ -16,9 +16,9 @@ match.hostname: "*"
# 密码
password: "trdpwd,newpwd,oldfundpwd,newfundpwd,bankpwd,dynamicpwd1,dynamicpwd2,dynamicpwd,fundpwd,newbankpwd"
# 姓名key
name: "custname,otherlinkman,longname,YXYHMC,deputyname"
name: "custname,otherlinkman,longname,YXYHMC,deputyname,name,fundname"
# 手机号key
mobile: "netaddr,telno,mobileno,faxno,hometelno,worktelno,fax,mobil,call"
mobile: "netaddr,telno,mobileno,faxno,hometelno,worktelno,fax,mobil,call,g_stationaddr,terminalinfo"
# 电话号码key
phone: "netaddr,telno,mobileno,faxno,hometelno,worktelno,fax,mobil,call"
# 邮箱key
......@@ -48,7 +48,7 @@ hdfs_user: "hdfs"
# hdfs日志源文件地址,若source为hdfs,则该地址必传,必须以斜杠结尾
hdfs_src: "/tmp/datawarehouse/net22/"
# hdfs日志写入地址,非必传,默认写到hdfs-src目录下的output目录下,必须以斜杠结尾
hdfs_dest: "/tmp/datawarehouse/net22/output2/"
hdfs_dest: "/tmp/datawarehouse/net22/output14/"
# cdh下载配置
# cdh能执行hdfs命令的机器的ip
......
......@@ -84,7 +84,8 @@ expect <<EOF
expect "]# " { send "rm -rf $SCP_PATH\n" }
expect "]# " { send "su $CDH_HDFS_USER\n" }
expect "]$ " { send "hadoop fs -copyToLocal $HDFS_DEST $DOWNLOAD_PATH\n" }
expect "]# " { send "exit\n" }
expect "]$ " { send "sleep 10\n" }
expect "]$ " { send "exit\n" }
expect "]# " {
send "scp -r $SCP_PATH root@$LOCAL_IP:/tmp/\n"
expect {
......
......@@ -50,8 +50,8 @@ public class DesensitizationFunctionTest {
JobConfig jobConfig = new JobConfig(jobInitConfig);
DesensitizationFunction<Object, Object> desensitizationFunction = new DesensitizationFunction(jobConfig);
Map<String, String> map = new HashMap<>(8);
String message = "YYYYMMDD-*** NodeId=***, QueueId=**, MsgId=***********************, Len=***,\n" +
"Buf=01280000000000000000100000000000000040F2E92B8E7AKCXP00 GV2gODkBbGg= 410570 00220000000 Req: ************&key1=value1&key2=value2 Ans: NodeId=***, QueueId=**, MsgId=***********************, Len=***,\n" +
String message = "YYYYMMDD-*** NodeId=***, QueueId=**, MsgId=***********************, Len=***," +
  • 🚫 Define a constant instead of duplicating this literal "YYYYMMDD-*** NodeId=, QueueId=, MsgId=*******************, Len=," 3 times. 📘

Please register or sign in to reply
"Buf=01280000000000000000100000000000000040F2E92B8E7AKCXP00 GV2gODkBbGg= 410570 00220000000 Req: ************&key1=value1&key2=value2 Ans: NodeId=***, QueueId=**, MsgId=***********************, Len=***," +
"Buf=01280000000000000000100000000000000040F2E92B8E7AKCXP00 GV2gODkBbGg= 410570 00220000000 **************************LEVEL,CODE,MSG;key3,key4,key5;value3,value4,value5,value3,value4,value5&_EORS_2=*****************************;";
map.put(GeneralConstants.MESSAGE, message);
desensitizationFunction.desensitizationNormalFieldMessage(map);
......@@ -90,7 +90,7 @@ public class DesensitizationFunctionTest {
JobConfig jobConfig = new JobConfig(jobInitConfig);
DesensitizationFunction<Object, Object> desensitizationFunction = new DesensitizationFunction(jobConfig);
Map<String, String> map = new HashMap<>(8);
String message = "YYYYMMDD-*** NodeId=***, QueueId=**, MsgId=***********************, Len=***,\n" +
String message = "YYYYMMDD-*** NodeId=***, QueueId=**, MsgId=***********************, Len=***," +
"Buf=01280000000000000000100000000000000040F2E92B8E7AKCXP00 GV2gODkBbGg= 410570 00220000000 Req: ************&key1=value1&key2=value2 ";
map.put(GeneralConstants.MESSAGE, message);
desensitizationFunction.desensitizationNormalFieldMessage(map);
......@@ -169,4 +169,132 @@ public class DesensitizationFunctionTest {
log.info(JSON.toJSONString(map));
}
@Test
public void test5() {
Map<String, String> conf = new HashMap<>(8);
conf.put(ConfigConstants.JOB_NAME, "jobName");
conf.put(ConfigConstants.SOURCE_PARALLELISM, "1");
conf.put(ConfigConstants.TRANSFORMER_PARALLELISM, "1");
conf.put(ConfigConstants.SINK_PARALLELISM, "1");
conf.put(ConfigConstants.HDFS_URI, "1");
conf.put(ConfigConstants.HDFS_USER, "1");
conf.put(ConfigConstants.HDFS_SRC, "1");
conf.put(ConfigConstants.HDFS_DEST, "1");
conf.put(ConfigConstants.MATCH_HOSTNAME, "*");
conf.put(ConfigConstants.START_TIME, "2020-11-07 21:22:20");
conf.put(ConfigConstants.END_TIME, "2020-11-07 23:40:30");
conf.put(ConfigConstants.NAME_KEY, "name,custname,otherlinkman,longname,YXYHMC,deputyname");
conf.put(ConfigConstants.MOBILE_KEY, "netaddr,telno,mobileno,faxno,hometelno,worktelno,fax,mobil,call");
conf.put(ConfigConstants.PHONE_KEY, "netaddr,telno,mobileno,faxno,hometelno,worktelno,fax,mobil,call");
conf.put(ConfigConstants.EMAIL_KEY, "email");
conf.put(ConfigConstants.ID_KEY, "idno,deputyidno");
conf.put(ConfigConstants.BANK_CARD_KEY, "lmbankid");
conf.put(ConfigConstants.ADDRESS_KEY, "addr,workaddr,otheraddr,othertelno");
conf.put(ConfigConstants.IP_KEY, "printip,ipaddr,operipaddr,clientip");
conf.put(ConfigConstants.MAC_KEY, "netaddr,clientmac");
conf.put(ConfigConstants.PASSWORD_KEY, "trdpwd,newpwd,oldfundpwd,newfundpwd,bankpwd,dynamicpwd1,dynamicpwd2,dynamicpwd,fundpwd,newbankpwd");
conf.put(ConfigConstants.POSITION_KEY, "orderamt,orderqty,orderprice,fundeffect,stkeffect,profitcost,oddqty,sumqty,ordercount,orderqty,orderamt,fundbal,fundavl,marketvalue,fund,stkvalue,stkqty,stkbal,stkavl,mktval,matchamt,fundeffect,fee_yhs,fee_jsxf,fee_sxf,fee_ghf,fee_qsf,fee_jygf,feefront,fee_jsf,fee_zgf,fundbjhgavl,bb_matchclearamt,nHQSBSL,fundeffect,fundbal,fundeffect,bondbal,bondavl,maxdraw,marketvalue,matchqty,funddraw");
JobInitConfig jobInitConfig = new JobInitConfig(conf);
JobConfig jobConfig = new JobConfig(jobInitConfig);
DesensitizationFunction<Object, Object> desensitizationFunction = new DesensitizationFunction(jobConfig);
Map<String, String> map = new HashMap<>(8);
String message = "20201227-235934 " +
"Req: NodeId=5007, QueueId=430, MsgId=50000006045676B123C23F68, Len=374, " +
"Buf=0128000000000000000010000000000000000A94EF138F7F KC XP 00 Gv2gODkBbGq=" +
"141_CA=2.3G_ENDIAN=0" +
"&bankpwd=" +
"&clientflag=0" +
"&custid=6" +
"&custorgid=4301" +
"&ext=" +
"&funcid=410305" +
"&g_stationaddr=6CAE8B62900A" +
"&inputid=10586706&inputinfo=" +
"&inputtype=Z" +
"&netaddr=6CAE8B62900A" +
"&operway=E" +
"&orgid=4301" +
"&terminalinfo=" +
"&trdpwd=llu*;@40z@25" +
  • Remove this hard-coded password. 📘

Please register or sign in to reply
"&serverid=5&g_serverid=5" +
"Ans: NodeId=5007, QueueId=430, MsgId=50000006045676B123C23F68, Len=1023, Buf=0130000000000000000030500705007050070A94EF138F7FKCX" +
"GVZgODkBbGg=5FE8AF66005007000003013739410305 00897000000 141_CA=2.3&_SYSID=5007&_ENDIAN=0&_RS_1=MESSAGE;3;LEVEL,CODE,MSG;" +
"1&_1=0,0,外围登陆成功&_EORS_1=1&_RS_2=DATA;35;" +
"market,secuid,name,custid,custprop,fundid,custname,orgid,bankcode,timeoutflag,identitysign," +
"authlevel,pwderrtimes,agtcustid,creditfund,creditflag,netaddr,custkind,custgroup,fundlimit,bankstate," +
"custodystate,clearstate,lastprintdate,lastprintway,printip,logindate,logintime,outputinfo,operway," +
"idnoenddate,idnobegindate,outmsg,custstatus,superflag;" +
"2&_2=1,A641393224,刘梦明,55132633,0,10586706,刘梦明,4301,6004,0,,0,0,55132633,0,0,6CAE8B62900A,E,c,,1,o,0," +
"20200211,0,,20201227,21205975,,012347ADEFGIMNVYcu,,20270906,20170906,您的交易密码已经321天未修改,0,1&_3=2,0278160114," +
"刘梦明,55132633,0,10586706,刘梦明,4301,6004,0,,0,0,55132633,0,0,6CAE8B62900A,E,c,,1,o,0,20200211,0,,20201227,21205975,," +
"012347ADEFGIMNVYcu,20270906,20170906,您的交易密码已经321天未修改,0,1&_EORS_2=3&_RC=3&_CC=35&_TL=3:1;35:2;";
map.put(GeneralConstants.MESSAGE, message);
desensitizationFunction.desensitizationNormalFieldMessage(map);
log.info(JSON.toJSONString(map));
}
@Test
public void test6() {
Map<String, String> conf = new HashMap<>(8);
conf.put(ConfigConstants.JOB_NAME, "jobName");
conf.put(ConfigConstants.SOURCE_PARALLELISM, "1");
conf.put(ConfigConstants.TRANSFORMER_PARALLELISM, "1");
conf.put(ConfigConstants.SINK_PARALLELISM, "1");
conf.put(ConfigConstants.HDFS_URI, "1");
conf.put(ConfigConstants.HDFS_USER, "1");
conf.put(ConfigConstants.HDFS_SRC, "1");
conf.put(ConfigConstants.HDFS_DEST, "1");
conf.put(ConfigConstants.MATCH_HOSTNAME, "*");
conf.put(ConfigConstants.START_TIME, "2020-11-07 21:22:20");
conf.put(ConfigConstants.END_TIME, "2020-11-07 23:40:30");
conf.put(ConfigConstants.NAME_KEY, "name,custname,otherlinkman,longname,YXYHMC,deputyname,fundname");
conf.put(ConfigConstants.MOBILE_KEY, "netaddr,telno,mobileno,faxno,hometelno,worktelno,fax,mobil,call");
conf.put(ConfigConstants.PHONE_KEY, "netaddr,telno,mobileno,faxno,hometelno,worktelno,fax,mobil,call");
conf.put(ConfigConstants.EMAIL_KEY, "email");
conf.put(ConfigConstants.ID_KEY, "idno,deputyidno");
conf.put(ConfigConstants.BANK_CARD_KEY, "lmbankid");
conf.put(ConfigConstants.ADDRESS_KEY, "addr,workaddr,otheraddr,othertelno");
conf.put(ConfigConstants.IP_KEY, "printip,ipaddr,operipaddr,clientip");
conf.put(ConfigConstants.MAC_KEY, "netaddr,clientmac");
conf.put(ConfigConstants.PASSWORD_KEY, "trdpwd,newpwd,oldfundpwd,newfundpwd,bankpwd,dynamicpwd1,dynamicpwd2,dynamicpwd,fundpwd,newbankpwd");
conf.put(ConfigConstants.POSITION_KEY, "orderamt,orderqty,orderprice,fundeffect,stkeffect,profitcost,oddqty,sumqty,ordercount,orderqty,orderamt,fundbal,fundavl,marketvalue,fund,stkvalue,stkqty,stkbal,stkavl,mktval,matchamt,fundeffect,fee_yhs,fee_jsxf,fee_sxf,fee_ghf,fee_qsf,fee_jygf,feefront,fee_jsf,fee_zgf,fundbjhgavl,bb_matchclearamt,nHQSBSL,fundeffect,fundbal,fundeffect,bondbal,bondavl,maxdraw,marketvalue,matchqty,funddraw");
JobInitConfig jobInitConfig = new JobInitConfig(conf);
JobConfig jobConfig = new JobConfig(jobInitConfig);
DesensitizationFunction<Object, Object> desensitizationFunction = new DesensitizationFunction(jobConfig);
Map<String, String> map = new HashMap<>(8);
String message = "20201227-202920 Req: NodeId=6007, QueueId=304, MsgId=6000000604B2949123C20B24, Len=346," +
"Buf=01280000000000000000100000000000000040F2E92B8E7AKCXP00 GV2gODkBbGg= 410570 00220000000 " +
"010_CA=2.3&_ENDIAN=0&custid=000004105641&custorgid=3607&ext=&funcid=410570&fundid=0002800713&g_stationaddr=13517951826" +
"&moneytype=&netaddr=13517951826&operway=&orgid=3607&terminalinfo=&trdpwd=G|8|6l3B&serverid=&sg_server id=6 " +
  • Remove this hard-coded password. 📘

Please register or sign in to reply
"Ans: NodeId=6007, QueueId=304, MsgId=6000000604B2949123C20E24, Len=1284, Buf=01300000000000000000306007060070600740F2E92B8E7AKCXP00 " +
"GV2gODkBbGg=5FE87E20006007000005013147410570 01158000000 010_CA=2.3&_SYSID=6007&_ENDIAN=0&_RS_1=MESSAGE;3;LEVEL,CODE,MSG;" +
"1&_1=0,0,客户资产总值查询&_EORS_1=1&_RS_2=DATA;48;custid, orgid, brhid, status, fundid, fundname, moneytype, custtype, fundassetbal," +
"fundassetavl, fundassettotal, fundassettotalnew,fundasset, fundassetstktotal, fundassetstk, fundasaetggt, fundassetstkwxxj, " +
"fundassetbondtotal, fundassetbond, fundassetrzgh, fundassetrqgh, fundassetmatchrqgh, fundasaetstkzy, fundassetrzcs, fundassetrqcs, " +
"fundassetstkxyzy, fundassetadjust, fundassetadjust_xsf, fundassetadjust_qt, fundassetoftotal, fundassetof, fundassetbjhgsh, " +
"fundassetbjhgsz, fundassetofuncome, fundassetx jgj, fundassetzfzz, fundassetjdlsec, fundassetfjjj, fundassetcurdayrqgh, " +
"fundassetcurdayrzgh, fundassetotcend, debtstotal, zy_mtkvalue, zy_debts, en_mktvalue, en_debts, zywymktvalue, sumprofitamt;" +
"2&_2=4105641,3607,3607,0,2800713,潘欣玲,0,0,1000.00,158069.42,825587.15,825587.15,158069.42,331334.56,302463.77,0.00,0.00," +
"779.99,779.99,0.00,0.00,0.00,0.00,0.00,0.00,0.00,28090.80,0.00,28090.80,336183.17,336183.17,0.00,0.00,0.00,55.98,0.00,0.00,0.00," +
"157013.44,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,-63104.28&_EORS_2=2&_RC=2&_CC=48&_TL=3:1;48:1;";
map.put(GeneralConstants.MESSAGE, message);
desensitizationFunction.desensitizationNormalFieldMessage(map);
log.info(JSON.toJSONString(map));
}
@Test
public void test8() {
String a = "market,secuid,name,custid,custprop,fundid,custname,orgid,bankcode,timeoutflag,identitysign,authlevel,pwderrtimes,agtcustid,creditfund,creditflag,netaddr,custkind,custgroup,fundlimit,bankstate,custodystate,clearstate,lastprintdate,lastprintway,printip,logindate,logintime,outputinfo,operway,idnoenddate,idnobegindate,outmsg,custstatus,superflag";
log.info(String.valueOf(a.split(",").length));
}
@Test
public void test9() {
String a = "2&_2=1,A641393224,刘梦明,55132633,0,10586706,刘梦明,4301,6004,0,,0,0,55132633,0,0,6CAE8B62900A,E,c,,1,o,0," +
"20200211,0,,20201227,21205975,,012347ADEFGIMNVYcu,20270906,20170906,您的交易密码已经321天未修改,0,1&_3=2,0278160114," +
"刘梦明,55132633,0,10586706,刘梦明,4301,6004,0,,0,0,55132633,0,0,6CAE8B62900A,E,c,,1,o,0,20200211,0,,20201227,21205975,," +
"012347ADEFGIMNVYcu,20270906,20170906,您的交易密码已经321天未修改,,0,1&_EORS_2=3&_RC=3&_CC=35&_TL=3:1;35:2;";
log.info(String.valueOf(a.split(",").length));
}
}
\ No newline at end of file
  • SonarQube analysis reported 193 issues

    • 4 blocker
    • 🚫 34 critical
    • 131 major
    • 🔽 21 minor
    • 3 info

    Watch the comments in this conversation to review them.

    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. 🚫 Define a constant instead of duplicating this literal " {\n" 11 times. 📘
    4. 🚫 [Define a constant instead of duplicating this literal " "type": \n" 11 times. 📘
    5. 🚫 Define a constant instead of duplicating this literal " "string",\n" 6 times. 📘
    6. 🚫 Define a constant instead of duplicating this literal " "null"\n" 6 times. 📘
    7. 🚫 [Define a constant instead of duplicating this literal " ]\n" 11 times.](https://git.zorkdata.com/liaomingtao/transaction-log-desensitization/blob/1400f1ee0c47ad1167852ee0df00d38885e940a2/src/main/java/com/zorkdata/desensitization/avro/AvroSchemaDef.java#L23) 📘
    8. 🚫 Define a constant instead of duplicating this literal " },\n" 9 times. 📘
    9. 🚫 Define a constant instead of duplicating this literal " "null",\n" 5 times. 📘
    10. 🚫 Define a constant instead of duplicating this literal " {\n" 5 times. 📘
    11. 🚫 Define a constant instead of duplicating this literal " "type": "map",\n" 5 times. 📘
    12. 🚫 Define a constant instead of duplicating this literal " "values": "string"\n" 3 times. 📘
    13. 🚫 Define a constant instead of duplicating this literal " }\n" 5 times. 📘
    14. 🚫 Define a constant instead of duplicating this literal "序列化失败" 13 times. 📘
    15. 🚫 Refactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed. 📘
    16. 🚫 Refactor this method to reduce its Cognitive Complexity from 138 to the 15 allowed. 📘
    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 22 to the 15 allowed. 📘
    19. 🚫 Refactor this method to reduce its Cognitive Complexity from 19 to the 15 allowed. 📘
    20. 🚫 Change this "try" to a try-with-resources. (sonar.java.source not set. Assuming 7 or greater.) 📘
    21. 🚫 Refactor this code to not throw exceptions in finally blocks. 📘
    22. 🚫 Refactor this code to not throw exceptions in finally blocks. 📘
    23. 🚫 Change this "try" to a try-with-resources. (sonar.java.source not set. Assuming 7 or greater.) 📘
    24. 🚫 Define a constant instead of duplicating this literal "jobName" 6 times. 📘
    25. 🚫 Define a constant instead of duplicating this literal "2020-11-07 21:22:20" 6 times. 📘
    26. 🚫 Define a constant instead of duplicating this literal "2020-11-07 23:40:30" 6 times. 📘
    27. 🚫 Define a constant instead of duplicating this literal "netaddr,telno,mobileno,faxno,hometelno,worktelno,fax,mobil,call" 6 times. 📘
    28. 🚫 Define a constant instead of duplicating this literal "email" 3 times. 📘
    29. 🚫 Define a constant instead of duplicating this literal "idno,deputyidno" 3 times. 📘
    30. 🚫 Define a constant instead of duplicating this literal "lmbankid" 3 times. 📘
    • ... 159 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