Skip to content

Commit

Permalink
Initial checkin for Storage file (#4414)
Browse files Browse the repository at this point in the history
* Finished the restructure, refactor builder. Added sleep in record feature. Linting
  • Loading branch information
sima-zhu authored Jul 24, 2019
1 parent 78ea66b commit 44fb56e
Show file tree
Hide file tree
Showing 181 changed files with 19,436 additions and 449 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@
<Match>
<Or>
<Package name="com.microsoft.azure.storage.blob"/>
<Package name="com.azure.storage.file.models"/>
<Class name="com.azure.storage.blob.HTTPGetterInfo"/>
</Or>
<Bug pattern="NM_CONFUSING"/>
Expand Down
7 changes: 7 additions & 0 deletions eng/spotbugs-aggregate-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<azure-keyvault.version>4.0.0-preview.1</azure-keyvault.version>
<azure-messaging-eventhubs.version>5.0.0-preview.2</azure-messaging-eventhubs.version>
<azure-storage.version>12.0.0-preview.1</azure-storage.version>
<azure-storage-file.version>12.0.0-preview.1</azure-storage-file.version>
<azure-storage-queue.version>12.0.0-preview.1</azure-storage-queue.version>
</properties>
<distributionManagement>
Expand Down Expand Up @@ -183,6 +184,12 @@
<!-- <artifactId>azure-storage-blob</artifactId>-->
<!-- <version>${azure-storage.version}</version>-->
<!-- </dependency>-->

<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-file</artifactId>
<version>${azure-storage-file.version}</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-queue</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions pom.client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,10 @@
<title>Azure Storage - Blobs</title>
<packages>com.azure.storage.blob*</packages>
</group>
<group>
<title>Azure Storage - Files</title>
<packages>com.azure.storage.file*</packages>
</group>
<group>
<title>Azure Storage - Queues</title>
<packages>com.azure.storage.queue*</packages>
Expand Down Expand Up @@ -753,6 +757,7 @@
<!-- <module>./sdk/tracing</module>-->
<module>./sdk/identity/azure-identity</module>
<module>./storage/client/blob</module>
<module>./storage/client/file</module>
<module>./storage/client/queue</module>
</modules>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ private static synchronized void loadProperties() {
}



5 changes: 2 additions & 3 deletions storage/client/blob/src/samples/java/FileTransferExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.net.URL;
Expand Down Expand Up @@ -139,7 +138,7 @@ private static File createTempEmptyFile(String fileName) throws IOException {
}
}

private static void createTempFileWithFileSize(File f, long size) throws FileNotFoundException, IOException {
private static void createTempFileWithFileSize(File f, long size) throws IOException {
RandomAccessFile raf = new RandomAccessFile(f, "rw");
raf.setLength(size);
raf.close();
Expand All @@ -148,7 +147,7 @@ private static void createTempFileWithFileSize(File f, long size) throws FileNot
private static void checkTwoFilesAreTheSame(File f1, File f2) throws IOException, NoSuchAlgorithmException {
String checksumUpload = getFileChecksum(f1);
String checksumDownload = getFileChecksum(f2);
if (checksumUpload.equals(checksumDownload)) {
if (!checksumUpload.equals(checksumDownload)) {
throw new RuntimeException("The file upload does not match the file download.");
}
}
Expand Down
Loading

0 comments on commit 44fb56e

Please sign in to comment.