org.apache.tez.common
Class TezUtils

java.lang.Object
  extended by org.apache.tez.common.TezUtils

public class TezUtils
extends Object


Field Summary
static int MAX_VERTEX_NAME_LENGTH
           
 
Constructor Summary
TezUtils()
           
 
Method Summary
static void addUserSpecifiedTezConfiguration(org.apache.hadoop.conf.Configuration conf)
           
static String cleanVertexName(String vertexName)
           
static com.google.protobuf.ByteString compressByteArrayToByteString(byte[] inBytes)
           
static byte[] compressBytes(byte[] inBytes)
           
static com.google.protobuf.ByteString createByteStringFromConf(org.apache.hadoop.conf.Configuration conf)
          Convert a Configuration to compressed ByteString using Protocol buffer
static org.apache.hadoop.conf.Configuration createConfFromByteString(com.google.protobuf.ByteString byteString)
          Convert compressed byte string to a Configuration object using protocol buffer
static org.apache.hadoop.conf.Configuration createConfFromUserPayload(byte[] bb)
          Convert compressed pay load in byte[] to a Configuration object using protocol buffer
static byte[] createUserPayloadFromConf(org.apache.hadoop.conf.Configuration conf)
          Convert a Configuration to compressed user pay load (i.e.
static byte[] decompressByteStringToByteArray(com.google.protobuf.ByteString byteString)
           
static BitSet fromByteArray(byte[] bytes)
           
static byte[] toByteArray(BitSet bits)
           
static byte[] uncompressBytes(byte[] inBytes)
           
static void updateLoggers(String addend)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_VERTEX_NAME_LENGTH

@InterfaceAudience.Private
public static final int MAX_VERTEX_NAME_LENGTH
See Also:
Constant Field Values
Constructor Detail

TezUtils

public TezUtils()
Method Detail

addUserSpecifiedTezConfiguration

public static void addUserSpecifiedTezConfiguration(org.apache.hadoop.conf.Configuration conf)
                                             throws IOException
Throws:
IOException

createByteStringFromConf

public static com.google.protobuf.ByteString createByteStringFromConf(org.apache.hadoop.conf.Configuration conf)
                                                               throws IOException
Convert a Configuration to compressed ByteString using Protocol buffer

Parameters:
conf - : Configuration to be converted
Returns:
PB ByteString (compressed)
Throws:
IOException

createUserPayloadFromConf

public static byte[] createUserPayloadFromConf(org.apache.hadoop.conf.Configuration conf)
                                        throws IOException
Convert a Configuration to compressed user pay load (i.e. byte[]) using Protocol buffer

Parameters:
conf - : Configuration to be converted
Returns:
compressed pay load
Throws:
IOException

createConfFromByteString

public static org.apache.hadoop.conf.Configuration createConfFromByteString(com.google.protobuf.ByteString byteString)
                                                                     throws IOException
Convert compressed byte string to a Configuration object using protocol buffer

Parameters:
byteString - :compressed conf in Protocol buffer
Returns:
Configuration
Throws:
IOException

createConfFromUserPayload

public static org.apache.hadoop.conf.Configuration createConfFromUserPayload(byte[] bb)
                                                                      throws IOException
Convert compressed pay load in byte[] to a Configuration object using protocol buffer

Parameters:
bb - : compressed pay load
Returns:
Configuration
Throws:
IOException

compressBytes

public static byte[] compressBytes(byte[] inBytes)
                            throws IOException
Throws:
IOException

uncompressBytes

public static byte[] uncompressBytes(byte[] inBytes)
                              throws IOException
Throws:
IOException

compressByteArrayToByteString

@InterfaceAudience.Private
public static com.google.protobuf.ByteString compressByteArrayToByteString(byte[] inBytes)
                                                                    throws IOException
Throws:
IOException

decompressByteStringToByteArray

@InterfaceAudience.Private
public static byte[] decompressByteStringToByteArray(com.google.protobuf.ByteString byteString)
                                              throws IOException
Throws:
IOException

cleanVertexName

@InterfaceAudience.Private
public static String cleanVertexName(String vertexName)

updateLoggers

public static void updateLoggers(String addend)
                          throws FileNotFoundException
Throws:
FileNotFoundException

fromByteArray

public static BitSet fromByteArray(byte[] bytes)

toByteArray

public static byte[] toByteArray(BitSet bits)


Copyright © 2014 Apache Software Foundation. All rights reserved.