All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hbase.async..MultiAction.swp Maven / Gradle / Ivy

Go to download

An alternative HBase client library for applications requiring fully asynchronous, non-blocking and thread-safe HBase connectivity.

There is a newer version: 1.8.2
Show newest version
b0VIM 7.3x?CO\#=? tsunanowwhat~tsuna/src/asynchbase/src/MultiAction.java
3210#"! UtpO????????_P????????P?????????\?????????c[????????a?????????]|adkO????D??j?
?
=
??o"????
?
`

?	?	?	?	?	q	U	7			?????G!???Z?z1??P?ut=
?????a"!??<????kj   * We'll sort this list before serializing it.   * All the RPCs in this batch.  /**  static final byte USE_MULTI = RegionClient.SERVER_VERSION_092_OR_ABOVE;   */   * necessary, so we don't support it.   * in HBASE-5204, because of a change in HBASE-3335 this is harder than   * Technically we could use `multi' with HBase 0.90.x, but as explained   * Protocol version from which we can use `multi' instead of `multiPut'.  /**    new NotServingRegionException("Region unavailable", null);  private static final NotServingRegionException NSRE =  /** Template for NSREs.  */  };    'm', 'u', 'l', 't', 'i'  private static final byte[] MULTI = new byte[] {  };    'm', 'u', 'l', 't', 'i', 'P', 'u', 't'  private static final byte[] MULTI_PUT = new byte[] {  // better than the insane spaghetti mess in HBase's client and server.  // believe me, what's here is -- in my biased opinion -- significantly  // complex logic.  This was better than all the code duplication.  And  // RPCs, which does add a bit of complexity to the already unnecessarily  // RPCs depending on the server version.  Hence this class supports both  // added complexity in other places that had to deal with either kind of  // from `multiPut', but this resulted in a lot of code duplication and  // unwieldy.  I originally wrote support for `multi' as a separate class  // a reasonable implementation, it's obvious that the resulting code is  // been a gigantic mess in HBase, and despite my best efforts to provide  // with many nested loops and `if's.  `multiPut' and `multi' have always  // NOTE: I apologize for the long methods and complex control flow logic,final class MultiAction extends HBaseRpc { */ * that it will apply it atomically). * This RPC is guaranteed to be sent atomically (but HBase doesn't guarantee * 

* Package-private class to batch multiple RPCs for a same region together./**import org.jboss.netty.buffer.ChannelBuffer;import java.util.Comparator;import java.util.Collections;import java.util.ArrayList;import java.util.Arrays;package org.hbase.async; */ * POSSIBILITY OF SUCH DAMAGE. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * without specific prior written permission. * may be used to endorse or promote products derived from this software * - Neither the name of the StumbleUpon nor the names of its contributors * and/or other materials provided with the distribution. * this list of conditions and the following disclaimer in the documentation * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions of source code must retain the above copyright notice, * modification, are permitted provided that the following conditions are met: * Redistribution and use in source and binary forms, with or without * * This file is part of Async HBase. * Copyright (C) 2010-2012 The Async HBase Authors. All rights reserved./*ad? M ????wqpb???????I? ? ? ? ? ? ? ? ? P O M L } private static final MultiActionSuccess SUCCESS = new MultiActionSuccess(); } } return "MultiActionSuccess"; public String toString() { } private MultiActionSuccess() { private static final class MultiActionSuccess { /** Singleton class returned to indicate success of a multi-put. */ } private static final long serialVersionUID = 1326900942; } return new MultiPutFailedException(msg.toString(), rpc); MultiPutFailedException make(final Object msg, final HBaseRpc rpc) { @Override } return failed_rpc; public HBaseRpc getFailedRpc() { } return super.getMessage() + "\nCaused by RPC: " + failed_rpc;





© 2015 - 2024 Weber Informatics LLC | Privacy Policy