BufferedWriter를 사용하여 파일에 내용을 쓰고 있습니다. [사실 파일은 HDFS입니다. 나는 감속기를 쓰고 있어요] 난의 BufferedWriter를 만드는 오전 방법BufferedWriter로 인해 메모리 Exceed 예외가 발생합니다.
FileSystem fs = FileSystem.get(new Configuration());
Path path = new Path("temp.txt");
OutputStream os = fs.create(path);
bufferedWriter = new BufferedWriter(new OutputStreamWriter(os));
이 인 감속기의 [설정 방법]
쓰기 부분을 의 감소 방법 :...
try {
bufferedWriter.write(dt+ExporterConstants.MAP_OUTPUT_KEY_SEPERATOR+hdfsPath+ExporterConstants.MAP_OUTPUT_KEY_SEPERATOR+inputSplit+"\n");
} catch (IOException e1) {
e1.printStackTrace();
}
을 그리고이 방법을 닫습니다 감속기의 청소 방법
내 질문 :
내가 container is running beyond physical memory limits. Current usage: 5.5 GB of 5.5 GB physical memory used; 8.7 GB of 11.5 GB virtual memory used
같은 오류를 얻고있다. 그래서 내가 가정하고있는 것은 모든 데이터를 버퍼링하고 닫는 방법으로 한 번만 플러시하는 것입니다.
문제가 발생 했습니까? 그리고 어떻게 효율적으로 플러시합니까?
다른 작가들도 사용하고 있습니다. 어떤 제안?
@GopsAB 귀하의 의심은 무엇입니까? 나는 그것을 넣는 더 간단한 방법을 생각할 수 없다, 미안하다. –