불꽃의 오류 분석에 실패

오류 분석

스택 정보가 오류 : 단계 오류로 인해 중단 작업 : 단계 2.0 (TID (264), IDC-XX-XX-3-30.d에서 분실 된 작업 1.3 : 작업 1 단계 2.0의 4 배, 가장 최근의 실패를 실패했습니다. xx.com, 집행 2) java.lang.OutOfMemoryError와 : Java 힙 공간

다음과 같은 정보를 얻을 수있는 지시에 따라

  • taskset입니다 작업의 무리, 구성 단계, 작업 번호 1 스테이지 2에서 4 번 실패
  • 집행자가 실제 실행 노드 작업이며, 숫자 집행 (2)는 Java 힙 공간을 발생
  • 실행기 메모리 구성 512M가 구성되지 spark.executor.memoryOverhead가 실행 프로그램은 다음과 같은 메커니즘이있는 경우 할당 된 메모리 양의 최종 계산 불꽃 인
    경우 외부 오프 힙 (힙 메모리 직접 spark.executor.memoryOverhead을 제어하도록 구성되지 않은) 1 GC 후 필요한 때, 사용을 역 직렬화 그냥 같은 디스크에 넣어 객체 직렬화 메모리의 직접적인 관리의 큰 덩어리를 넣어하지 않을 것이다, 외부 힙 메모리는 여기 메소드 영역, 직접 메모리, 가상 머신을 포함 스택 원시 메소드 스택)
    realmem = executorMemory [힙] + ((384)의 최소 0.10 * executorMemory) [OFF 힙]
    2) 배치 spark.executor.memoryOverhead
    realmem = executorMemory [힙] + memoryOverhead [OFF 힙]

readMem 컨테이너보다가, 죽일 직접 될 경우 자바 응용 프로그램 프로세스가 총 메모리, 메모리 용량을 필요로 나타냅니다

오류 유형

  • OutOfMemoryError가 : Java 힙 공간은 힙 메모리 오버 플로우의 부족, 필요가 --executor 메모리를 조정
  • OutOfMemoryError가 : 자바 permgen 공간, 외부 메모리 힙 오버 플로우의 부족, spark.executor.memoryOverhead을 조정해야

예외가 --executor 메모리를 조정, 다음 Java 힙 공간

RDD 위치 외주 내의 MemoryMode 힙 또는 스택에 따라 선택 될 수있다

예외 정보를 볼 수에 로그인

