用fs.copyToLocalFile( hdfsPath,localPath);下载hdfs的文件会报NullPointerException,具体报错为: java.lang.NullPointerException at java.lang.ProcessBuilder.start(ProcessBuilder.java:) at org.apache.hadoop.util.Shell.runCommand(Shell.java:) at org.apache.hadoop.util.S
@RequestMapping(value = "/export.do") public void exportpushuserByareacode(HttpServletRequest req, HttpServletResponse rsp) throws Exception { List list = .....; String name="导出的文件.csv"; name = new String(name.getBytes("GBK")
excel文件的导入导出是很常见的功能,这次做了个下载的功能,踩了一些坑,记下来避免以后重复踩…… 1.inputstream序列化问题 Could not write JSON document: No serializer found for class java.io.FileDescriptor and no properties discovered to create BeanSerializer 客户端调取服务端上传,从前台获取的file文件中拿到inputstream,做一些判断