@API.Public
public class MapRDB
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Table |
createTable(java.lang.String tablePath)
Creates a JSON table at the specified path with a 'default' column family and default options.
|
static boolean |
deleteTable(java.lang.String tablePath)
Deletes a Table.
|
static Admin |
getAdmin(org.apache.hadoop.conf.Configuration conf)
Deprecated.
|
static Table |
getIndexTable(IndexDesc indexDesc)
Returns an object for accessing the table having the given path name.
|
static Table |
getTable(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
Deprecated.
Use of this method is deprecated, use OJAI
Connection.getStore(String) API. |
static Table |
getTable(org.apache.hadoop.fs.Path path)
Deprecated.
Use of this method is deprecated, use OJAI
Connection.getStore(String) API. |
static Table |
getTable(java.lang.String pathName)
Deprecated.
Use of this method is deprecated, use OJAI
Connection.getStore(String) API. |
static Admin |
newAdmin()
Creates and returns an Admin instance with default configuration.
|
static Admin |
newAdmin(org.apache.hadoop.conf.Configuration c)
Creates and returns an Admin instance with specified configuration.
|
static org.ojai.store.QueryCondition |
newCondition()
Deprecated.
Use of this method is deprecated, use OJAI
Driver.newCondition() API. |
static FamilyDescriptor |
newDefaultFamilyDescriptor()
Creates and returns a FamilyDescriptor instance for the "default" family.
|
static org.ojai.Document |
newDocument()
Deprecated.
Use of this method is deprecated, use OJAI
Driver.newDocument() API. |
static org.ojai.Document |
newDocument(java.util.Map<java.lang.String,java.lang.Object> map)
Deprecated.
Use of this method is deprecated, use OJAI
Driver.newDocument(Map) API. |
static org.ojai.Document |
newDocument(java.lang.Object bean)
Deprecated.
Use of this method is deprecated, use OJAI
Driver.newDocument(Object) API. |
static org.ojai.Document |
newDocument(java.lang.String jsonString)
Deprecated.
Use of this method is deprecated, use OJAI
Driver.newDocument(String) API. |
static org.ojai.DocumentBuilder |
newDocumentBuilder()
Deprecated.
Use of this method is deprecated, use OJAI
Driver.newDocumentBuilder() API. |
static FamilyDescriptor |
newFamilyDescriptor()
Creates and returns a FamilyDescriptor instance.
|
static FamilyDescriptor |
newFamilyDescriptor(java.lang.String familyName,
org.ojai.FieldPath jsonPath)
Creates and returns a FamilyDescriptor instance initialized with the specified family
name and its JSON path.
|
static FamilyDescriptor |
newFamilyDescriptor(java.lang.String familyName,
java.lang.String jsonPath)
Creates and returns a FamilyDescriptor instance initialized with the specified family
name and its JSON path.
|
static org.ojai.store.DocumentMutation |
newMutation()
Deprecated.
Use of this method is deprecated, use OJAI
Driver.newMutation() API. |
static TableDescriptor |
newTableDescriptor()
Creates and returns a TableDescriptor instance.
|
static TableDescriptor |
newTableDescriptor(org.apache.hadoop.fs.Path tablePath)
Creates and returns a TableDescriptor instance initialized with the specified path.
|
static TableDescriptor |
newTableDescriptor(java.lang.String tablePath)
Creates and returns a TableDescriptor instance initialized with the specified path.
|
static boolean |
tableExists(java.lang.String tablePath)
Test for the existence of Table at the given path.
|
public static boolean tableExists(java.lang.String tablePath) throws DBException
Admin.tableExists(String)
.tablePath
- The table path.
The table path can be either absolute or relative to the user's home directory.
The absolute path can be specified as "/<tablepath>" for tables in a default
cluster or as "/mapr/<clustername>/<tablepath>" for tables
in the specified clustertrue
if the specified path exists and is a tableDBException
public static Table createTable(java.lang.String tablePath) throws DBException
Admin.createTable(String)
.tablePath
- The table path.
The table path can be either absolute or relative to user's home directory.
The absolute path can be specified as "/<tablepath>" for tables in a default
cluster or as "/mapr/<clustername>/<tablepath>" for tables
in the specified clusterTableExistsException
- if a table with the specified path already existsDBException
- if some DBException occurspublic static boolean deleteTable(java.lang.String tablePath) throws DBException
Admin.deleteTable(String)
.tablePath
- The table path.
The table path can be either absolute or relative to user's home directory.
The absolute path can be specified as "/<tablepath>" for tables in a default
cluster or as "/mapr/<clustername>/<tablepath>" for tables
in the specified clustertrue
if and only if the table is successfully deleted;
otherwise, false
AccessDeniedException
- if the user does not have permission to delete
the table.DBException
public static Table getTable(java.lang.String pathName) throws DBException
Connection.getStore(String)
API.pathName
- table path. It can be specified as
/tablepath to access a table in a default cluster or as
/mapr/clustername/tabletpath to access a table in the given clusterTableNotFoundException
- when the table doesn't existDBException
public static Table getTable(org.apache.hadoop.fs.Path path) throws DBException
Connection.getStore(String)
API.pathName
- table path. It can be specified as
/tablepath to access a table in a default cluster or as
/mapr/clustername/tabletpath to access a table in the given clusterTableNotFoundException
- when the table doesn't existDBException
public static Table getTable(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path) throws DBException
Connection.getStore(String)
API.pathName
- table path. It can be specified as
/tablepath to access a table in a default cluster or as
/mapr/clustername/tabletpath to access a table in the given clusterTableNotFoundException
- when the table doesn't existDBException
public static Table getIndexTable(IndexDesc indexDesc) throws DBException
indeexDesc
- IndexDesc
of the index tableTableNotFoundException
- when the index table doesn't existDBException
@Deprecated public static Admin getAdmin(org.apache.hadoop.conf.Configuration conf)
conf
- public static Admin newAdmin() throws DBException
DBException
public static Admin newAdmin(org.apache.hadoop.conf.Configuration c) throws DBException
DBException
public static TableDescriptor newTableDescriptor()
public static TableDescriptor newTableDescriptor(java.lang.String tablePath)
public static TableDescriptor newTableDescriptor(org.apache.hadoop.fs.Path tablePath)
public static FamilyDescriptor newFamilyDescriptor()
public static FamilyDescriptor newDefaultFamilyDescriptor()
public static FamilyDescriptor newFamilyDescriptor(java.lang.String familyName, java.lang.String jsonPath)
public static FamilyDescriptor newFamilyDescriptor(java.lang.String familyName, org.ojai.FieldPath jsonPath)
public static org.ojai.Document newDocument()
Driver.newDocument()
API.public static org.ojai.Document newDocument(java.lang.String jsonString) throws org.ojai.exceptions.DecodingException
Driver.newDocument(String)
API.org.ojai.exceptions.DecodingException
public static org.ojai.Document newDocument(java.util.Map<java.lang.String,java.lang.Object> map) throws org.ojai.exceptions.DecodingException
Driver.newDocument(Map)
API.org.ojai.exceptions.DecodingException
public static org.ojai.Document newDocument(java.lang.Object bean) throws org.ojai.exceptions.DecodingException
Driver.newDocument(Object)
API.org.ojai.exceptions.DecodingException
public static org.ojai.DocumentBuilder newDocumentBuilder()
Driver.newDocumentBuilder()
API.public static org.ojai.store.DocumentMutation newMutation()
Driver.newMutation()
API.public static org.ojai.store.QueryCondition newCondition()
Driver.newCondition()
API.