Проблема с выполнением задания гоблина

Я новичок в Gobblin, и я пытаюсь выполнить простую работу в автономном режиме, но получаю следующую ошибку:

Task failed due to "com.google.gson.JsonSyntaxException:
com.google.gson.stream.MalformedJsonException: Expected name at line 1 
column 72 path $.fields."

Мой файл вакансии:

job.name=MRJob1
job.group=MapReduce
job.description=A getting started job for MapReduce
source.class=gobblin.source.extractor.filebased.TextFileBasedSource
source.filebased.downloader.class=gobblin.source.extractor.filebased.CsvFileDownloader
converter.classes=gobblin.converter.csv.CsvToJsonConverterV2,gobblin.converter.avro.JsonIntermediateToAvroConverter
writer.builder.class=gobblin.writer.AvroDataWriterBuilder
source.filebased.fs.uri=file:///
source.filebased.data.directory=/home/sahil97/Downloads/gobblin-dist/CsvSource/
source.schema=[{"ColumnName":"FIRST_NAME","comment": "","isNullable": "true","dataType":{"type":"string"}}{"ColumnName":"LAST_NAME","comment": "","isNullable": "true","dataType":{"type":"string"}},{"ColumnName":"GENDER","comment": "","isNullable": "true","dataType":{"type":"string"}},{"ColumnName":"AGE","comment": "","isNullable": "true","dataType":{"type":"int"}}]
source.skip.first.record=true
source.csv_file.delimiter=,
converter.csv.to.json.delimiter=,
extract.table.type=append_only
extract.table.name=CsvToAvro
extract.namespace=MapReduce
converter.classes=gobblin.converter.csv.CsvToJsonConverterV2,gobblin.converter.avro.JsonIntermediateToAvroConverter
writer.destination.type=HDFS
writer.output.format=AVRO
data.publisher.type=gobblin.publisher.BaseDataPublisher

Мой файл CSV: Repo.txt

FIRST_NAME,LAST_NAME,GENDER,AGE
Sahil,Gaur,Male,22
Sagar,Gaur,Male,21
Dushyant,Saini,Male,23
Devyani,Kaulas,Female,21
Sanchi,Theraja,Female,22
Shreya,Gupta,Female,21
Chirag,Thakur,Male,22
Manish,Sharma,Male,23
Abhishek,Soni,Male,24
Varnita,Sachdeva,Female,22
Deepam,Chaurishi,Male,22

person sahil gaur    schedule 25.06.2018    source источник


Ответы (1)


Если это настоящий json: у вас есть лишняя запятая. Ошибка говорит о том, что у вас плохой синтаксис json. Так что это, наверное, одно из первых мест, куда стоит заглянуть.

{
  "ColumnName": "FIRST_NAME",
  "comment": "",
  "isNullable": "true",
  "dataType": {
    "type": "string"
  }
},                  // Try this comma while defining the json
{
  "ColumnName": "LAST_NAME",
  "comment": "",
  "isNullable": "true",
  "dataType": {
    "type": "string"
  }
},
{
  "ColumnName": "GENDER",
  "comment": "",
  "isNullable": "true",
  "dataType": {
    "type": "string"
  }
},
{
  "ColumnName": "AGE",
  "comment": "",
  "isNullable": "true",
  "dataType": {
    "type": "int"
  }
}
person Govins    schedule 20.08.2018