Skip to content

Commit

Permalink
Merge pull request #268 from dafreels/develop
Browse files Browse the repository at this point in the history
Fixed a dependency with BigQuery Connector
  • Loading branch information
dafreels authored Oct 28, 2021
2 parents 6be51c2 + 6f18727 commit 9eb6a76
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
5 changes: 0 additions & 5 deletions metalus-gcp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@
<artifactId>google-cloud-datastore</artifactId>
<version>1.104.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud.spark</groupId>
<artifactId>spark-bigquery-with-dependencies_${scala.compat.version}</artifactId>
<version>0.21.1</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions metalus-gcp/src/main/resources/dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"artifactId": "metalus-common_${scala.compat.version}-spark_${spark.compat.version}",
"version": "${parent.version}"
},
{
"groupId": "com.google.cloud.spark",
"artifactId": "spark-bigquery-with-dependencies_${scala.compat.version}",
"version": "0.21.1"
},
{
"groupId": "org.apache.spark",
"artifactId": "spark-streaming_${scala.compat.version}",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.acxiom.gcp.fs

import java.io._
import java.net.URI
import java.nio.channels.Channels

import com.acxiom.pipeline.fs.{FileInfo, FileManager}
import com.google.auth.oauth2.GoogleCredentials
import com.google.cloud.storage.{BlobId, BlobInfo, Storage, StorageOptions}
import org.json4s.DefaultFormats
import org.json4s.native.Serialization

import java.io._
import java.net.URI
import java.nio.channels.Channels
import scala.collection.JavaConverters._

object GCSFileManager {
Expand All @@ -22,7 +21,7 @@ object GCSFileManager {
def prepareGCSFilePath(path: String, bucket: Option[String] = None): String = {
if (path.startsWith("/")) {
path.substring(1)
} else if (path.startsWith(s"gs:")) {
} else if (path.startsWith("gs:")) {
new URI(path).normalize().toString
} else {
path
Expand Down

0 comments on commit 9eb6a76

Please sign in to comment.