- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 presto-jdbc开发
presto-jdbc开发,可以用prestodb的包,也可以用prestosql的包,都可以连接的。用prestosql的如下: import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; public class Table
2020-09-22 16:08:52
861
原创 hive-jdbc操作表
hadoop版本2.7.2,hive版本1.2,首先开启hivejdbc服务,创建的是orc类型表。 代码为: import java.sql.*; /** [admin@linux01 bin]$ ./hiveserver2 开启这个服务 20200921 */ public class TableOrc { private static String driveName = “org.apache.hive.jdbc.HiveDriver”; private static Connection c
2020-09-21 11:35:32
243
原创 通过httpfs的rest接口,在hdfs文件系统创建文件夹
通过httpfs的rest接口,在hdfs文件系统创建文件夹,基于httpclient5.0实现。 /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed w
2020-09-18 10:40:36
457
原创 通过httpfs的rest接口,远程删除文件
pom.xml可以参考我的其他文件设置。 代码如下: import java.io.IOException; import org.apache.hc.client5.http.ClientProtocolException; import org.apache.hc.client5.http.classic.methods.HttpDelete; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.a
2020-09-18 10:36:01
382
原创 通过yarn的rest接口获取文件信息或者任务app的日志信息
通过yarn的rest接口获取文件信息或者任务app的日志信息,即可以打开查看文件内容,也可以查看应用日志返回json格式。 /* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
2020-09-18 10:31:18
1737
原创 通过httpfs的rest接口上传文件到hdfs文件系统
通过yarn的rest接口上传文件到hdfs文件系统,基于httpclient 5.0 import java.io.File; import org.apache.hc.client5.http.classic.methods.HttpPut; import org.apache.hc.client5.http.entity.mime.FileBody; import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder; import
2020-09-18 10:28:14
887
原创 通过yarn的rest接口杀死正在运行的任务,基于httpclient4.5
通过yarn的rest接口杀死正在运行的任务,基于httpclient4.5。 curl命令为: curl -X PUT -d ‘{“state”:“KILLED”}’ -H ‘Content-Type: application/json’ http://linux01:8088/ws/v1/cluster/apps/application_1600303805098_0001/state 代码为: import net.sf.json.JSONObject; import org.apache.http.
2020-09-18 10:23:07
1355
原创 通过yarn的rest接口杀死正在运行的任务,基于httpclient5.0
通过yarn的rest接口杀死正在运行的任务,基于httpclient5.0 import java.io.File; import java.io.IOException; import java.net.URISyntaxException; import org.apache.hc.client5.http.ClientProtocolException; import org.apache.hc.client5.http.classic.methods.HttpPut; import org.apa
2020-09-18 10:12:52
743
遍历hfds列出所有空目录和文件及大小.rar
2020-08-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人