Skip to content

Commit

Permalink
PR comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
flakrimjusufi committed May 4, 2021
1 parent 42f87c9 commit a9be711
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,17 @@ & checkPropertyIsSet(collector, clientSecret, CLIENT_SECRET, CLIENT_SECRET_LABEL
}

private boolean validateServiceAccount(FailureCollector collector) {
if (isServiceAccountFilePath() != null && isServiceAccountFilePath()) {
final Boolean serviceAccountFilePath = isServiceAccountFilePath();
final Boolean serviceAccountJson = isServiceAccountJson();

if (serviceAccountFilePath != null && serviceAccountFilePath) {
if (!AUTO_DETECT_VALUE.equals(accountFilePath) && !new File(accountFilePath).exists()) {
collector.addFailure("Service Account File Path is not available.",
"Please provide path to existing Service Account file.")
.withConfigProperty(ACCOUNT_FILE_PATH);
}
}
if (isServiceAccountJson() != null && isServiceAccountJson()) {
if (serviceAccountJson != null && serviceAccountJson) {
if (!Optional.ofNullable(getServiceAccountJson()).isPresent()) {
collector.addFailure("Service Account JSON can not be empty.",
"Please provide Service Account JSON.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected Credential getCredentials() throws IOException {
}

protected List<String> getRequiredScopes() {
return Collections.singletonList(DriveScopes.DRIVE);
return Collections.singletonList(DriveScopes.DRIVE_READONLY);
}

public void checkRootFolder() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

import com.github.rholder.retry.RetryException;
import com.google.api.services.drive.model.File;
import com.google.gson.JsonObject;
import io.cdap.cdap.api.data.batch.Input;
import io.cdap.plugin.common.SourceInputFormatProvider;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.mapreduce.InputFormat;
import org.apache.hadoop.mapreduce.InputSplit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* Util class for building pipeline schema.
*/
public class SchemaBuilder {
public static final String SCHEMA_ROOT_RECORD_NAME = "etlSchemaBody";
public static final String SCHEMA_ROOT_RECORD_NAME = "FileFromFolder";

public static final String IMAGE_METADATA_FIELD_NAME = "imageMediaMetadata";
public static final String VIDEO_METADATA_FIELD_NAME = "videoMediaMetadata";
Expand Down

0 comments on commit a9be711

Please sign in to comment.