[ 
https://issues.apache.org/jira/browse/GOBBLIN-899?focusedWorklogId=325224&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-325224
 ]

ASF GitHub Bot logged work on GOBBLIN-899:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/Oct/19 18:05
            Start Date: 08/Oct/19 18:05
    Worklog Time Spent: 10m 
      Work Description: yukuai518 commented on pull request #2753: 
[GOBBLIN-899]Add config in replication config to determine wheter schema cehck 
ena…
URL: https://github.com/apache/incubator-gobblin/pull/2753#discussion_r332652123
 
 

 ##########
 File path: 
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/extractor/FileAwareInputStreamExtractorWithCheckSchema.java
 ##########
 @@ -66,14 +67,19 @@ protected FileAwareInputStream buildStream(FileSystem 
fsFromFile) throws DataRec
    * @throws IOException
    */
   protected boolean schemaChecking(FileSystem fsFromFile) throws IOException {
+    if( 
!this.state.getPropAsBoolean(ReplicationConfiguration.COPY_SCHEMA_CHECK_ENABLED,
 false) ) {
+      return true;
+    }
     DatumReader<GenericRecord> datumReader = new GenericDatumReader<>();
     DataFileReader<GenericRecord> dataFileReader =
         new DataFileReader(new FsInput(this.file.getFileStatus().getPath(), 
new Configuration()), datumReader);
 
 Review comment:
   The overall logic looks good to me. However I don't understand why we would 
assume this.file is an avro file. Should this read schema logic be generic? I'm 
assuming this is an existing logic, so you can leave it for now, but still want 
to point it out.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 325224)
    Time Spent: 40m  (was: 0.5h)

> Add a key in dataset config to disable schema check for a specific dataset
> --------------------------------------------------------------------------
>
>                 Key: GOBBLIN-899
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-899
>             Project: Apache Gobblin
>          Issue Type: Task
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to