• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JohnSnowLabs / spark-nlp / 8054290840

26 Feb 2024 07:11PM CUT coverage: 62.707%. First build
8054290840

Pull #14164

github

web-flow
Merge e9fdbe61f into e805c4308
Pull Request #14164: release/530-release-candidate

8964 of 14295 relevant lines covered (62.71%)

0.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/scala/com/johnsnowlabs/client/azure/AzureClient.scala
1
package com.johnsnowlabs.client.azure
2

3
import com.johnsnowlabs.client.{CloudClient, CloudStorage}
4
import com.johnsnowlabs.util.ConfigHelper
5

6
class AzureClient(parameters: Map[String, String] = Map.empty) extends CloudClient {
7

8
  private lazy val azureStorageConnection = cloudConnect()
9

10
  override protected def cloudConnect(): CloudStorage = {
11
    val storageAccountName = parameters.getOrElse(
×
12
      "storageAccountName",
×
13
      throw new Exception("Azure client requires storageAccountName"))
×
14
    val accountKey =
15
      parameters.getOrElse("accountKey", ConfigHelper.getHadoopAzureConfig(storageAccountName))
×
16
    new AzureGateway(storageAccountName, accountKey)
×
17
  }
18

19
  override def doesBucketPathExist(bucketName: String, filePath: String): Boolean = {
20
    azureStorageConnection.doesBucketPathExist(bucketName, filePath)
×
21
  }
22

23
  override def copyInputStreamToBucket(
24
      bucketName: String,
25
      filePath: String,
26
      sourceFilePath: String): Unit = {
27
    azureStorageConnection.copyInputStreamToBucket(bucketName, filePath, sourceFilePath)
×
28
  }
29

30
  override def downloadFilesFromBucketToDirectory(
31
      bucketName: String,
32
      filePath: String,
33
      directoryPath: String,
34
      isIndex: Boolean): Unit = {
35
    azureStorageConnection.downloadFilesFromBucketToDirectory(
×
36
      bucketName,
37
      filePath,
38
      directoryPath,
39
      isIndex)
40
  }
41

42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc