diff --git a/jet/hadoop/src/main/java/com/hazelcast/samples/jet/hadoop/cloud/AzureCloudStorage.java b/jet/hadoop/src/main/java/com/hazelcast/samples/jet/hadoop/cloud/AzureCloudStorage.java index 2b18496c4..661677981 100644 --- a/jet/hadoop/src/main/java/com/hazelcast/samples/jet/hadoop/cloud/AzureCloudStorage.java +++ b/jet/hadoop/src/main/java/com/hazelcast/samples/jet/hadoop/cloud/AzureCloudStorage.java @@ -21,31 +21,32 @@ import org.apache.hadoop.mapred.JobConf; /** - * Word count example adapted to read from and write to Azure Cloud Storage + * Word count example adapted to read from and write to Azure Data Lake Gen 2 * using HDFS source and sink. *

* The job reads objects from the given container {@link #CONTAINER_NAME} and * writes the word count results to a folder inside that container. *

- * To be able to read from and write to Azure Cloud Storage, HDFS needs {@code + * To be able to read from and write to Azure Data Lake, HDFS needs {@code * hadoop-azure} as dependency and an access key of a Storage Account. * - * @see + * @see * Hadoop Azure Support for more information */ public class AzureCloudStorage { - private static final String ACCESS_KEY = ""; + private static final String ACCOUNT_KEY = ""; private static final String ACCOUNT_NAME = ""; private static final String CONTAINER_NAME = "jet-azure-hdfs-example-container"; public static void main(String[] args) throws Exception { - Path inputPath = new Path("wasbs://" + CONTAINER_NAME + "@" + ACCOUNT_NAME + ".blob.core.windows.net/"); - Path outputPath = new Path("wasbs://" + CONTAINER_NAME + "@" + ACCOUNT_NAME + ".blob.core.windows.net/results"); + Path inputPath = new Path("abfs://" + CONTAINER_NAME + "@" + ACCOUNT_NAME + ".dfs.core.windows.net/"); + Path outputPath = new Path("abfs://" + CONTAINER_NAME + "@" + ACCOUNT_NAME + ".dfs.core.windows.net/results"); JobConf jobConf = new JobConf(); - jobConf.set("fs.azure.account.key." + ACCOUNT_NAME + ".blob.core.windows.net", ACCESS_KEY); + jobConf.set("fs.azure.account.auth.type." + ACCOUNT_NAME + ".dfs.core.windows.net", "SharedKey"); + jobConf.set("fs.azure.account.key." + ACCOUNT_NAME + ".dfs.core.windows.net", ACCOUNT_KEY); HadoopWordCount.executeSample(jobConf, inputPath, outputPath); }