is there any error in kylin.log?

2017-01-18 15:36 GMT+08:00 雨日听风 <[email protected]>:

> String deleteUrl = "http://192.168.35.2:7070/kylin/api/cubes/F_CUBE/segs/
> 20170113000000_20170114000000";
> Map<String,Object> map = new HashMap<String,Object>();
> map.put("username", "ADMIN");
> map.put("password", "KYLIN");
> //still not work as
> //map.put("Authorization", "Basic QURNSU46S1lMSU4=");
> doDelete(deleteUrl,map);
> _________
>  public static void doDelete(String urlStr,Map<String,Object> paramMap)
> throws Exception{
>         String paramStr = prepareParam(paramMap);
>         if(paramStr == null || paramStr.trim().length()<1){
>
>         }else{
>             urlStr +="?"+paramStr;
>         }
>         System.out.println(urlStr);
>         URL url = new URL(urlStr);
>         HttpURLConnection conn = (HttpURLConnection)url.openConnection();
>         conn.setDoOutput(true);
>         conn.setRequestMethod("DELETE");
>         if(conn.getResponseCode() ==200){
>             System.out.println("成功");
>         }else{
>             System.out.println(conn.getResponseCode());// always print
> 505 or 401
>         }
>     }
>
>
>



-- 
Best regards,

Shaofeng Shi 史少锋

Reply via email to