学习笔记-idea标黄警告:‘continue‘ is unnecessary as the last statement in a loop

意思是“continue”不需要作为循环中的最后一条语句

简单说,就是for循环中,if语句后面已经没有代码了,if语句已经是最后执行的代码,所以加入continue来跳出本次循环是没有必要的

如图:

解决思路:如图:

 很简单的标黄警告,但是我是个菜鸡,大佬不要嘲笑我哈-v-

 

2023-06-06 18:10:33,041 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7 2023-06-06 18:10:33,075 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead. 2023-06-06 18:10:33,218 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset. 2023-06-06 18:10:33,218 INFO tool.CodeGenTool: Beginning code generation Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. 2023-06-06 18:10:33,782 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `user_log` AS t LIMIT 1 2023-06-06 18:10:33,825 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `user_log` AS t LIMIT 1 2023-06-06 18:10:33,834 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /opt/module/hadoop-3.1.4 注: /tmp/sqoop-root/compile/5f4cfb16d119de74d33f1a0d776d5ae0/user_log.java使用或覆盖了已过时的 API。 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。 2023-06-06 18:10:35,111 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-root/compile/5f4cfb16d119de74d33f1a0d776d5ae0/user_log.jar 2023-06-06 18:10:35,125 WARN manager.MySQLManager: It looks like you are importing from mysql. 2023-06-06 18:10:35,126 WARN manager.MySQLManager: This transfer can be faster! Use the --direct 2023-06-06 18:10:35,126 WARN manager.MySQLManager: option to exercise a MySQL-specific fast path. 2023-06-06 18:10:35,126 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql) 2023-06-06 18:10:35,130 ERROR tool.ImportTool: Import failed: No primary key could be found for table user_log. Please specify one with --split-by or perform a sequential import with '-m 1'.
06-07
025-03-16 21:26:18.516 [main] WARN Engine - prioriy set to 0, because NumberFormatException, the value is: null 2025-03-16 21:26:18.517 [main] INFO PerfTrace - PerfTrace traceId=job_-1, isEnable=false, priority=0 2025-03-16 21:26:18.517 [main] INFO JobContainer - DataX jobContainer starts job. 2025-03-16 21:26:18.519 [main] INFO JobContainer - Set jobId = 0 Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The dr iver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.2025-03-16 21:26:18.885 [job-0] INFO OriginalConfPretreatmentUtil - Available jdbcUrl:jdbc:mysql://master:3306/szt?y earIsDateType=false&zeroDateTimeBehavior=convertToNull&tinyInt1isBit=false&rewriteBatchedStatements=true.2025-03-16 21:26:18.913 [job-0] INFO OriginalConfPretreatmentUtil - table:[szt_data] has columns:[car_no,card_no,clo se_date,company_name,conn_mark,deal_date,deal_money,deal_type,deal_value,equ_no,station].三月 16, 2025 9:26:19 下午 org.apache.hadoop.util.NativeCodeLoader <clinit> 警告: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 2025-03-16 21:26:19.553 [job-0] INFO JobContainer - jobContainer starts to do prepare ... 2025-03-16 21:26:19.553 [job-0] INFO JobContainer - DataX Reader.Job [mysqlreader] do prepare work . 2025-03-16 21:26:19.554 [job-0] INFO JobContainer - DataX Writer.Job [hdfswriter] do prepare work . 2025-03-16 21:26:19.623 [job-0] INFO HdfsWriter$Job - 由于您配置了writeMode append, 写入前不做清理工作, [/daas/ods/o ds_szt_data] 目录下写入相应文件名前缀 [part] 的文件2025-03-16 21:26:19.623 [job-0] INFO JobContainer - jobContainer starts to do split ... 2025-03-16 21:26:19.623 [job-0] INFO JobContainer - Job set Channel-Number to 2 channels. 2025-03-16 21:26:19.646 [job-0] INFO SingleTableSplitUtil - split pk [sql=SELECT MIN(equ_no),MAX(equ_no) FROM szt_da ta WHERE (date_format(deal_date,'%Y%m%d') ='${dt}' AND equ_no IS NOT
03-17
root@yunxin-ops-tmp2:~# bash ss Request URL: http://api-in.stone.netease.com/kuafu/api/v3/form/submit?gwClientId=724&gwClientUser=wb.zhangjian17&gwTimestamp=1743560999&gwSignature=0679ea0d6398cb6cd9de1110fe5472b4 Payload: { "processDefId": "申请夸父OpenApi权限:6:150135612", "variables": { "用途": "调用夸父API进行创建工单", "是否公开": "否", "产品名称": "{\"productId\":\"91454\",\"productValue\":\"夸父系统\",\"responsorValue\":\"hzkanghao@corp.netease.com\"}", "stone网关应用名称": "yjz-test", "负责人": "H17793", "stone网关应用ID": "182", "申请访问的API列表": "api/v2/form/submit", "跟踪者": "H17793", "工单优先级": "普通", "account": "wb.zhangjian17", "mail": "wb.zhangjian17@corp.netease.com" } } Generated Signature: 0679ea0d6398cb6cd9de1110fe5472b4 Timestamp: 1743560999 Note: Unnecessary use of -X or --request, POST is already inferred. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 10.200.164.181:80... * Connected to api-in.stone.netease.com (10.200.164.181) port 80 (#0) > POST /kuafu/api/v3/form/submit?gwClientId=724&gwClientUser=wb.zhangjian17&gwTimestamp=1743560999&gwSignature=0679ea0d6398cb6cd9de1110fe5472b4 HTTP/1.1 > Host: api-in.stone.netease.com > User-Agent: curl/7.74.0 > Accept: */* > Content-Type: application/json > Content-Length: 641 > } [641 bytes data] * upload completely sent off: 641 out of 641 bytes * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Server: nginx < Date: Wed, 02 Apr 2025 02:29:59 GMT < Content-Type: text/html;charset=utf-8 < Content-Length: 73 < Connection: keep-alive < Vary: Accept-Encoding < Access-Control-Allow-Origin: * < Access-Control-Allow-Methods: GET,POST,OPTIONS < Access-Control-Allow-Headers: Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With < { [73 bytes data] 100 714 100 73 100 641 802 7043 --:--:-- --:--:-- --:--:-- 7846 * Connection #0 to host api-in.stone.netease.com left intact Success: {"message":"用户信息中account和mail不能同时为空","code":500} root@yunxin-ops-tmp2:~#
最新发布
04-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值