[ https://issues.apache.org/jira/browse/ACCUMULO-3709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14492479#comment-14492479 ]
ASF GitHub Bot commented on ACCUMULO-3709: ------------------------------------------ Github user joshelser commented on a diff in the pull request: https://github.com/apache/accumulo/pull/27#discussion_r28245455 --- Diff: test/src/test/java/org/apache/accumulo/test/AccumuloOutputFormatTest.java --- @@ -0,0 +1,160 @@ +/* + * 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.accumulo.test; + +import static com.google.common.base.Charsets.UTF_8; + +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import org.apache.accumulo.core.client.BatchWriterConfig; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.ZooKeeperInstance; +import org.apache.accumulo.core.client.mapred.AccumuloOutputFormat; +import org.apache.accumulo.core.client.mapreduce.lib.util.OutputConfigurator; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.data.Mutation; +import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.security.TablePermission; +import org.apache.accumulo.minicluster.MiniAccumuloCluster; +import org.apache.accumulo.minicluster.MiniAccumuloConfig; +import org.apache.hadoop.io.Text; +import org.apache.hadoop.mapred.JobConf; +import org.apache.hadoop.mapred.RecordWriter; +import org.apache.hadoop.mapreduce.Job; +import org.apache.hadoop.mapreduce.TaskAttemptContext; +import org.apache.hadoop.mapreduce.TaskAttemptID; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +import com.google.common.collect.Maps; + +/** + * Exists because mock instance doesn't produce this error when dynamically changing the table permissions. + */ +public class AccumuloOutputFormatTest { + + private static final String TABLE = "abc"; + public static TemporaryFolder folder = new TemporaryFolder(); --- End diff -- Would be nice to put this in `target/` instead of a random temporary folder. Makes future debugging easier. Something like `System.getProperty("user.dir") + "/target/" + getClass().getName()` usually is sufficient. > AccumuloOutputFormat close doesn't rethrow exception when mutations are > rejected > -------------------------------------------------------------------------------- > > Key: ACCUMULO-3709 > URL: https://issues.apache.org/jira/browse/ACCUMULO-3709 > Project: Accumulo > Issue Type: Bug > Affects Versions: 1.5.2, 1.6.2 > Reporter: marco polo > Assignee: marco polo > Priority: Blocker > Fix For: 1.5.3, 1.7.0, 1.6.3 > > > If mutations are rejected during the close of the output formatter and > subsequently the writer ( which causes a flush ), then the exception is not > rethrown...only logged. > I'm testing a change to rethrow the Mutation rejected exception as a wrapped > IO Exception -- This message was sent by Atlassian JIRA (v6.3.4#6332)