Skip to content

Commit fe92970

Browse files
committed
bloblib v1.0.0
1 parent 971fc9a commit fe92970

File tree

6 files changed

+21
-9
lines changed

6 files changed

+21
-9
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ Packaged the core operations of the azure blob storage as a separated library, t
1212

1313

1414
## Features and Updates:
15+
16+
### Bump the version to v1.0.0
17+
18+
* Optimize performance for large content uploads and downloads
19+
* Optimize performance for multiple files concurrently download/upload
20+
1521
### New features since v0.0.4 :
1622

1723
* upload and down with multiple threads, more faster and stable.
18-
* Page blob is full supported.
24+
* Page blob is fully supported.
1925

2026
### New features since v0.0.3 :
2127

Binary file not shown.

dependency-reduced-pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.wesley</groupId>
55
<artifactId>bloblib</artifactId>
66
<name>A blob operation library built on top of azure blob service</name>
7-
<version>0.0.3</version>
7+
<version>1.0.0</version>
88
<url>http://maven.apache.org</url>
99
<build>
1010
<sourceDirectory>src</sourceDirectory>

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.wesley</groupId>
66
<artifactId>bloblib</artifactId>
7-
<version>0.0.4</version>
7+
<version>1.0.0</version>
88
<name>A blob operation library built on top of azure blob service</name>
99
<packaging>jar</packaging>
1010
<url>http://maven.apache.org</url>

src/main/java/com/wesley/bloblib/ParallelDownloader.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ public class ParallelDownloader {
1919
/* instance of the object */
2020
private static ParallelDownloader instance = null;
2121
/* the number of threads */
22-
private int defaultNumOfThreads = 8;
22+
private int defaultNumOfThreads = 12;
23+
/* the number of chunks */
24+
private int defaultNumOfChunks = 4;
2325
/* the minimum chunk size */
24-
private int minChunkSize = 512 * 1024; // 512K
26+
private int minChunkSize = 2 * 1024 * 1024; // 2MB
2527
/* the downloader threads pool */
2628
private static ThreadPuddle downloaderThreadsPool;
2729
/* the factory of thread puddle class */
@@ -72,6 +74,7 @@ public synchronized static ParallelDownloader getInstance () {
7274
private final void initTheDownLoaderThreadsPool(int numOfthreads){
7375
threadPuddleFactory = new ThreadPuddleFactory();
7476
threadPuddleFactory.setThreads(numOfthreads);
77+
threadPuddleFactory.setTaskLimit(numOfthreads * 100);
7578
threadPuddleFactory.setFifo(true);
7679
downloaderThreadsPool = threadPuddleFactory.build();
7780
}
@@ -80,7 +83,7 @@ private final void initTheDownLoaderThreadsPool(int numOfthreads){
8083
private int getFinalNumOfChunks(long length){
8184
int tmpBlockCount = (int)((float)length / (float)minChunkSize) + 1;
8285
/* the final number of the chunks */
83-
int numOfChunks = Math.min(defaultNumOfThreads, tmpBlockCount);
86+
int numOfChunks = Math.min(defaultNumOfChunks, tmpBlockCount);
8487
return numOfChunks;
8588
}
8689

src/main/java/com/wesley/bloblib/ParallelUploader.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ public class ParallelUploader {
2929
/* instance of the object */
3030
private static ParallelUploader instance = null;
3131
/* the number of threads */
32-
private int defaultNumOfThreads = 8;
32+
private int defaultNumOfThreads = 12;
33+
/* the number of chunks */
34+
private int defaultNumOfChunks = 4;
3335
/* the minimum chunk size */
34-
private int minChunkSize = 512 * 1024; // 512K
36+
private int minChunkSize = 2 * 1024 * 1024; // 2MB
3537
/* the uploader threads pool */
3638
private static ThreadPuddle uploaderThreadsPool;
3739
/* the factory of thread puddle class */
@@ -84,6 +86,7 @@ public synchronized static ParallelUploader getInstance () {
8486
private final void initTheUploaderThreadsPool(int numOfthreads){
8587
threadPuddleFactory = new ThreadPuddleFactory();
8688
threadPuddleFactory.setThreads(numOfthreads);
89+
threadPuddleFactory.setTaskLimit(numOfthreads * 100);
8790
threadPuddleFactory.setFifo(true);
8891
uploaderThreadsPool = threadPuddleFactory.build();
8992
}
@@ -96,7 +99,7 @@ private final void initTheUploaderThreadsPool(int numOfthreads){
9699
private int getFinalNumOfChunks(long length){
97100
int tmpBlockCount = (int)((float)length / (float)minChunkSize) + 1;
98101
/* the final number of the chunks */
99-
int numOfChunks = Math.min(defaultNumOfThreads, tmpBlockCount);
102+
int numOfChunks = Math.min(defaultNumOfChunks, tmpBlockCount);
100103
return numOfChunks;
101104
}
102105

0 commit comments

Comments
 (0)