: org.apache.spark.SparkException : 작업이 중단되었습니다.
: org.apache.spark.sql.execution.datasources.FileFormatWriter $$ anonfun $에서 $ 1.apply $ MCV $ 특검팀 (147 FileFormatWriter.scala를) 쓰기
org.apache.spark.sql.execution.datasources.FileFormatWriter $$ anonfun에서 : $ $ 1.apply (121 FileFormatWriter.scala를) 쓰기
: $ 1.apply (121 FileFormatWriter.scala를) 쓰기 org.apache.spark.sql.execution.datasources.FileFormatWriter $$ anonfun $에
org.apache.spark.sql에서. : $ execution.SQLExecution .withNewExecutionId (57 SQLExecution.scala)
: $ org.apache.spark.sql.execution.datasources.FileFormatWriter에 .write에서의 (121 FileFormatWriter.scala)
org.apache.spark.sql.execution.datasources에서. InsertIntoHadoopFsRelationCommand.run (InsertIntoHadoopFsRelationCommand.scala : 101)
: org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult $으로의 lzycompute (58 commands.scala)에서
: org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult (56 commands.scala)에서
조직에 .apache.spark.sql.execution.command.ExecutedCommandExec.doExecute (commands.scala : 74)
: org.apache.spark.sql.execution.SparkPlan $$ anonfun $ AT는 $ 1.apply (114 SparkPlan.scala)을 실행
조직에서 : .apache.spark.sql.execution.SparkPlan $$ anonfun $ $ 1.apply (114 SparkPlan.scala)을 실행
SparkPlan.scala (org.apache.spark.sql.execution.SparkPlan $$ anonfun $하는 executeQuery $ 1.apply에서 : 135)
151) org.apache.spark.rdd.RDDOperationScope $ .withScope (RDDOperationScope.scala에서
org.apache.spark.sql.execution.SparkPlan.executeQuery (SparkPlan.scala에서 132)
: org.apache.spark.sql.execution.SparkPlan.execute (113 SparkPlan.scala)에서
: org.apache.spark.sql.execution.QueryExecution.toRdd $의 lzycompute에서 (92 QueryExecution.scala)
org.apache.spark에서 : .sql.execution.QueryExecution.toRdd (92 QueryExecution.scala)
org.apache.spark.sql.Dataset에서. (Dataset.scala : 185)
: $ org.apache.spark.sql.Dataset .ofRows (64 Dataset.scala)에서
: org.apache.spark.sql.SparkSession.sql에서 (592 SparkSession.scala)
sun.reflect에서 .NativeMethodAccessorImpl.invoke0 (기본 방법)
sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)에서
sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)에서
java.lang.reflect.Method.invoke에서 (방법 된 .java : 498)
py4j.reflection.MethodInvoker.invoke (MethodInvoker.java:244)에서
py4j.reflection.ReflectionEngine.invoke (ReflectionEngine.java:357)에서
py4j.Gateway.invoke (Gateway.java:280 AT)
py4j에서 .commands.AbstractCommand.invokeMethod (AbstractCommand.java:132)
py4j.commands.CallCommand.execute (CallCommand.java:79)에서
py4j.GatewayConnection.run (GatewayConnection.java:214)에서
java.lang.Thread.run에서 (Thread.java:745)
org.apache : 의해 발생. spark.SparkException : 작업으로 인해 무대 장애로 중단 : 단계 2.0에서 작업 1, 가장 최근의 실패 4 번 실패, (단계 2.0에서 TID (264)를 분실 작업 1.3 idc-xx-xx-3-30.d.xx.com, 집행 2) java.lang.OutOfMemoryError와 : Java 힙 공간
org.apache.parquet.hadoop.ParquetFileReader $ ConsecutiveChunkList.readAll (ParquetFileReader.java:778)에서
org.apache.parquet.hadoop.ParquetFileReader.readNextRowGroup에서 (ParquetFileReader.java : 511)
org.apache.spark.sql.execution.datasources.parquet.VectorizedParquetRecordReader.checkEndOfRowGroup (VectorizedParquetRecordReader.java:270)에서
org.apache.spark.sql.execution.datasources.parquet.VectorizedParquetRecordReader.nextBatch에서 (VectorizedParquetRecordReader.java:225)
org.apache.spark.sql.execution.datasources.parquet.VectorizedParquetRecordReader.nextKeyValue (VectorizedParquetRecordReader.java:137)에서
org.apache.spark.sql.execution.datasources.RecordReaderIterator.hasNext (RecordReaderIterator.scala : 39)에서
조직에 .apache.spark.sql.execution.datasources.FileScanRDD $$ 아논 $ 1.hasNext (FileScanRDD.scala 109)
org.apache.spark.sql.execution.datasources.FileScanRDD $$ 아논 $ 1.nextIterator에서 (FileScanRDD.scala : 184)
: org.apache.spark.sql.execution.datasources.FileScanRDD $$ 아논 $ 1.hasNext (109 FileScanRDD.scala)에서
org.apache.spark.sql.catalyst.expressions.GeneratedClass $ GeneratedIterator.scan_nextBatch $에서 (알 소스)
org.apache.spark.sql.catalyst.expressions.GeneratedClass $ GeneratedIterator.processNext (알 수없는 소스)에서
org.apache.spark.sql.execution.BufferedRowIterator.hasNext에서 (BufferedRowIterator.java:43)
org.apache.spark에서. sql.execution.WholeStageCodegenExec $$ anonfun $ (8) $$ 곧 $ 1.hasNext (WholeStageCodegenExec.scala : 377)
org.apache.spark.sql.execution.columnar.InMemoryRelation에서 $$ anonfun $ (1) $$ 곧 $ 1.hasNext (InMemoryRelation.scala 132)
org.apache.spark.storage.memory.MemoryStore.putIteratorAsValues에서 (MemoryStore.scala : 215)
org.apache.spark.storage.BlockManager $$ anonfun $ doPutIterator $ 1.apply (BlockManager.scala : 1005)에서
org.apache.spark.storage.BlockManager $$ anonfun $ doPutIterator $ 1.apply에서 (BlockManager.scala : 996)
: org.apache.spark.storage.BlockManager.doPut (936 BlockManager.scala)에서
: org.apache.spark.storage.BlockManager.doPutIterator에서 (996 BlockManager.scala)
org.apache.spark.storage.BlockManager.getOrElseUpdate에서 (BlockManager.scala : 700)
org.apache.spark.rdd.RDD.getOrCompute에서 (RDD.scala : 334)
org.apache.spark.rdd.RDD.iterator에서 (RDD.scala : 285)
org.apache에서. spark.rdd.MapPartitionsRDD.compute (MapPartitionsRDD.scala : 38)
org.apache.spark.rdd.RDD.computeOrReadCheckpoint에서 (RDD.scala : 323)
: org.apache.spark.rdd.RDD.iterator (287 RDD.scala) 내지
: org.apache.spark.rdd.MapPartitionsRDD.compute 행 (38 MapPartitionsRDD.scala)
org.apache.spark.rdd.RDD.computeOrReadCheckpoint 행 (RDD.scala : 323)
: org.apache.spark.rdd.RDD.iterator (287 RDD.scala)에
org.apache.spark.scheduler.ResultTask.runTask 행 (ResultTask.scala : 87)
org.apache한다. : spark.scheduler.Task.run (99 Task.scala)
: $ org.apache.spark.executor.Executor TaskRunner.run (322 Executor.scala)에
java.util.concurrent.ThreadPoolExecutor.runWorker 행 (ThreadPoolExecutor.java : 1142)

예외를 발생시킨 코드

/**
 * @param f file to read the chunks from
 * @return the chunks
 * @throws IOException
 */
public List<Chunk> readAll(FSDataInputStream f) throws IOException {
  List<Chunk> result = new ArrayList<Chunk>(chunks.size());
  f.seek(offset);
  byte[] chunksBytes = new byte[length];   //778行,分配长为length的byte[]时没有足够的可用内存导致heap space
  f.readFully(chunksBytes);
  // report in a counter the data we just scanned
  BenchmarkCounter.incrementBytesRead(length);
  int currentChunkOffset = 0;
  for (int i = 0; i < chunks.size(); i++) {
    ChunkDescriptor descriptor = chunks.get(i);
    if (i < chunks.size() - 1) {
      result.add(new Chunk(descriptor, chunksBytes, currentChunkOffset));
    } else {
      // because of a bug, the last chunk might be larger than descriptor.size
      result.add(new WorkaroundChunk(descriptor, chunksBytes, currentChunkOffset, f));
    }
    currentChunkOffset += descriptor.size;
  }
  return result ;
}

추천

출처www.cnblogs.com/windliu/p/10941848.html