com.nhncorp.neptune.tablet
Class TableSchema
java.lang.Object
com.nhncorp.neptune.tablet.TableSchema
- All Implemented Interfaces:
- NWritable, java.lang.Comparable<TableSchema>
public class TableSchema
- extends java.lang.Object
- implements NWritable, java.lang.Comparable<TableSchema>
테이블의 스키마 정보(ValueObject)
- Author:
- nhn
|
Constructor Summary |
TableSchema()
|
TableSchema(java.lang.String tableName)
|
TableSchema(java.lang.String tableName,
java.lang.String description)
|
TableSchema(java.lang.String tableName,
java.lang.String description,
java.util.List<java.lang.String> columns)
|
TableSchema(java.lang.String tableName,
java.lang.String description,
java.lang.String[] columns)
|
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
LOG
public static final org.apache.commons.logging.Log LOG
DEFAULT_NUM_VERSION
public static final int DEFAULT_NUM_VERSION
- See Also:
- Constant Field Values
DIR_TABLE
public static final java.lang.String DIR_TABLE
- See Also:
- Constant Field Values
TableSchema
public TableSchema()
TableSchema
public TableSchema(java.lang.String tableName)
TableSchema
public TableSchema(java.lang.String tableName,
java.lang.String description)
TableSchema
public TableSchema(java.lang.String tableName,
java.lang.String description,
java.util.List<java.lang.String> columns)
TableSchema
public TableSchema(java.lang.String tableName,
java.lang.String description,
java.lang.String[] columns)
addColumn
public void addColumn(java.lang.String column)
getColumns
public java.util.List<java.lang.String> getColumns()
setColumns
public void setColumns(java.util.List<java.lang.String> columns)
getDescription
public java.lang.String getDescription()
setDescription
public void setDescription(java.lang.String description)
getTableName
public java.lang.String getTableName()
setTableName
public void setTableName(java.lang.String tableName)
getNumOfVersion
public int getNumOfVersion()
setNumOfVersion
public void setNumOfVersion(int numOfVeriosn)
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
loadTableSchema
public static TableSchema loadTableSchema(NConfiguration conf,
java.lang.String tableName)
throws java.io.IOException
- Throws:
java.io.IOException
getTableSchemaPath
public static GPath getTableSchemaPath(NConfiguration conf,
java.lang.String tableName)
getOwnerInfo
public java.lang.String getOwnerInfo()
throws java.io.IOException
- Throws:
java.io.IOException
readFields
public void readFields(java.io.DataInput in)
throws java.io.IOException
- Description copied from interface:
NWritable
- Reads the fields of this object from
in. For efficiency,
implementations should attempt to re-use storage in the existing object
where possible.
- Specified by:
readFields in interface NWritable
- Throws:
java.io.IOException
write
public void write(java.io.DataOutput out)
throws java.io.IOException
- Description copied from interface:
NWritable
- Writes the fields of this object to
out.
- Specified by:
write in interface NWritable
- Throws:
java.io.IOException
getColumn
public java.lang.String getColumn(int i)
getColumnsArray
public java.lang.String[] getColumnsArray()
containsColumn
public boolean containsColumn(java.lang.String[] targetColumns)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
print
public void print()
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
getTableDataPath
public static java.lang.String getTableDataPath(NConfiguration conf,
java.lang.String tableName)
getTableDataTrashPath
public static java.lang.String getTableDataTrashPath(NConfiguration conf,
java.lang.String tableName)
compareTo
public int compareTo(TableSchema o)
- Specified by:
compareTo in interface java.lang.Comparable<TableSchema>
getTableDetail
public java.lang.String getTableDetail()
getOwner
public java.lang.String getOwner()
setOwner
public void setOwner(java.lang.String owner)
hasPermission
public boolean hasPermission(java.lang.String userId,
java.lang.String readWrite)
addPermission
public void addPermission(java.lang.String userId,
java.lang.String permission)
removePermission
public void removePermission(java.lang.String userId)