storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [1/2] storm git commit: Merge branch 'STORM-2511' of https://github.com/satishd/storm into STORM-2511
Date Mon, 15 May 2017 18:16:38 GMT
Repository: storm
Updated Branches:
  refs/heads/1.0.x-branch f8d7cb6e9 -> a7bdfe46e


Merge branch 'STORM-2511' of https://github.com/satishd/storm into STORM-2511

STORM-2511: Submitting a topology with name containing unicode getting
failed


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/d0eceb94
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/d0eceb94
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/d0eceb94

Branch: refs/heads/1.0.x-branch
Commit: d0eceb94e0a3bdaa9a383a6a7f5a366dace954c9
Parents: f8d7cb6
Author: Robert Evans <evans@yahoo-inc.com>
Authored: Mon May 15 12:27:52 2017 -0500
Committer: Robert Evans <evans@yahoo-inc.com>
Committed: Mon May 15 13:06:06 2017 -0500

----------------------------------------------------------------------
 storm-core/src/jvm/org/apache/storm/blobstore/BlobStore.java   | 2 +-
 .../jvm/org/apache/storm/blobstore/ClientBlobStoreTest.java    | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/d0eceb94/storm-core/src/jvm/org/apache/storm/blobstore/BlobStore.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/blobstore/BlobStore.java b/storm-core/src/jvm/org/apache/storm/blobstore/BlobStore.java
index 14879b4..92f32ec 100644
--- a/storm-core/src/jvm/org/apache/storm/blobstore/BlobStore.java
+++ b/storm-core/src/jvm/org/apache/storm/blobstore/BlobStore.java
@@ -61,7 +61,7 @@ import org.apache.storm.generated.SettableBlobMeta;
  */
 public abstract class BlobStore implements Shutdownable {
     private static final Logger LOG = LoggerFactory.getLogger(BlobStore.class);
-    private static final Pattern KEY_PATTERN = Pattern.compile("^[\\w \\t\\.:_-]+$");
+    private static final Pattern KEY_PATTERN = Pattern.compile("^[\\w \\t\\.:_-]+$", Pattern.UNICODE_CHARACTER_CLASS);
     protected static final String BASE_BLOBS_DIR_NAME = "blobs";
 
     /**

http://git-wip-us.apache.org/repos/asf/storm/blob/d0eceb94/storm-core/test/jvm/org/apache/storm/blobstore/ClientBlobStoreTest.java
----------------------------------------------------------------------
diff --git a/storm-core/test/jvm/org/apache/storm/blobstore/ClientBlobStoreTest.java b/storm-core/test/jvm/org/apache/storm/blobstore/ClientBlobStoreTest.java
index 742c917..448a381 100644
--- a/storm-core/test/jvm/org/apache/storm/blobstore/ClientBlobStoreTest.java
+++ b/storm-core/test/jvm/org/apache/storm/blobstore/ClientBlobStoreTest.java
@@ -164,6 +164,12 @@ public class ClientBlobStoreTest {
     validatedBlobAcls(testKey);
   }
 
+  @Test
+  public void testBloblStoreKeyWithUnicodesValidation() throws Exception {
+    BlobStore.validateKey("msg:kafka-unicodewriter䶵-11-1483434711-stormconf.ser");
+    BlobStore.validateKey("msg:kafka-ascii-11-148343436363-stormconf.ser");
+  }
+
   private void createTestBlob(String testKey, SettableBlobMeta meta) throws AuthorizationException,
KeyAlreadyExistsException {
     AccessControl submitterAcl = BlobStoreAclHandler.parseAccessControl("u:tester:rwa");
     meta.add_to_acl(submitterAcl);


Mime
View raw message