curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-93) Have TransactionCreateBuilder implement Compressible
Date Wed, 18 Jun 2014 15:38:25 GMT

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

ASF GitHub Bot commented on CURATOR-93:
---------------------------------------

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

    https://github.com/apache/curator/pull/12#discussion_r13922014
  
    --- Diff: curator-framework/src/test/java/org/apache/curator/framework/imps/TestCompressionInTransaction.java
---
    @@ -0,0 +1,61 @@
    +/**
    + * 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.curator.framework.imps;
    +
    +import org.apache.curator.test.BaseClassForTests;
    +import org.apache.curator.utils.CloseableUtils;
    +import org.apache.curator.framework.CuratorFramework;
    +import org.apache.curator.framework.CuratorFrameworkFactory;
    +import org.apache.curator.framework.api.CompressionProvider;
    +import org.apache.curator.retry.RetryOneTime;
    +import org.testng.Assert;
    +import org.testng.annotations.Test;
    +import java.util.concurrent.atomic.AtomicInteger;
    +
    +public class TestCompressionInTransaction extends BaseClassForTests
    +{
    +    @Test
    +    public void testSimple() throws Exception
    +    {
    +        final String path1 = "/a";
    +        final String path2 = "/a/b";
    +        
    +        final byte[]            data1 = "here's a string".getBytes();
    +        final byte[]            data2 = "here's another string".getBytes();
    +
    +        CuratorFramework        client = CuratorFrameworkFactory.newClient(server.getConnectString(),
new RetryOneTime(1));
    +        try
    +        {
    +            client.start();
    +
    +            client.inTransaction().create().compressed().forPath(path1, data1).and().
    --- End diff --
    
    Would be good to have a test case where the same client creates both compressed and uncompressed
data.


> Have TransactionCreateBuilder implement Compressible
> ----------------------------------------------------
>
>                 Key: CURATOR-93
>                 URL: https://issues.apache.org/jira/browse/CURATOR-93
>             Project: Apache Curator
>          Issue Type: Improvement
>            Reporter: Benjamin Jaton
>            Assignee: Jordan Zimmerman
>            Priority: Minor
>              Labels: compression, curator, transaction
>
> It would be nice to support compression for operations done in a transaction.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message