Исключения из циркулярных ссылок при беге в Spark Scala - PullRequest
0 голосов
/ 04 апреля 2019

Я запускаю программу в spark scala и использую библиотеку java для обработки данных, я получаю исключение циклических ссылок, но во время компиляции не получаю исключение даже после использования ациклической библиотеки

Исключение в потоке "main" java.lang.UnsupportedOperationException: не может иметь циклические ссылки в классе, но получил циклическую ссылку на класс org.det.pia.service.AnalysisCollection в org.apache.spark.sql.catalyst.ScalaReflection $. $ anonfun $ serializerFor $ 1 (ScalaReflection.scala: 628) в scala.reflect.internal.tpe.TypeConstraints $ UndoLog.undo (TypeConstraints.scala: 68) в org.apache.spark.sql.catalyst.ScalaReflection.cleanUpReflectionObjects (ScalaReflection.scala: 906) в org.ap.spark.sql.catalyst.ScalaReflection.ScalaReflection $ .serializerFor (ScalaReflection.scala: 452) на сайте org.apache.spark.sql.catalyst.ScalaReflection $. $ anonfun $ serializerFor $ 6 (ScalaReflection.scala: 644) в scala.collection.TraversableLike. $ anonfun $ flatMap $ 1 (TraversableLike.scala: 244) в scala.collection.immutable.List.foreach (List.scala: 392)

scala 


case class FileList( val id: Long, val name: String, val fileName: String, val format: String,
                       val analysisCollection: AnalysisCollection, val analysisProtocolCollection: AnalysisProtocolCollection )

  case class Inputs(val sourceFile:List[SourceFile],val searchDatabase:List[SearchDatabase],val spectraData:List[SpectraData])

  case class AnalysisSoftwareList(val analysisSoftware: List[AnalysisSoftware])

  case class PeptideSpectrumMatch(val id: Long, val charge: Int, val massToCharge: Double,
                                  val deltaMass: Double, val retentionTime: Double, val sequence: String,
                                  val missed: Int, val sourceID: String, val spectrumTitle: String, val pFile: PIAInputFile,
                                  val spectrumID: SpectrumIdentification, val isUnique: Boolean = false,
                                  val isDecoy: Boolean = false, val scores: List[ScoreModel],
                                  val modifications: TreeMap[Integer, Modification], val paramList: List[AbstractParam],
                                  val modificationString: String, val peptideStringID: String, val modificationChanged: Boolean = false,
                                  val identificationKeys: Map[String, String], val peptide: Peptide)

  case class Accession(val id: Long, val accessionStr: String, val files: Set[Long], val descriptions: Map[Long, String],
                       val dbSequence: String, val searchDatabaseRefs: Set[String], val pGroup: Group)

  case class Peptide(val id: Long, val sequence: String, val spectra: List[PeptideSpectrumMatch],
                     val pGroup: Group, val occurrences: HashSet[AccessionOccurrence])

  case class Group(val id: Long, val treeID: Long, val peptides: Map[String, Peptide], val children: TreeMap[Long, Group],
                   val parents: TreeMap[Long, Group],val accessions: Map[String, Accession],
                   val allAccessions: Map[String, Accession])


  case class PiaMergedData(val _date :String,val _name:String, val _ns2:String, val _ns3:String, val filesList: FileList,
                           val inputs: Inputs, val analysisSoftwareList: AnalysisSoftwareList,
                           val spectraList: List[PeptideSpectrumMatch], val accessionsList: List[Accession],
                           val peptidesList: List[Peptide], val groupsList: List[Group]
                          )

  case class AnalysisSoftware(var contactRole: ContactRole, val softwareName:Param, val customizations: String,
                              val version: String,val uri: String)

  case class AnalysisCollection(val spectrumIdentification: List[SpectrumIdentification],
   val proteinDetection: ProteinDetection)

  case class SpectrumIdentification( val inputSpectra: List[InputSpectra], val searchDatabaseRef: List[SearchDatabaseRef],
                                     val spectrumIdentificationProtocolRef: String , val spectrumIdentificationListRef: String,
                                     val spectrumIdentificationList: SpectrumIdentificationList,
                                     val spectrumIdentificationProtocol: SpectrumIdentificationProtocol
  )

  case class InputSpectra(val spectraDataRef: String, val spectraData: SpectraData)

  case class SpectraData(val spectrumIDFormat:SpectrumIDFormat)

  case class SpectrumIDFormat(val cvParam:CvParam)

  case class CvParam(val cvRef: String, val accession: String,val cv: Cv)

  case class Cv(val fullName: String, val version: String, val uri: String, val id: String)

  case class SearchDatabaseRef(val searchDatabaseRef: String, val searchDatabase: SearchDatabase)

  case class SearchDatabase()

  case class SpectrumIdentificationList(val fragmentationTable: FragmentationTable, val spectrumIdentificationResult: List[SpectrumIdentificationResult],
                                        val paramGroup: List[AbstractParam], val numSequencesSearched: Long)

  case class FragmentationTable(val measure: List[Measure])

  case class Measure(val cvParam: List[CvParam])

  case class SpectrumIdentificationResult(val spectrumIdentificationItem: List[SpectrumIdentificationItem],
  val paramGroup: List[AbstractParam], val spectrumID: String, val spectraDataRef: String, val spectraData: SpectraData)

  case class SpectrumIdentificationItem(val peptideEvidenceRef: List[PeptideEvidenceRef], val fragmentation: Fragmentation,
                                       val paramGroup: List[AbstractParam], val chargeState: Int, val experimentalMassToCharge: Double,
                                      val calculatedMassToCharge: Double, val calculatedPI: Float, val peptideRef: String,
                                      val rank: Int, val passThreshold: Boolean = false, val massTableRef: String,
                                      val sampleRef: String, val peptide: Peptide, val massTable: MassTable, val sample: Sample )

  case class PeptideEvidenceRef(val peptideEvidenceRef: String,
  val peptideEvidence: PeptideEvidence)

  case class PeptideEvidence( val paramGroup: List[AbstractParam] , val dbSequenceRef: String ,
                              val peptideRef: String , val start: Integer , val end: Integer ,
  val pre: String , val post: String , val translationTableRef: String , val frame: Integer , val isDecoy: Boolean = false,
  val dbSequence: DBSequence , val peptide: Peptide , val translationTable: TranslationTable )

  case class AbstractParam(val name: String, val value: String, val unitAccession: String, val unitName: String, val unitCvRef: String, val unitCv: Cv)

  case class DBSequence( val paramGroup: List[AbstractParam], val length: Integer,
                         val searchDatabaseRef: String, val accession:String , val searchDatabase: SearchDatabase )

  case class PIAInputFile(val id: Long, val name: String, val fileName: String,
                          val format: String, val analysisCollection: AnalysisCollection, val analysisProtocolCollection: AnalysisProtocolCollection)

  case class AnalysisProtocolCollection(val spectrumIdentificationProtocol: List[SpectrumIdentificationProtocol],
  val proteinDetectionProtocol: ProteinDetectionProtocol
                                       )

  case class ProteinDetection(val inputSpectrumIdentifications: List[InputSpectrumIdentifications],
  val proteinDetectionListRef: String, val proteinDetectionProtocolRef: String, val proteinDetectionList: ProteinDetectionList,
                              val proteinDetectionProtocol: ProteinDetectionProtocol)
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...