Skip to content

Commit

Permalink
reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan King committed Feb 17, 2023
1 parent bc3e16c commit 0604a03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hail/src/main/scala/is/hail/io/fs/FS.scala
Original file line number Diff line number Diff line change
Expand Up @@ -234,18 +234,20 @@ object FS {
): FS = retryTransientErrors {
val (scheme, cloudSpecificFS) = using(new FileInputStream(credentialsPath)) { is =>
val credentialsStr = Some(IOUtils.toString(is, Charset.defaultCharset()))
sys.env.get("HAIL_CLOUD").get match {
case "gcp" =>
sys.env.get("HAIL_CLOUD") match {
case Some("gcp") =>
val requesterPaysConfiguration = flags.flatMap { flags =>
RequesterPaysConfiguration.fromFlags(
flags.get("gcs_requester_pays_project"), flags.get("gcs_requester_pays_buckets")
)
}
("gs", new GoogleStorageFS(credentialsStr, requesterPaysConfiguration).asCacheable())
case "azure" =>
case Some("azure") =>
("hail-az", new AzureStorageFS(credentialsStr).asCacheable())
case cloud =>
throw new IllegalArgumentException(s"Bad cloud: $cloud")
case None =>
throw new IllegalArgumentException(s"HAIL_CLOUD must be set.")
}
}

Expand Down
1 change: 1 addition & 0 deletions hail/src/main/scala/is/hail/io/fs/GoogleStorageFS.scala
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ class GoogleStorageFS(
}

override def close(): Unit = {
log.info(f"close: ${filename}")
if (!closed) {
flush()
retryTransientErrors {
Expand Down

0 comments on commit 0604a03

Please sign in to comment.