libhdfs defines these structures, which are supported by
libMapRClient.
Supported by libhdfs for hadoop-2.x
This structure can be passed to hdfsBuilderConnect() for creating
connections to filesystem clusters. In the libMapRClient, four of the
parameters are ignored. forceNewInstance is ignored, though the header file
does not indicate this.
struct hdfsBuilder {
int forceNewInstance;
const char *nn;
tPort port;
const char *kerbTicketCachePath; // Ignored
const char *userName; // Ignored
struct hdfsBuilderConfOpt *opts; // Ignored
};
nn
Specifies the CLDB node to connect to
when hdfsBuilderConnect() is called. This value is set by
hdfsBuilderSetNameNode().
default is specified for the host parameter,
hdfsBuilderConnect() will connect to the first cluster listed in the
file MAPR_HOME/conf/mapr-clusters.conf. (MAPR_HOME
defaults to /opt/mapr.)host parameter,
hdfsBuilderConnect(), look in
MAPR_HOME/conf/mapr-clusters.conf on the client node to match the
specified hostname or IP address to a CLDB host and port.mapr-clusters.conf file, they try to connect to the CLDB host
specified in the call to create the connection. However, the standard features for
connections to MapR clusters are not available. For example, if the cluster is
secured, the connection will fail.portSpecifies the port to connect to on the CLDB node. This value is
set by hdfsBuilderSetNameNodePort().
Supported by libhdfs for hadoop-2.x
This structure is returned by hdfsGetPathInfo() and deleted by
hdfsFreeFileInfo(). It contains information about the file or directory
that is specified in the call to
hdfsGetPathInfo().
ParameterstObjectKind
mKindSpecifies whether the object is a file or directory.
char
*mNameSpecifies the name of the object.
tTime
mLastModSpecifies the epoch time in milliseconds of the last modification to the object.
tOffset mSizeSpecifies the size of the object in bytes.
short mReplicationSpecifies the count of replicas of the object.
tOffset mBlockSizeSpecifies the block size for the object.
char *mOwnerSpecifies the owner of the object.
char *mGroupSpecifies the group that is associated with the object.
short mPermissionsSpecifies the permissions on the object.
tTime mLastAccessSpecifies the epoch time in milliseconds at which the object was created.