精华内容
下载资源
问答
  • asm-util.jar

    2016-08-04 21:41:31
    asm-util-1.3.4.jar, asm-util-1.3.5.jar, asm-util-1.4.1.jar, asm-util-1.4.3.jar, asm-util-1.5.1.jar, asm-util-1.5.2.jar, asm-util-1.5.3.jar, asm-util-2.0.jar, asm-util-2.1.jar, asm-util-2.2.1-sources....
  • java.util

    2017-11-30 11:24:06
    Java提供日期(Data)类、日历(Calendar)类,随机数(Random)类,堆栈(Stack)、向量(Vector) 、位集合(Bitset)以及哈希表(Hashtable)等类来表示相应的数据结构
  • android.util.Base64类

    2018-05-10 09:17:13
    Android util包中的Base64类,在java工程中使用可以
  • util-linux-2.24.tar.gz

    2017-01-06 10:38:16
    util-linux
  • util-linux-ng-2.17源码(含fdisk)

    热门讨论 2012-06-16 09:56:12
    util-linux-ng-2.17源码(含fdisk) Here is a list of all documented files with brief descriptions: util-linux-ng-2.17.2/disk-utils/blockdev.c [code] util-linux-ng-2.17.2/disk-utils/cramfs.h [code] ...
  • java util 工具类java util 工具类java util 工具类java util 工具类java util 工具类java util 工具类java util 工具类java util 工具类java util 工具类java util 工具类
  • util_python

    2013-06-03 15:30:20
    util.py It is my work-code. I hope it is used for you. OK, this's all.
  • 本资源包含两个 pdf 文档,一本根据 Jakob Jenkov 最新博客 (http://tutorials.jenkov.com/java-util-concurrent/index.html) 整理的 java_util_concurrent_user_guide_en.pdf,一个中文翻译的 java_util_concurrent...
  • Apache全套安装包(apr,apr-util,pcre) 适用于Linux系统。 包含了安装Apache的web服务器的全套软件。 免得你一个个去网上搜索下载的那么麻烦。 apache-2.4.6 apr 1.4.5 apr-util-1.4.1 pcre-8.33 使用make方式安装...
  • JavaScript工具类:util.js用法实例

    千次阅读 2019-03-04 15:30:59
    _util.isEmpty() console.log(_util.isEmpty(undefined)); // true console.log(_util.isEmpty(null)); // true console.log(_util.isEmpty('')); // true console.log(_util.isEmpty([])); /...

    缓存方法


    _util.cookie.set()
    _util.cookie.set('user_name', 'guang');         // 关闭浏览器后失效。注:单独打开 demo.html 是没法缓存的,需要启动本地服务
    _util.cookie.set('user_id', '12', 1);           // 保存一天
    _util.cookie.set('user_type', 'admin', 1/24);   // 保存一个小时
    _util.cookie.set('is_login', '1', 1/24/60);     // 保存一分钟
    
    _util.cookie.get()
    console.log(_util.cookie.get('user_name'));     // guang
    console.log(_util.cookie.get('user_id'));       // 12
    console.log(_util.cookie.get('user_type'));     // admin
    console.log(_util.cookie.get('is_login'));      // '1'
    
    _util.cookie.remove()
    _util.cookie.remove('user_name');
    _util.cookie.remove('user_id');
    _util.cookie.remove('user_type');
    _util.cookie.remove('is_login');
    

    本地储存方法


    _util.storage.set()
    _util.storage.set('user', { name: 'guang', age: '25'}); // 'obj-{"name":"guang","age":"25"}'
    _util.storage.set('lang', 'zh-cn');                     // 'zh-cn'
    
    _util.storage.get()
    console.log(_util.storage.get('user'));     // { name: 'guang', age: '25'}
    console.log(_util.storage.get('lang'));     // 'zh-cn'
    
    _util.storage.remove()
    _util.storage.remove('user');	// 删除 user 及对应的值
    
    _util.storage.clear()
    _util.storage.clear();	// 清空所有 localStorage
    

    数据类型通用方法


    _util.isEmpty()
    console.log(_util.isEmpty(undefined));  // true
    console.log(_util.isEmpty(null));   // true
    console.log(_util.isEmpty(''));     // true
    console.log(_util.isEmpty([]));     // true
    console.log(_util.isEmpty({}));     // true
    
    _util.isString()
    console.log(_util.isString('q'));  // true
    
    _util.isArray()
    console.log(_util.isArray('q'));    // false
    console.log(_util.isArray(['q']));  // true
    
    _util.isObject()
    console.log(_util.isObject('q'));       // false
    console.log(_util.isObject(['q']));     // false
    console.log(_util.isObject({id:'q'}));  // true
    
    _util.isFunction()
    var fn = function(){};
    
    console.log(_util.isFunction(fn));  // true
    
    _util.length()
    var obj = {
        id: 'a',
        status: '0'
    };
    var arr = ['p','o','i'];
    var str = 'yeah';
    
    console.log(_util.length(obj));     // 2
    console.log(_util.length(arr));     // 3
    console.log(_util.length(str));     // 4
    
    _util.forEach()
    var source = [
        { id: 'c', status: '3', count: '46' },
        { id: 'd', status: '1', count: '41' }
    ];
    _util.forEach(source, function(i, item){
        console.log(i);
        console.log(item);  
        // 0
        // { id: 'c', status: '3', count: '46' }
        // 1
        // { id: 'd', status: '1', count: '41' }
    });
    
    var source = {
        id: 'c',
        status: '3'
    };
    _util.forEach(source, function(key, value){
        console.log(key);
        console.log(value);  
        // 'id'
        // 'c'
        // 'status'
        // '3'
    });
    
    _util.isEqual()
    var source1 = [
        'qw',
        ['q','w'],
        { id: 'a', status: '2', count: '19' },
    ];
    var source2 = [
        'qw',
        ['q','w'],
        { id: 'a', status: '2', count: '19' },
    ];
    var source3 = [
        'qw',
        ['q','w'],
        { id: 'b', status: '2', count: '19' },
    ];
    
    console.log(_util.isEqual(source1, source2));     // true
    console.log(_util.isEqual(source1, source3));     // false
    
    _util.copy()
    var s1 = { id: 'a' };
    var s2 = s1;
    s2.status = '2';
    console.log(s1);    // {id: "a", status: "2"}
    
    var s1 = { id: 'a' };
    var s2 = _util.copy(s1);
    s2.status = '2';
    console.log(_util.copy(s1));    // {id: "a"}
    
    var s1 = [{ id: 'a' }];
    var s2 = s1;
    s2.push({ id: 'b' });
    console.log(_util.copy(s1));    // [{id: "a"}, {id: "b"}]
    
    var s1 = [{ id: 'a' }];
    var s2 = _util.copy(s1);
    s2.push({ id: 'b' });
    console.log(_util.copy(s1));    // [{id: "a"}]
    

    字符串方法


    _util.trim()
    var str = '  qwe  rty ';
    
    console.log(_util.trim(str));       // 'qwe  rty'
    
    _util.trimAll()
    var str = '  qwe  rty ';
    
    console.log(_util.trimAll(str));    // 'qwerty'
    
    _util.string.format()
    var str = '确定要{0}单据【{1}】吗?';
    
    console.log(_util.string.format(str, '删除', 'QZYDYJZB201901300002'));   // '确定要删除单据【QZYDYJZB201901300002】吗?'
    
    _util.string.isStartWith()
    var str = 'qwerty';
    var startStr = 'qw';
    
    console.log(_util.string.isStartWith(str, startStr'));   // true
    
    _util.string.isEndWith()
    var str = 'qwerty';
    var endStr = 'ty';
    
    console.log(_util.string.isEndWith(str, endStr));   // true
    
    _util.string.firstUpperCase()
    var str = 'qwerty';
    
    console.log(_util.string.firstUpperCase(str));   // 'Qwerty'
    
    _util.string.reverse()
    var str = 'qwerty';
    
    console.log(_util.string.reverse(str));   // 'ytrewq'
    
    _util.string.split()
    var str = 'a,s,d';
    
    console.log(_util.string.split(str, ','));   // ["a", "s", "d"]
    
    _util.string.getNext()
    console.log(_util.string.getNext('0001'));     // '0002'
    console.log(_util.string.getNext('XM0001'));   // 'XM0002'
    

    数字方法


    _util.number.parseInt()
    console.log(_util.number.parseInt('25.36'));   // 25
    
    _util.number.parseFloat()
    console.log(_util.number.parseFloat('25.36'));   // 25.36
    
    _util.number.toFixed()
    console.log(_util.number.toFixed('25.3682', 2));   // '25.37'
    
    _util.number.round()
    console.log(_util.number.round('25.3682', 2));   // 25.37
    
    _util.number.ceil()
    console.log(_util.number.ceil('25.3612', 2));   // 25.37
    
    _util.number.floor()
    console.log(_util.number.floor('25.3682', 2));   // 25.36
    
    _util.number.mul()
    var n1 = 1.2;
    var n2 = 2.3;
    var n3 = 3.45;
    
    console.log(_util.number.mul(n1, n2 ,n3));   // 9.522
    
    _util.number.add()
    var n1 = 1.2;
    var n2 = 2.3;
    var n3 = 3.45;
    
    console.log(_util.number.add(n1, n2 ,n3));   // 6.95
    
    _util.number.random()
    console.log(_util.number.random(1, 100));   // 55
    

    数组方法


    _util.array.indexOf()
    var arr = [
        'qwert',
        ['q', 'w', 'e'],
        { id: 'a', name: '光' }
    ];
    
    console.log(_util.array.indexOf(arr, 'qwert'));         // 0
    console.log(_util.array.indexOf(arr, ['q', 'w', 'e'])); // 1
    console.log(_util.array.indexOf(arr, {id: 'a'}));       // 2。当检索数组中的对象时,只用匹配该对象的某一个(几个)属性即可查询到。
    
    _util.array.push()
    var arr = ['q'];
    var len = _util.array.push(arr, ['w','e']);
    
    console.log(arr);   // ["q", "w", "e"]
    console.log(len);   // 4
    
    _util.array.sort()
    var arr = [
        { billNo: 'CGAPD20190301000002', date: '2019-03-01', count: '22' },
        { billNo: 'CGAPD20190228000001', date: '2019-02-28', count: '14' },
        { billNo: 'CGAPD20190301000001', date: '2019-03-01', count: '36' },
    ];
    
    console.log(_util.array.sort(arr, 'billNo'));   // 输出结果为:  
    // [
    //    { billNo: 'CGAPD20190228000001', date: '2019-02-28', count: '14' },
    //    { billNo: 'CGAPD20190301000001', date: '2019-03-01', count: '36' },
    //    { billNo: 'CGAPD20190301000002', date: '2019-03-01', count: '22' },
    // ];
    
    _util.array.unique()
    var arr = [
        'qw',
        'qw',
        ['q','w'],
        ['w','q'],
        { id: 'a', status: '1', count: '22' },
        { id: 'a', status: '2', count: '19' },
    ];
    
    console.log(_util.array.unique(arr));   // 输出结果为:
    // [
    //     'qw',
    //     ['q','w'],
    //     ['w','q'],
    //     { id: 'a', status: '1', count: '22' },
    //     { id: 'a', status: '2', count: '19' },
    // ]
    
    console.log(_util.array.unique(arr, 'id')); // 输出结果为:
    // [
    //     'qw',
    //     ['q','w'],
    //     ['w','q'],
    //     { id: 'a', status: '1', count: '22' },
    // ]
    
    console.log(_util.array.unique(arr, 'id', true));   // 输出结果为:
    // [
    //     'qw',
    //     ['q','w'],
    //     { id: 'a', status: '1', count: '22' },
    // ]
    
    _util.array.filter()
    arr = [
        { id: 'a', status: '1', count: '22' },
        { id: 'b', status: '2', count: '19' },
        { id: 'c', status: '3', count: '46' },
        { id: 'd', status: '1', count: '41' },
    ];
    
    console.log(_util.array.filter(arr, { status: '1'}));   // 输出结果为:
    // [
    //     { id: 'a', status: '1', count: '22' },
    //     { id: 'd', status: '1', count: '41' }
    // ]
    
    console.log(_util.array.filter(arr, { status: '1', id: 'a'}));      // 输出结果为:
    // [
    //     { id: 'a', status: '1', count: '22' }
    // ]
    
    console.log(_util.array.filter(arr, { status: ['1', '2']}));        // 输出结果为:
    // [
    //     { id: 'a', status: '1', count: '22' },
    //     { id: 'b', status: '2', count: '19' },
    //     { id: 'd', status: '1', count: '41' }
    // ]
    
    console.log(_util.array.filter(arr, { status: ['1', '2']}, true));  // 输出结果为:
    // [
    //     { id: 'c', status: '3', count: '46' },
    // ]
    
    _util.array.select()
    var arr = [
        { id: 'a', status: '1', count: '22' },
        { id: 'b', status: '2', count: '19' },
        { id: 'c', status: '3', count: '46' },
    ];
    
    console.log(_util.array.select(arr, 'count'));    // ["22", "19", "46"]
    console.log(_util.array.select(arr, ['status', 'count']));    // 输出结果为:
    // [
    //     { status: '1', count: '22' },
    //     { status: '2', count: '19' },
    //     { status: '3', count: '46' }
    // ]
    
    _util.array.concat()
    var arr1 = ['q','w'];
    var arr2 = ['q','a'];
    
    console.log(_util.array.concat(arr1, arr2));    // ["q", "w", "a"]
    
    _util.array.group()
    var arr = [
        { size: 'S', color: '红色', price: '199' },
        { size: 'M', color: '蓝色', price: '299' },
        { size: 'M', color: '黄色', price: '159' },
        { size: 'S', color: '绿色', price: '168' },
    ];
    
    console.log(_util.array.group(arr, 'size'));    // 输出结果为:
    // [
    //     {
    //         "size":"S",
    //         "group":[
    //             {
    //                 "size":"S",
    //                 "color":"红色",
    //                 "price":"199"
    //             },
    //             {
    //                 "size":"S",
    //                 "color":"绿色",
    //                 "price":"168"
    //             }
    //         ]
    //     },
    //     {
    //         "size":"M",
    //         "group":[
    //             {
    //                 "size":"M",
    //                 "color":"蓝色",
    //                 "price":"299"
    //             },
    //             {
    //                 "size":"M",
    //                 "color":"黄色",
    //                 "price":"159"
    //             }
    //         ]
    //     }
    // ]
    
    _util.array.remove()
    var arr = ['s', 'g', '', null, undefined, { id:'q', status: '1'} ];
    
    _util.array.remove(arr);
    console.log(arr);   // ["s", "g", { id:'q', status: '1'}]
    
    _util.array.remove(arr, ['s', { id:'q' }]);
    console.log(arr);   // ["g"]
    
    _util.array.clear()
    var arr = ['s', 'h', 'i'];
    _util.array.clear(arr);
    
    console.log(arr);   // []
    

    对象方法


    _util.object.keys()
    var obj = {
        name: 'guang',
        age: '25'
    };
    
    console.log(_util.object.keys(obj));    // ["name", "age"]
    
    _util.object.values()
    var obj = {
        name: 'guang',
        age: '25'
    }
    
    console.log(_util.object.values(obj));  // ["guang", "25"]
    
    _util.object.assign()
    var obj2 = {
        type: 'admin',
        age: '26'
    };
    _util.object.assign(obj, obj2);
    
    console.log(obj);   // { name: "guang", age: "26", type: "admin" }
    
    _util.object.select()
    var obj = {
        name: 'guang',
        email: '123456@qq.com',
        phone: '13566668888'
    };
    
    console.log(_util.object.select(obj, ['name', 'phone'])); // {name: "guang", phone: "13566668888"}
    
    _util.object.remove()
    var obj = {
        name: 'guang',
        email: '123456@qq.com',
        phone: '13566668888',
        wrong: '',
        wrong2: undefined,
    };
    
    console.log(_util.object.remove(obj)); // {name: "guang", email: "123456@qq.com", phone: "13566668888"}
    console.log(_util.object.remove(obj, ['name', 'phone'])); // {email: "123456@qq.com"}
    
    _util.object.getValue()
    var obj = {
        name: 'guang',
        child: {
            name: 'lan'
        }
    };
    
    console.log(_util.object.getValue(obj, 'child.name'));  // lan
    
    _util.object.serialize()
    var obj = {
        id: 'a',
        billNo: 'CGDD20190228000001'
    };
    
    console.log(_util.object.serialize(obj));   // id=a&billNo=CGDD20190228000001
    
    _util.object.clear()
    var obj = {
        id: 'a',
        billNo: 'CGDD20190228000001'
    };
    _util.object.clear(obj);
    
    console.log(obj);  // {id: "", billNo: ""}
    

    json数据方法


    _util.json.toTreeData()
    var data = [
        { "id": "1", "level": "1", "name": "基础平台", "parentId": null },
        { "id": "2", "level": "1", "name": "财务平台", "parentId": null },
        { "id": "101", "level": "2", "name": "设置", "parentId": "1" },
        { "id": "102", "level": "2", "name": "系统", "parentId": "1" },
        { "id": "10101", "level": "3", "name": "参数设置", "parentId": "101" },
        { "id": "10201", "level": "3", "name": "权限设置", "parentId": "102" }
    ];
    
    console.log(_util.json.toTreeData(data, 'id', 'parentId', 'children')); // 输出结果为:
    // [
    //     {
    //         "id":"1",
    //         "level":"1",
    //         "name":"基础平台",
    //         "parentId":null,
    //         "children":[
    //             {
    //                 "id":"101",
    //                 "level":"2",
    //                 "name":"设置",
    //                 "parentId":"1",
    //                 "children":[
    //                     {
    //                         "id":"10101",
    //                         "level":"3",
    //                         "name":"参数设置",
    //                         "parentId":"101"
    //                     }
    //                 ]
    //             },
    //             {
    //                 "id":"102",
    //                 "level":"2",
    //                 "name":"系统",
    //                 "parentId":"1",
    //                 "children":[
    //                     {
    //                         "id":"10201",
    //                         "level":"3",
    //                         "name":"权限设置",
    //                         "parentId":"102"
    //                     }
    //                 ]
    //             }
    //         ]
    //     },
    //     {
    //         "id":"2",
    //         "level":"1",
    //         "name":"财务平台",
    //         "parentId":null
    //     }
    // ]
    

    时间方法


    _util.date.format()
    console.log(_util.date.format());
    console.log(_util.date.format('', 'YYYY月MM年DD日'));
    console.log(_util.date.format('', 'YYYY-MM-DD hh:mm:ss 星期WW'));
    
    _util.date.otherMonth()
    console.log(_util.date.otherMonth(-1, '2019-03-04'));	// 2019-02-04
    console.log(_util.date.otherMonth(1, '2019-03-04'));	// 2019-04-04
    
    _util.date.startOfMonth()
    console.log(_util.date.startOfMonth(0, '2019-03-04'));	// '2019-03-01'
    console.log(_util.date.startOfMonth(-1, '2019-03-04'));	// '2019-02-01'
    
    _util.date.endOfMonth()
    console.log(_util.date.endOfMonth(0, '2019-03-04'));	// '2019-03-31'
    console.log(_util.date.endOfMonth(-1, '2019-03-04'));	// '2019-02-28'
    
    _util.date.startOfWeek()
    console.log(_util.date.startOfWeek(0, '2019-03-04'));		// '2019-03-04'
    
    _util.date.endOfWeek()
    console.log(_util.date.endOfWeek(0, '2019-03-04'));		// '2019-03-10'
    
    _util.date.otherDate()
    console.log(_util.date.otherDate(-6, '2019-03-04'));	// '2019-02-26'
    
    _util.date.howManyDays()
    console.log(_util.date.howManyDays('2019-01-12', '2019-02-01'));    // 20
    
    _util.date.howManyMonths()
    console.log(_util.date.howManyMonths('2019-01', '2018-05'));    // 8
    
    _util.date.getDatesBetween()
    console.log(_util.date.getDatesBetween('2019-01-25', '2019-02-01'));    // ["2019-01-25", "2019-01-26", "2019-01-27", "2019-01-28", "2019-01-29", "2019-01-30", "2019-01-31", "2019-02-01"]
    console.log(_util.date.getDatesBetween('2019-01-25', '2019-02-01', 'YYYY-MM')); // ["2019-01", "2019-02"]
    

    浏览器判断方法


    _util.browser.type()
    console.log(_util.browser.type());
    
    _util.browser.isChrome()
    console.log(_util.browser.isChrome());
    
    _util.browser.isIE()
    console.log(_util.browser.isIE());
    
    _util.browser.isEdge()
    console.log(_util.browser.isEdge());
    
    _util.browser.isSafari()
    console.log(_util.browser.isSafari());
    
    _util.browser.isFirefox()
    console.log(_util.browser.isFirefox());
    
    _util.browser.isWechat()
    console.log(_util.browser.isWechat());
    
    _util.browser.isAndroid()
    console.log(_util.browser.isAndroid());
    
    _util.browser.isIOS()
    console.log(_util.browser.isIOS());
    
    _util.browser.isMobile()
    console.log(_util.browser.isMobile());
    

    表单验证方法


    _util.validate.positiveToFixed()
    var input = '12.345';
    
    console.log(_util.validate.positiveToFixed(input, 2));  // false
    console.log(_util.validate.positiveToFixed(input, 3));  // true
    
    注:其他方法直接调用即可

    下载

    npm i sg-utils -S
    

    GitHub地址(记得给星哦)

    https://github.com/shiguang0116/sg-utils


    系列文章

    JavaScript工具类(一):util.js创建及上传
    JavaScript工具类(二):cookie缓存
    JavaScript工具类(三):localStorage本地储存
    JavaScript工具类(四):数据类型
    JavaScript工具类(五):string字符串
    JavaScript工具类(六):number数字
    JavaScript工具类(七):array数组
    JavaScript工具类(八):object对象
    JavaScript工具类(九):date日期
    JavaScript工具类(十):base64编码、解码
    JavaScript工具类(十一):浏览器、移动端类型
    JavaScript工具类(十二):validate表单验证
    JavaScript工具类(十三):url路径处理
    JavaScript工具类(十四):json数据格式
    JavaScript工具类:util.js用法实例


    展开全文
  • java.util.concurrent.RejectedExecutionException异常报错。 具体看了下代码,里面的执行逻辑也不难,没有外部依赖都是内存多线程cpu类型计算的逻辑。 下面是报错的线程池状态变化,由上到下,按照时间增长,最后...

    场景

    业务一切正常,突然收到一堆告警,发现全是
    java.util.concurrent.RejectedExecutionException异常报错。
    具体看了下代码,里面的执行逻辑也不难,没有外部依赖都是内存多线程cpu类型计算的逻辑。
    下面是报错的线程池状态变化,由上到下,按照时间增长,最后达到饱和。

    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 99, active threads = 75, queued tasks = 5000, completed tasks = 1595259]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 101, active threads = 74, queued tasks = 4999, completed tasks = 1595298]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 90, active threads = 70, queued tasks = 4998, completed tasks = 1595354]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 93, active threads = 75, queued tasks = 5000, completed tasks = 1595378]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 85, active threads = 72, queued tasks = 5000, completed tasks = 1595443]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 83, active threads = 70, queued tasks = 5000, completed tasks = 1595447]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 90, active threads = 81, queued tasks = 5000, completed tasks = 1595476]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 85, active threads = 74, queued tasks = 4994, completed tasks = 1595574]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 91, active threads = 80, queued tasks = 4999, completed tasks = 1595678]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 95, active threads = 85, queued tasks = 5000, completed tasks = 1595696]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 95, active threads = 87, queued tasks = 5000, completed tasks = 1595721]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 93, active threads = 85, queued tasks = 4999, completed tasks = 1595727]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 94, active threads = 85, queued tasks = 4998, completed tasks = 1595737]
    ...
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 109, active threads = 96, queued tasks = 4999, completed tasks = 1596150]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 113, active threads = 102, queued tasks = 4998, completed tasks = 1596191]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 120, active threads = 109, queued tasks = 5000, completed tasks = 1596355]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 120, active threads = 110, queued tasks = 5000, completed tasks = 1596517]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 119, active threads = 110, queued tasks = 4999, completed tasks = 1596519]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 113, active threads = 105, queued tasks = 5000, completed tasks = 1596553]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 122, active threads = 109, queued tasks = 4999, completed tasks = 1596602]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 120, active threads = 120, queued tasks = 5000, completed tasks = 1597061]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 120, active threads = 120, queued tasks = 5000, completed tasks = 1597061]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 120, active threads = 120, queued tasks = 5000, completed tasks = 1597061]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 120, active threads = 120, queued tasks = 5000, completed tasks = 1597061]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 120, active threads = 120, queued tasks = 5000, completed tasks = 1597061]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 120, active threads = 120, queued tasks = 5000, completed tasks = 1597061]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 120, active threads = 120, queued tasks = 5000, completed tasks = 1597061]
    java.util.concurrent.ThreadPoolExecutor@57b5ea0f[Running, pool size = 120, active threads = 120, queued tasks = 5000, completed tasks = 1597061]
    

    因为cpu4核,所以coresize = 40,maxsize = 120,都正常。

        private static BlockingQueue<Runnable> executorQueue = new LinkedBlockingQueue<>(5000);
        private static ExecutorService executorService = new ThreadPoolExecutor(
                Runtime.getRuntime().availableProcessors() * 10,
                Runtime.getRuntime().availableProcessors() * 30,
                60, TimeUnit.SECONDS, executorQueue);
    

    通过对ThreadPoolExecutor类分析,引发java.util.concurrent.RejectedExecutionException主要有两种原因:

    1. 线程池显示的调用了shutdown()之后,再向线程池提交任务的时候,如果你配置的拒绝策略是ThreadPoolExecutor.AbortPolicy的话,这个异常就被会抛出来。
    2. 当你的排队策略为有界队列,并且配置的拒绝策略是ThreadPoolExecutor.AbortPolicy,当线程池的线程数量已经达到了maximumPoolSize的时候,你再向它提交任务,就会抛出ThreadPoolExecutor.AbortPolicy异常。

    排查

    因为全机房、只有一个节点报错,而其他机器都正常,在这个一定保证正确的前提下。
    1、看了线上的请求量、并没有突增,所以排除外部因素
    2、看了代码逻辑,逻辑内部并没有打印报错日志,说明不是线程执行耗时导致后面的其他线程排队
    3、排除线程池是否提前关闭。并没有,因为手动没有显示关闭,另外看日志也知道里面的线程数还在变化,所以不存在关闭的说法。

    考虑是否是机器本身的原因,后面经过排查,看到那个点线上的cpu使用率突然升高、系统负载突然飙升,网卡流出、流入报文数目、tcp连接数也突然为0。具体干了什么,已经让运营去看了。至少说明我们代码没有问题。

    如下图,可以感受下:
    在这里插入图片描述

    解决

    线上第一时间出现这个问题,没想2秒,看了下报错代码逻辑,然后重启了这个节点实例(当时重启完后,观察又没问题了,带着疑惑然后才去排查)

    展开全文
  • ws-commons-util-1.0.2.jar

    热门讨论 2013-07-23 09:38:43
    ws-commons-util-1.0.2.jar 相关jar包
  • Java 8 新特性|java.util.stream.Collectors

    千次阅读 2020-06-02 22:57:55
    Java 8 流的新类 java.util.stream.Collectors 实现了 java.util.stream.Collector 接口,同时又提供了大量的方法对流 ( stream ) 的元素执行 map and reduce 操作,或者统计操作。 1、 Collectors.averagingDouble...

    Java 8 流的新类 java.util.stream.Collectors 实现了 java.util.stream.Collector 接口,同时又提供了大量的方法对流 ( stream ) 的元素执行 map and reduce 操作,或者统计操作。

    1、 Collectors.averagingDouble()

    Collectors.averagingDouble() 方法将流中的所有元素视为 double 类型并计算他们的平均值。该方法返回的是同一个 Collectors 实例,因此可以进行链式操作。

    Collectors.averagingDouble() 接受一个参数,这个参数是一个 lambda 表达式,用于对所有的元素执行一个 map 操作。

    Java 所有集合的 stream().collect() 可以接受一个收集器实例作为其参数并返回该收集器的计算结果

    参考下面的代码,collect() 方法会把所有的元素收集起来然后传递给 Collectors.averagingDouble(d->d*2) 收集器,对每个元素执行 *2 操作后计算平均值

    package com.sjh.test.java8.collectors;
    
    import java.util.Arrays;
    import java.util.List;
    import java.util.stream.Collectors;
    
    public class AveragingDoubleTest {
    
        public static void main(String[] args) {
            List<Integer> list = Arrays.asList(1,2,3,4);
            Double result = list.stream().collect(Collectors.averagingDouble(d->d*2));
            System.out.println(result);
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.AveragingDoubleTest
    5.0
    
    Process finished with exit code 0
    

    2、 Collectors.averagingInt()

    该方法和Collectors.averagingDouble()一样,不同的是它把流中的所有元素看成是 int 类型,并返回一个浮点类型的平均值

    package com.sjh.test.java8.collectors;
    
    import java.util.Arrays;
    import java.util.List;
    import java.util.stream.Collectors;
    
    public class AveragingIntTest {
    
        public static void main(String[] args) {
            List<Integer> list = Arrays.asList(1,2,3,4);
            Double result = list.stream().collect(Collectors.averagingInt(v->v*2));
            System.out.println(result);
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.AveragingIntTest
    5.0
    
    Process finished with exit code 0
    

    3、 Collectors.averagingLong()

    该方法也和Collectors.averagingDouble()类似,不同的是它把流中的所有元素看成是 long 类型,并返回一个 double 类型的平均值

    package com.sjh.test.java8.collectors;
    
    import java.util.Arrays;
    import java.util.List;
    import java.util.stream.Collectors;
    
    public class AveragingLongTest {
    
        public static void main(String[] args) {
            List<Integer> list = Arrays.asList(1,2,3,4);
            Double result = list.stream().collect(Collectors.averagingLong(v->v*2));
            System.out.println(result);
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.AveragingLongTest
    5.0
    
    Process finished with exit code 0
    

    4、 Collectors.averagingDouble()

    Collectors.collectingAndThen()函数应该最像 map and reduce 了,它可接受两个参数,第一个参数用于 reduce 操作,而第二参数用于 map 操作。

    也就是,先把流中的所有元素传递给第二个参数,然后把生成的集合传递给第一个参数来处理。

    例如下面的代码,先把 [1,2,3,4] 这个集合传递给 s-> ss lambda 表达式,计算得出结果为 [1,4,9,16] ,然后再把 [1,4,9,16] 传递给 v->v2 表达式,计算得出 [2,8,18,32] ,然后传递给 Collectors.averagingLong() 计算得到结果为 25.0

    package com.sjh.test.java8.collectors;
    
    import java.util.Arrays;
    import java.util.List;
    import java.util.stream.Collectors;
    
    public class CollectingAndThenTest {
    
        public static void main(String[] args) {
            List<Integer> list = Arrays.asList(1,2,3,4);
            Double result = list.stream().collect(Collectors.collectingAndThen(Collectors.averagingLong(v->v*2),
                    s-> s*s));
            System.out.println(result);
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.CollectingAndThenTest
    25.0
    
    Process finished with exit code 0
    

    5、 Collectors.counting()

    Collectors.counting() 用于统计流中元素的个数。

    package com.sjh.test.java8.collectors;
    
    import java.util.Arrays;
    import java.util.List;
    import java.util.stream.Collectors;
    
    public class CountingTest {
    
        public static void main(String[] args) {
            List<Integer> list = Arrays.asList(1,2,3,4);
            long result= list.stream().collect(Collectors.counting());
            System.out.println(result);
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.CountingTest
    4
    
    Process finished with exit code 0
    

    6、 Collectors.joining()

    Collectors.joining() 方法用某个指定的拼接字符串把所有元素拼接成一个字符串,并添加可选的前缀和后缀

    package com.sjh.test.java8.collectors;
    
    import java.util.Arrays;
    import java.util.List;
    import java.util.stream.Collectors;
    
    public class JoiningTest {
    
        public static void main(String[] args) {
            List<String> list = Arrays.asList("A","B","C","D");
            String result= list.stream().collect(Collectors.joining(",","(",")"));
            System.out.println(result);
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.JoiningTest
    (A,B,C,D)
    
    Process finished with exit code 0
    

    7、 Collectors.maxBy() 和 Collectors.minBy()

    Collectors.maxBy()和Collectors.minBy() 两个方法分别用于计算流中所有元素的最大值和最小值。

    两个方法都可以接受一个比较器作为参数,用于如何计算最大值或最小值

    package com.sjh.test.java8.collectors;
    
    import java.util.Arrays;
    import java.util.Comparator;
    import java.util.List;
    import java.util.stream.Collectors;
    
    public class MaxByMinByTest {
    
        public static void main(String[] args) {
            List<Integer> list = Arrays.asList(30,10,20,35);
            //Get Max
            list.stream().collect(Collectors.maxBy(new MaxByMinByTest().new IntegerComp()))
                    .ifPresent(i->System.out.println(i));
            //Get Min
            list.stream().collect(Collectors.minBy(new MaxByMinByTest().new IntegerComp()))
                    .ifPresent(i->System.out.println(i));
        }
        class IntegerComp implements Comparator<Integer> {
            @Override
            public int compare(Integer i1, Integer i2) {
                if(i1 >=i2 ){
                    return 1;
                }else{
                    return -1;
                }
            }
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.MaxByMinByTest
    35
    10
    
    Process finished with exit code 0
    

    8、 Collectors.summingInt()

    Collectors.summingInt() 方法将流中的所有元素视为 int 类型,并计算所有元素的总和 ( sum )

    package com.sjh.test.java8.collectors;
    
    import java.util.Arrays;
    import java.util.List;
    import java.util.stream.Collectors;
    
    public class SummingIntTest {
    
        public static void main(String[] args) {
            List<Integer> list = Arrays.asList(30,10,20,35);
            int result = list.stream().collect(Collectors.summingInt(i->i));
            System.out.println(result);
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.SummingIntTest
    95
    
    Process finished with exit code 0 
    

    9、 Collectors.summingLong()

    Collectors.summingLong() 将流中的所有元素视为 long 类型,并计算所有元素的总和

    package com.sjh.test.java8.collectors;
    
    import java.util.ArrayList;
    import java.util.List;
    import java.util.stream.Collectors;
    
    public class SummingLongTest {
    
        public static void main(String[] args) {
            List<Long> list = new ArrayList<>();
            list.add((long)340);
            list.add((long)240);
            list.add((long)360);
            long result = list.stream().collect(Collectors.summingLong(l->l));
            System.out.println(result);
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.SummingLongTest
    940
    
    Process finished with exit code 0
    

    10、 Collectors.summingDouble()

    Collectors.summingDouble() 将流中的所有元素视为 double 类型,并计算所有元素的总和

    package com.sjh.test.java8.collectors;
    
    import java.util.Arrays;
    import java.util.List;
    import java.util.stream.Collectors;
    
    public class SummingDoubleTest {
    
        public static void main(String[] args) {
            List<Double> list = Arrays.asList(340.5,234.56,672.76);
            Double result = list.stream().collect(Collectors.summingDouble(d->d));
            System.out.println(result);
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.SummingDoubleTest
    1247.82
    
    Process finished with exit code 0
    

    summingInt()、summingLong()、summingDouble()这三个函数的结果的类型,就是它们如何看待元素的类型。

    11、 Collectors.toList()

    Collectors.toList() 将流中的所有元素导出到一个列表 ( List ) 中

    package com.sjh.test.java8.collectors;
    
    import java.util.List;
    import java.util.stream.Collectors;
    import java.util.stream.Stream;
    
    public class ToListTest {
    
        public static void main(String[] args) {
            List<String> list = Stream.of("AA","BB","CC").collect(Collectors.toList());
            list.forEach(s->System.out.println(s));
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.ToListTest
    AA
    BB
    CC
    
    Process finished with exit code 0
    

    12、 Collectors.toSet()

    Collectors.toSet() 把流中的所有元素导出到一个集合 ( Set ) 中,并排除重复的元素 ( Set 的特性 )

    package com.sjh.test.java8.collectors;
    
    import java.util.Set;
    import java.util.stream.Collectors;
    import java.util.stream.Stream;
    
    public class ToSetTest {
    
        public static void main(String[] args) {
            Set<String> set = Stream.of("AA","AA","BB").collect(Collectors.toSet());
            set.forEach(s->System.out.println(s));
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.ToSetTest
    AA
    BB
    
    Process finished with exit code 0
    

    13、 Collectors.toMap()

    Collectors.toMap() 将流中的所有元素导出到一个哈希表 ( Map ) 中。该方法接受两个参数,第一个参数用于生成键 ( key ) ,第二个参数用于生成值 ( value )。两个参数都是 Lambda 表达式。

    package com.sjh.test.java8.collectors;
    
    import java.util.Map;
    import java.util.stream.Collectors;
    import java.util.stream.Stream;
    
    public class ToMapTest {
    
        public static void main(String[] args) {
            Map<String,String> map = Stream.of("AA","BB","CC").collect(Collectors.toMap(k->k, v->v+v));
            map.forEach((k,v)->System.out.println("key:"+k +" value:"+v));
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.ToMapTest
    key:CC value:CCCC
    key:BB value:BBBB
    key:AA value:AAAA
    
    Process finished with exit code 0
    

    14、 Collectors.mapping()

    Collectors.mapping() 一般用于多重 map and reduce 中。Java 文档中描述的原型如下:

    mapping(Function<? super T,? extends U> mapper, Collector<? super U,A,R> downstream)
    

    第一个参数用于 map ,第二个参数用于 reduce

    package com.sjh.test.java8.collectors;
    
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Map;
    import java.util.stream.Collectors;
    
    public class MappingTest {
    
        public static void main(String[] args) {
            List<Person> list = Person.getList();
            Map<Integer, String> nameByAge
                    = list.stream().collect(Collectors.groupingBy(Person::getAge,
                    Collectors.mapping(Person::getName, Collectors.joining(","))));
            nameByAge.forEach((k,v)->System.out.println("Age:"+k +" Persons: "+v));
        }
    }
    class Person {
        private String name;
        private int age;
        public Person(String name, int age) {
            this.name = name;
            this.age = age;
        }
        public String getName() {
            return name;
        }
        public int getAge() {
            return age;
        }
        public static List<Person> getList() {
            List<Person> list = new ArrayList<>();
            list.add(new Person("JayLa", 30));
            list.add(new Person("LayMan", 20));
            list.add(new Person("Tom", 20));
            list.add(new Person("XinYi", 30));
            return list;
        }
    }
    

    运行结果:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/...com.sjh.test.java8.collectors.MappingTest
    Age:20  Persons: LayMan,Tom
    Age:30  Persons: JayLa,XinYi
    
    Process finished with exit code 0
    

    我是二哥(Jayla),每天总结一点点,每天进步一点点。
    我是二哥(Jayla),欢迎大家关注我的公众号:
    每天总结一点点,每天进步一点点。
    专注Java相关知识,每天准时分享干货。 SpringBoot/Oracle/Git/Linux/Mysql 期待您的加入~
    在这里插入图片描述

    展开全文
  • apr-1.4.8.tar.gz 与 apr-util-1.5.4.tar.gz
  • asm-util-2.2.2.jar

    热门讨论 2011-11-19 01:30:54
    asm-util-2.2.2.jar asm-util-2.2.2.jar asm-util-2.2.2.jar asm-util-2.2.2.jar asm-util-2.2.2.jar asm-util-2.2.2.jar
  • at java.util.regex.Pattern$CharProperty.match(Pattern.java:3776) at java.util.regex.Pattern$Curly.match0(Pattern.java:4260) at java.util.regex.Pattern$Curly.match(Pattern.java:4234) at java.util....

    先贴出异常

    服务器的CPU使用率一直保持在10%左右,最近突然激增,没有下降的趋势,而且重启后依然攀升,至死方休O/\O,查看进程

    是java进程跑死的,只能找java进程下哪些线程高cpu使用率

    问题线程已经找到

    USER     %CPU PRI SCNT WCHAN  USER SYSTEM    TID     TIME
    [root@27a2a017-029b-48d8-bee2-255610ec9649 ~]# ps -mp 190180 -o THREAD,tid,time|uniq -c|sort -nr
          1 USER     %CPU PRI SCNT WCHAN  USER SYSTEM    TID     TIME
          1 admin    83.8  19    - -         -      - 231456 1-00:42:04
          1 admin    82.4  19    - -         -      - 390319 16:22:37
          1 admin    62.3   -    - -         -      -      - 11-02:21:35
          1 admin    44.3  19    - -         -      - 390320 08:48:52
          1 admin     3.4  19    - futex_    -      -  60245 00:00:34
          1 admin     2.8  19    - futex_    -      -  60243 00:00:28
          1 admin     2.7  19    - futex_    -      -  50481 00:01:25
          1 admin     2.6  19    - futex_    -      -  57651 00:00:42
          1 admin     2.5  19    - futex_    -      -  61324 00:00:19
          1 admin    25.0  19    - -         -      -  63595 3-17:04:59
          1 admin     2.3  19    - futex_    -      -  61321 00:00:18
          1 admin     2.3  19    - futex_    -      -  60244 00:00:24
          1 admin     2.3  19    - futex_    -      -  45505 00:01:38
          1 admin     2.2  19    - futex_    -      -  57650 00:00:35
          1 admin     1.8  19    - futex_    -      -  61327 00:00:14
          1 admin     1.8  19    - futex_    -      -  61320 00:00:14
          1 admin     1.5  19    - -         -      -  60189 00:00:15

    找线程的堆栈信息(TID记得转16进制:390319=>5f4af)

    [admin@27a2a017-029b-48d8-bee2-255610ec9649 ~]jstack 190180 |grep 5f4af -A 500
    "JSF-BZ-22000-99-T-1114" #45190 daemon prio=5 os_prio=0 tid=0x00007fd36400f800 nid=0x5f4af runnable [0x00007fd35ccd2000]
       java.lang.Thread.State: RUNNABLE
            at java.util.regex.Pattern$5.isSatisfiedBy(Pattern.java:5251)
            at java.util.regex.Pattern$5.isSatisfiedBy(Pattern.java:5251)
            at java.util.regex.Pattern$5.isSatisfiedBy(Pattern.java:5251)
            at java.util.regex.Pattern$5.isSatisfiedBy(Pattern.java:5251)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3776)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4260)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.matchInit(Pattern.java:4804)
            at java.util.regex.Pattern$Prolog.match(Pattern.java:4741)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupCurly.match0(Pattern.java:4485)
            at java.util.regex.Pattern$GroupCurly.match(Pattern.java:4405)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4794)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Loop.matchInit(Pattern.java:4801)
            at java.util.regex.Pattern$Prolog.match(Pattern.java:4741)
            at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
            at java.util.regex.Pattern$BranchConn.match(Pattern.java:4568)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3798)
            at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3798)
            at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3798)
            at java.util.regex.Pattern$Curly.match0(Pattern.java:4247)
            at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
            at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3798)
            at java.util.regex.Pattern$Branch.match(Pattern.java:4604)
            at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
            at java.util.regex.Pattern$Begin.match(Pattern.java:3525)
            at java.util.regex.Matcher.match(Matcher.java:1270)
            at java.util.regex.Matcher.matches(Matcher.java:604)
            at com.jd.union.open.gateway.common.util.RegexUtils.verifyUrl(RegexUtils.java:14)
            at com.jd.union.open.gateway.service.api.goods.GoodsServiceImpl.queryLinkGoods(GoodsServiceImpl.java:664)
            at com.jd.union.open.gateway.service.api.goods.GoodsServiceImpl$$FastClassBySpringCGLIB$$1f88f92c.invoke(<generated>)
            at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
            at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
            at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
            at com.jd.union.open.gateway.common.aop.JOpenAspect.execJOpenAspect(JOpenAspect.java:188)
            at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:497)
            at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
            at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
            at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
            at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
            at com.jd.ump.annotation.JAnnotation.execJAnnotation(JAnnotation.java:105)
            at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:497)
            at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
            at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
            at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
            at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
            at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
            at com.jd.union.open.gateway.service.api.goods.GoodsServiceImpl$$EnhancerBySpringCGLIB$$9bc334b3.queryLinkGoods(<generated>)
            at sun.reflect.GeneratedMethodAccessor346.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:497)
            at com.jd.jsf.gd.filter.ProviderInvokeFilter.reflectInvoke(ProviderInvokeFilter.java:140)
            at com.jd.jsf.gd.filter.ProviderInvokeFilter.invoke(ProviderInvokeFilter.java:100)
            at com.jd.union.open.gateway.common.filter.GatewayFilter.invoke(GatewayFilter.java:20)
            at com.jd.jsf.gd.filter.ProviderConcurrentsFilter.invoke(ProviderConcurrentsFilter.java:62)
            at com.jd.jsf.gd.filter.ProviderTimeoutFilter.invoke(ProviderTimeoutFilter.java:39)
            at com.jd.jsf.gd.filter.ProviderMethodCheckFilter.invoke(ProviderMethodCheckFilter.java:78)
            at com.jd.jsf.gd.filter.ProviderInvokeLimitFilter.invoke(ProviderInvokeLimitFilter.java:54)
            at com.jd.jsf.gd.filter.ProviderHttpGWFilter.invoke(ProviderHttpGWFilter.java:47)
            at com.jd.jsf.gd.filter.ProviderGenericFilter.invoke(ProviderGenericFilter.java:99)
            at com.jd.jsf.gd.filter.ProviderContextFilter.invoke(ProviderContextFilter.java:73)
            at com.jd.jsf.gd.filter.ExceptionFilter.invoke(ExceptionFilter.java:49)
            at com.jd.jsf.gd.filter.SystemTimeCheckFilter.invoke(SystemTimeCheckFilter.java:79)
            at com.jd.jsf.gd.filter.FilterChain.invoke(FilterChain.java:275)
            at com.jd.jsf.gd.server.ProviderProxyInvoker.invoke(ProviderProxyInvoker.java:67)
            at com.jd.jsf.gd.server.JSFTask.doRun(JSFTask.java:123)
            at com.jd.jsf.gd.server.BaseTask.run(BaseTask.java:27)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at java.lang.Thread.run(Thread.java:745)

    问题已经很明确,是代码的问题(通过以上方式可以解决各种问题),正则表达式校验的重复执行导致高CPU。

    正则如下:

    private static final Pattern PATTERN_URL = Pattern.compile( "^([hH][tT]{2}[pP]:/*|[hH][tT]{2}[pP][sS]:/*|[fF][tT][pP]:/*)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\\/])+(\\?{0,1}(([A-Za-z0-9-~]+\\={0,1})([A-Za-z0-9-~]*)\\&{0,1})*)$");

    导致问题的数据

    https://coupon.m.watereasy.com/coupons/show.action?key=aec58667c0c14d7bae24vbb73b83efcv&amp;roleId=278889568&amp;mall.watereasy.com/index-5935345.html\n\n100-50香蕉

     

    正则修改完毕(网上的url正则或多或少都有问题,还是根据自身业务按需设置,又是中文造成的问题)

    private static final Pattern PATTERN_URL= Pattern.compile( "^(([hH][tT]{2}[pP]|[hH][tT]{2}[pP][sS])://)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\\/])+([\\w./?%&=\\u4e00-\\u9fa5]+)$");

     

    这个表达式99.99%执行时是没有问题的,但总有一个线程以某种方式“逃离”整个服务器,必须手动杀死它(否则最终导致堆栈溢出)

    问题的根源在于:此正则表达式具有经典:/ ^(A *)* $/形式,请注意,仅当模式与目标字符串不匹配时才会发生此失控行为。

    失控模式:^(A*|B*|C*|D*)*$有几个方式可以解决它:

    •  ^(A|B|C|D)*$  –  从组中的四个备选项中的每一个中删除星号(“零或更多”量词)。
    •  ^(A*+|B*+|C*+|D*+)*$ – 使每个替代星号量词占有(即将每个*改为*)。
    •  ^(?>A*|B*|C*|D*)*$ – 使包含替代原子的组成为原子。

    第二个应该比第一个执行得快一点,但这三个都将解决“正则表达式疯狂”的问题。 (最好不用正则表达式解析HTML)

    对于我来说,只能以简化的表达式修改此问题。

    此问题的更多解决方式:

    https://stackoverflow.com/questions/19990609/regex-gone-wild-java-util-regex-pattern-matcher-goes-into-high-cpu-loop

    《さくら》 、《さくら ~あなたに出会えてよかった~》 、《桜ひらり》

    展开全文
  • Md5Util.java

    热门讨论 2012-05-25 14:21:08
    Md5Util.java
  • Jackson JSON框架的Util化封装

    热门讨论 2012-12-04 20:38:21
    《让Jackson JSON生成的数据包含的中文以unicode方式编码》一文的配套代码。文章地址:http://blog.csdn.net/chaijunkun/article/details/8257209
  • at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.gradle.internal....
  • 概述 步骤 声明命名空间和schema 配置Bean 配置一个Map 配置一个Set 配置一个List 配置一个Properties ...在spring的配置文件中util命名空间类似于java.util包类对应,util命名空间提供了集合相关的配置,在使用
  • 在WALT里面,一个task的util大小,涉及到下面几个参数: WALT窗口大小 cpu当前频率和cpu最高频率 task在一个窗口实际运行时间 task demand获取机制(比如最近窗口的数值,前五个窗口的最大数值等等) 在...
  • java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/travel]] at java.util....
  • java.util.concurrent.ExecutionException:报错解决 报错内容 严重: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start ...
  • 在计算cpu的util(函数sugov_get_util)期间需要使用margin来补偿util(在看schedutil governor的时候,不仅仅有cpu 的util margin,还有freq margin),得到最终的util+=margin 那么这个margin怎么计算的呢? sugov...
  • asm-util-3.2.pom

    2021-01-10 14:20:11
    asm-util-3.2.pomasm-util-3.2.pomasm-util-3.2.pomasm-util-3.2.pomasm-util-3.2.pomasm-util-3.2.pomasm-util-3.2.pomasm-util-3.2.pomasm-util-3.2.pomasm-util-3.2.pom
  • SpringUtil 工具类

    千次阅读 2019-04-12 10:33:27
    LibreOfficeUtils libreOfficeUtils = SpringUtil.getBean("libreOfficeUtils"); libreOfficeUtils.fileConverter2(newAttachmentId); } /** * 文档转换 * @param newAttachmentId 附件id * @throws ...
  • jetty-util-6.1.5.jar

    热门讨论 2010-07-27 09:56:28
    jetty-util-6.1.5.jar
  • 我将jsp处理xml必须的两个库...Jul 17, 2020 4:48:18 PM org.apache.tomcat.util.scan.StandardJarScanner processURLs WARNING: Failed to scan [file:/C:/MyApp/apache-tomcat-9.0.29/lib/serializer.jar] from cl

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 2,405,315
精华内容 962,126
关键字:

util