[ 
https://issues.apache.org/jira/browse/STORM-2009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15397540#comment-15397540
 ] 

ASF GitHub Bot commented on STORM-2009:
---------------------------------------

Github user abhishekagarwal87 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1599#discussion_r72622995
  
    --- Diff: storm-core/src/jvm/org/apache/storm/command/Blobstore.java ---
    @@ -0,0 +1,348 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.storm.command;
    +
    +import org.apache.commons.io.IOUtils;
    +import org.apache.commons.lang.StringUtils;
    +import org.apache.storm.blobstore.AtomicOutputStream;
    +import org.apache.storm.blobstore.BlobStoreAclHandler;
    +import org.apache.storm.blobstore.ClientBlobStore;
    +import org.apache.storm.blobstore.InputStreamWithMeta;
    +import org.apache.storm.generated.AccessControl;
    +import org.apache.storm.generated.AuthorizationException;
    +import org.apache.storm.generated.KeyNotFoundException;
    +import org.apache.storm.generated.ReadableBlobMeta;
    +import org.apache.storm.generated.SettableBlobMeta;
    +import org.apache.storm.utils.Utils;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.io.BufferedInputStream;
    +import java.io.BufferedOutputStream;
    +import java.io.FileInputStream;
    +import java.io.FileOutputStream;
    +import java.io.IOException;
    +import java.io.InputStream;
    +import java.io.OutputStream;
    +import java.util.ArrayList;
    +import java.util.Arrays;
    +import java.util.Collections;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.Map;
    +
    +public class Blobstore {
    +    private static final Logger LOG = 
LoggerFactory.getLogger(Blobstore.class);
    +
    +    public static void main(String[] args) throws Exception {
    +        if (args.length == 0) {
    +            throw new IllegalArgumentException("You should provide 
command.");
    +        }
    +
    +        String command = args[0];
    +        String[] newArgs = Arrays.copyOfRange(args, 1, args.length);
    +
    +        switch (command) {
    +            case "cat":
    +                readCli(newArgs);
    +                break;
    +
    +            case "create":
    +                createCli(newArgs);
    +                break;
    +
    +            case "update":
    +                updateCli(newArgs);
    +                break;
    +
    +            case "delete":
    +                deleteCli(newArgs);
    +                break;
    +
    +            case "list":
    +                listCli(newArgs);
    +                break;
    +
    +            case "set-acl":
    +                setAclCli(newArgs);
    +                break;
    +
    +            case "replication":
    +                replicationCli(newArgs);
    +                break;
    +
    +            default:
    +                throw new RuntimeException("" + command + " is not a 
supported blobstore command");
    --- End diff --
    
    nit. `"" + command` can be replaced with `command`. 


> port org.apache.storm.blobstore.clj and 
> org.apache.storm.command.blobstore.clj to Java
> --------------------------------------------------------------------------------------
>
>                 Key: STORM-2009
>                 URL: https://issues.apache.org/jira/browse/STORM-2009
>             Project: Apache Storm
>          Issue Type: New Feature
>          Components: storm-core
>            Reporter: Jungtaek Lim
>            Assignee: Jungtaek Lim
>              Labels: java-migration, jstorm-merger
>
> BlobStore is missing for storm-core java migration plan. Adding this to the 
> plan, and do actual work.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to