name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_Paths_getParent_rdh | /**
* Get the parent path of a string path: everything up to but excluding
* the last "/" in the path.
*
* @param pathStr
* path as a string
* @return the parent or null if there is no parent.
*/
public static String getParent(String
pathStr) {
int lastSlash = pathStr.lastIndexOf('/');
if (lastSlash ... | 3.26 |
hadoop_Paths_getMultipartUploadCommitsDirectory_rdh | /**
* Build a qualified temporary path for the multipart upload commit
* information in the supplied filesystem
* (which is expected to be the cluster FS).
* Currently {code $tempDir/$user/$uuid/staging-uploads} where
* {@code tempDir} is from
* {@link #tempDirForStaging(FileSystem, Configuration)}.
*
* @param ... | 3.26 |
hadoop_Paths_clearTempFolderInfo_rdh | /**
* Remove all information held about task attempts.
*
* @param attemptID
* attempt ID.
*/
public static void clearTempFolderInfo(final TaskAttemptID attemptID) {
tempFolders.invalidate(attemptID);
} | 3.26 |
hadoop_Paths_getAppAttemptId_rdh | /**
* Get the Application Attempt ID for this job.
*
* @param conf
* the config to look in
* @return the Application Attempt ID for a given job.
*/
private static int getAppAttemptId(Configuration conf) {return conf.... | 3.26 |
hadoop_Paths_resetTempFolderCache_rdh | /**
* Reset the temp folder cache; useful in tests.
*/
@VisibleForTesting
public static void resetTempFolderCache() {
tempFolders.invalidateAll();
} | 3.26 |
hadoop_Paths_tempDirForStaging_rdh | /**
* Try to come up with a good temp directory for different filesystems.
*
* @param fs
* filesystem
* @param conf
* configuration
* @return a qualified path under which temporary work can go.
*/
public static Path tempDirForStaging(FileSystem fs, Configuration
conf) {
String fallbackPath = (fs.getSch... | 3.26 |
hadoop_DatanodeLifelineProtocolClientSideTranslatorPB_isMethodSupported_rdh | // ProtocolMetaInterface
@Override
public boolean isMethodSupported(String methodName) throws IOException {
return RpcClientUtil.isMethodSupported(rpcProxy, DatanodeLifelineProtocolPB.class, RpcKind.RPC_PROTOCOL_BUFFER,
RPC.getProtocolVersion(DatanodeLifelineProtocolPB.class), methodName);
} | 3.26 |
hadoop_FederationNamespaceInfo_m0_rdh | /**
* The HDFS block pool id for this namespace.
*
* @return Block pool identifier.
*/
public String m0() {
return this.blockPoolId;
} | 3.26 |
hadoop_FederationNamespaceInfo_getClusterId_rdh | /**
* The HDFS cluster id for this namespace.
*
* @return Cluster identifier.
*/
public String getClusterId() {
return this.clusterId;
} | 3.26 |
hadoop_TreeWalk_getPendingQueue_rdh | /**
*
* @return the Deque containing the pending paths.
*/
protected Deque<TreePath> getPendingQueue() {
return pending;
} | 3.26 |
hadoop_FindOptions_setDepthFirst_rdh | /**
* Sets flag indicating whether the expression should be applied to the
* directory tree depth first.
*
* @param depthFirst
* true indicates depth first traversal
*/
public void setDepthFirst(boolean depthFirst) {
this.depthFirst = depthFirst;
} | 3.26 |
hadoop_FindOptions_setFollowArgLink_rdh | /**
* Sets flag indicating whether command line symbolic links should be
* followed.
*
* @param followArgLink
* true indicates follow links
*/
public void setFollowArgLink(boolean followArgLink) {
this.followArgLink = followArgLink;
} | 3.26 |
hadoop_FindOptions_setFollowLink_rdh | /**
* Sets flag indicating whether symbolic links should be followed.
*
* @param followLink
* true indicates follow links
*/
public void setFollowLink(boolean followLink) {
this.followLink = followLink;
} | 3.26 |
hadoop_FindOptions_getCommandFactory_rdh | /**
* Return the command factory.
*
* @return {@link CommandFactory}
*/
public CommandFactory getCommandFactory() {
return this.commandFactory;
} | 3.26 |
hadoop_FindOptions_setIn_rdh | /**
* Sets the input stream to be used.
*
* @param in
* input stream to be used
*/
public void setIn(InputStream in) {
this.in = in;
} | 3.26 |
hadoop_FindOptions_getConfiguration_rdh | /**
* Return the {@link Configuration} return configuration {@link Configuration}
*
* @return configuration.
*/
public Configuration getConfiguration() {
return this.configuration;
} | 3.26 |
hadoop_FindOptions_getOut_rdh | /**
* Returns the output stream to be used.
*
* @return output stream to be used
*/
public PrintStream getOut() {
return this.out;
} | 3.26 |
hadoop_FindOptions_setErr_rdh | /**
* Sets the error stream to be used.
*
* @param err
* error stream to be used
*/
public void setErr(PrintStream err) {
this.err = err;
} | 3.26 |
hadoop_FindOptions_getMaxDepth_rdh | /**
* Returns the maximum depth for applying expressions.
*
* @return maximum depth
*/
public int getMaxDepth() {
return this.maxDepth;} | 3.26 |
hadoop_FindOptions_getMinDepth_rdh | /**
* Returns the minimum depth for applying expressions.
*
* @return min depth
*/
public int getMinDepth() {
return this.minDepth;
} | 3.26 |
hadoop_FindOptions_isFollowArgLink_rdh | /**
* Should command line symbolic links be follows?
*
* @return true indicates links should be followed
*/
public boolean isFollowArgLink() {return this.followArgLink;
} | 3.26 |
hadoop_FindOptions_isDepthFirst_rdh | /**
* Should directory tree be traversed depth first?
*
* @return true indicate depth first traversal
*/
public boolean isDepthFirst() {
return this.depthFirst;
} | 3.26 |
hadoop_FindOptions_m1_rdh | /**
* Set the start time of this {@link Find} command.
*
* @param time
* start time (in milliseconds since epoch)
*/
public void m1(long time) {
this.startTime = time;
} | 3.26 |
hadoop_FindOptions_setCommandFactory_rdh | /**
* Set the command factory.
*
* @param factory
* {@link CommandFactory}
*/
public void setCommandFactory(CommandFactory factory) {
this.commandFactory = factory;
} | 3.26 |
hadoop_FindOptions_getStartTime_rdh | /**
* Returns the start time of this {@link Find} command.
*
* @return start time (in milliseconds since epoch)
*/
public long getStartTime() {
return this.startTime;
} | 3.26 |
hadoop_FindOptions_setConfiguration_rdh | /**
* Set the {@link Configuration}
*
* @param configuration
* {@link Configuration}
*/
public void setConfiguration(Configuration configuration) {
this.configuration = configuration;
} | 3.26 |
hadoop_FindOptions_getIn_rdh | /**
* Returns the input stream to be used.
*
* @return input stream to be used
*/
public InputStream getIn() {
return this.in;
} | 3.26 |
hadoop_FindOptions_getErr_rdh | /**
* Returns the error stream to be used.
*
* @return error stream to be used
*/
public PrintStream getErr() {
return this.err;} | 3.26 |
hadoop_FindOptions_setOut_rdh | /**
* Sets the output stream to be used.
*
* @param out
* output stream to be used
*/
public void setOut(PrintStream out) {
this.out = out;
} | 3.26 |
hadoop_FindOptions_setMaxDepth_rdh | /**
* Sets the maximum depth for applying expressions.
*
* @param maxDepth
* maximum depth
*/
public void setMaxDepth(int maxDepth) {
this.maxDepth = maxDepth;
} | 3.26 |
hadoop_FindOptions_setMinDepth_rdh | /**
* Sets the minimum depth for applying expressions.
*
* @param minDepth
* minimum depth
*/
public void setMinDepth(int minDepth) {
this.minDepth = minDepth;
} | 3.26 |
hadoop_BinaryEditsVisitor_start_rdh | /**
* Start the visitor (initialization)
*/@Override
public void start(int version) throws IOException {
} | 3.26 |
hadoop_BinaryEditsVisitor_close_rdh | /**
* Finish the visitor
*/
@Override
public void close(Throwable error) throws IOException {
elfos.setReadyToFlush();
elfos.flushAndSync(true);
elfos.close();
} | 3.26 |
hadoop_TimelineReaderWebServicesUtils_parseIntStr_rdh | /**
* Interpret passed string as a integer.
*
* @param str
* Passed string.
* @return integer representation if string is not null, null otherwise.
*/
static Integer parseIntStr(String str) {
return str == null ? null : Integer.parseInt(str.trim());
} | 3.26 |
hadoop_TimelineReaderWebServicesUtils_createTimelineEntityFilters_rdh | /**
* Parse the passed filters represented as strings and convert them into a
* {@link TimelineEntityFilters} object.
*
* @param limit
* Limit to number of entities to return.
* @param createdTimeStart
* Created time start for the entities to return.
* @param createdTimeEnd
* Created time end for the ent... | 3.26 |
hadoop_TimelineReaderWebServicesUtils_parseMetricFilters_rdh | /**
* Parses metric filters.
*
* @param expr
* Metric filter expression to be parsed.
* @return a {@link TimelineFilterList} object.
* @throws TimelineParseException
* if any problem occurs during parsing.
*/
static TimelineFilterList parseMetricFilters(String expr) throws
TimelineParseException {
retur... | 3.26 |
hadoop_TimelineReaderWebServicesUtils_createTimelineReaderContext_rdh | /**
* Parse the passed context information represented as strings and convert
* into a {@link TimelineReaderContext} object.
*
* @param clusterId
* Cluster Id.
* @param userId
* User Id.
* @param flowName
* Flow Name.
* @param flowRunId
* Run id for the flow.
* @param appId
* App Id.
* @param en... | 3.26 |
hadoop_TimelineReaderWebServicesUtils_parseDataToRetrieve_rdh | /**
* Parses confstoretrieve and metricstoretrieve.
*
* @param str
* String representing confs/metrics to retrieve expression.
* @return a {@link TimelineFilterList} object.
* @throws TimelineParseException
* if any problem occurs during parsing.
*/
static TimelineFilterList parseDataToRetrieve(String expr)... | 3.26 |
hadoop_TimelineReaderWebServicesUtils_parseStr_rdh | /**
* Trims the passed string if its not null.
*
* @param str
* Passed string.
* @return trimmed string if string is not null, null otherwise.
*/
static String parseStr(String str) {
return StringUtils.trimToNull(str);
} | 3.26 |
hadoop_TimelineReaderWebServicesUtils_getUser_rdh | /**
* Get UGI based on the remote user in the HTTP request.
*
* @param req
* HTTP request.
* @return UGI.
*/
public static UserGroupInformation getUser(HttpServletRequest req) {
Principal princ = req.getUserPrincipal();
String remoteUser = (princ == null) ? null : princ.getName();
UserGroupInformati... | 3.26 |
hadoop_TimelineReaderWebServicesUtils_parseLongStr_rdh | /**
* Interpret passed string as a long.
*
* @param str
* Passed string.
* @return long representation if string is not null, null otherwise.
*/
static Long parseLongStr(String str) {
return str == null ? null : Long.parseLong(str.trim());
} | 3.26 |
hadoop_TimelineReaderWebServicesUtils_parseEventFilters_rdh | /**
* Parse a delimited string and convert it into a set of strings. For
* instance, if delimiter is ",", then the string should be represented as
* "value1,value2,value3".
*
* @param str
* delimited string.
* @param delimiter
* string is delimited by this delimiter.
* @return set of strings.
*/
static Ti... | 3.26 |
hadoop_TimelineReaderWebServicesUtils_createTimelineDataToRetrieve_rdh | /**
* Parse the passed fields represented as strings and convert them into a
* {@link TimelineDataToRetrieve} object.
*
* @param confs
* confs to retrieve.
* @param metrics
* metrics to retrieve.
* @param fields
* fields to retrieve.
* @param metricsLimit
* upper limit on number of metrics to return.... | 3.26 |
hadoop_TimelineReaderWebServicesUtils_parseFieldsStr_rdh | /**
* Interprets passed string as set of fields delimited by passed delimiter.
* For instance, if delimiter is ",", then the passed string should be
* represented as "METRICS,CONFIGS" where the delimited parts of the string
* present in {@link Field}.
*
* @param str
* passed string.
* @param delimiter
* st... | 3.26 |
hadoop_TimelineReaderWebServicesUtils_getUserName_rdh | /**
* Get username from caller UGI.
*
* @param callerUGI
* caller UGI.
* @return username.
*/
static String getUserName(UserGroupInformation callerUGI) {return callerUGI != null
? callerUGI.getUserName().trim() : "";} | 3.26 |
hadoop_TimelineReaderWebServicesUtils_parseRelationFilters_rdh | /**
* Parse relation filters.
*
* @param expr
* Relation filter expression
* @return a {@link TimelineFilterList} object.
* @throws Exception
* if any problem occurs.
*/
static TimelineFilterList parseRelationFilters(String expr) throws TimelineParseException
{
return parseFilters(new TimelineParserForR... | 3.26 |
hadoop_TimelineReaderWebServicesUtils_parseKVFilters_rdh | /**
* Parses config and info filters.
*
* @param expr
* Expression to be parsed.
* @param valueAsString
* true, if value has to be interpreted as string, false
* otherwise. It is true for config filters and false for info filters.
* @return a {@link TimelineFilterList} object.
* @throws TimelineParseExce... | 3.26 |
hadoop_BoundDTExtension_getCanonicalServiceName_rdh | /**
* Get the canonical service name, which will be
* returned by {@code FileSystem.getCanonicalServiceName()} and so used to
* map the issued DT in credentials, including credential files collected
* for job submission.
*
* If null is returned: fall back to the default filesystem logic.
*
* Only invoked on {@l... | 3.26 |
hadoop_AuxServiceFile_srcFile_rdh | /**
* This provides the source location of the configuration file, the content
* of which is dumped to dest_file post property substitutions, in the format
* as specified in type. Typically the src_file would point to a source
* controlled network accessible file maintained by tools like puppet, chef,
* or hdfs et... | 3.26 |
hadoop_AuxServiceFile_toIndentedString_rdh | /**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return
"null";
}
return o.toString().replace("\n", "\n ");
} | 3.26 |
hadoop_AuxServiceFile_type_rdh | /**
* Config file in the standard format like xml, properties, json, yaml,
* template.
*/
public AuxServiceFile type(TypeEnum t) {
this.type
= t;
return this;
} | 3.26 |
hadoop_ReplicatedBlockStats_merge_rdh | /**
* Merge the multiple ReplicatedBlockStats.
*
* @param stats
* Collection of stats to merge.
* @return A new ReplicatedBlockStats merging all the input ones
*/public static ReplicatedBlockStats
merge(Collection<ReplicatedBlockStats> stats) {
long lowRedundancyBlocks = 0;
long corruptBlocks =
0;
... | 3.26 |
hadoop_TimelineDomains_addDomains_rdh | /**
* All a list of domains into the existing domain list
*
* @param domains
* a list of domains
*/
public void addDomains(List<TimelineDomain> domains) {
this.f0.addAll(domains);
} | 3.26 |
hadoop_TimelineDomains_setDomains_rdh | /**
* Set the domain list to the given list of domains
*
* @param domains
* a list of domains
*/
public void
setDomains(List<TimelineDomain> domains) {
this.f0 = domains;
} | 3.26 |
hadoop_TimelineDomains_addDomain_rdh | /**
* Add a single domain into the existing domain list
*
* @param domain
* a single domain
*/
public void addDomain(TimelineDomain domain) {
f0.add(domain);
} | 3.26 |
hadoop_TimelineDomains_getDomains_rdh | /**
* Get a list of domains
*
* @return a list of domains
*/
@XmlElement(name = "domains")
public List<TimelineDomain> getDomains() {
return f0;
} | 3.26 |
hadoop_BalanceJob_isJobDone_rdh | /**
* Return true if the job has finished.
*/
public boolean isJobDone() {
return jobDone;
} | 3.26 |
hadoop_BalanceJob_execute_rdh | /**
* Run the state machine.
*/
public void execute() {
boolean quit = false;
try { while (((!jobDone) && (!quit))
&& scheduler.isRunning())
{
if (f0 == null) {
// Job done.
finish(null);quit = true;
} else... | 3.26 |
hadoop_BalanceJob_nextProcedure_rdh | /**
* Append a procedure to the tail.
*/
public Builder nextProcedure(T procedure) {
int size = procedures.size();
if (size > 0) {
procedures.get(size -
1).setNextProcedure(procedure.name());
}
procedure.setNextProcedure(NEXT_PROCEDURE_NONE);
procedures.add(procedure); return this;... | 3.26 |
hadoop_BalanceJob_waitJobDone_rdh | /**
* Wait until the job is done.
*/
public synchronized void waitJobDone() throws InterruptedException {
while (!jobDone) {
wait();} } | 3.26 |
hadoop_BalanceJob_finish_rdh | /**
* Job finishes. It could be either success or failure.
*
* @param exception
* the exception that causes the job to fail. null indicates
* the job is successful.
*/
private synchronized void finish(Exception exception) {
assert !jobDone;
if (scheduler.jobDone(this)) {
jobDone = true;
err... | 3.26 |
hadoop_BalanceJob_shouldRemoveAfterDone_rdh | /**
* Whether this job should be removed after it's done.
*/
@VisibleForTestingpublic boolean shouldRemoveAfterDone() {
return removeAfterDone;
} | 3.26 |
hadoop_BalanceJob_getDetailMessage_rdh | /**
* Get the detail description of this job.
*/
public String getDetailMessage() {
StringBuilder builder = new StringBuilder();
builder.append("id=").append(id);
if (firstProcedure != null) {
builder.append(",firstProcedure=").append(firstProcedure);
}
if (f0 != null) {
builder.append(",currentProcedure="... | 3.26 |
hadoop_BalanceJob_getError_rdh | /**
* Return the error exception during the job execution. This should be called
* after the job finishes.
*/
public Exception getError() {
return error;
} | 3.26 |
hadoop_BalanceJob_removeAfterDone_rdh | /**
* Automatically remove this job from the scheduler cache when the job is
* done.
*/
public Builder removeAfterDone(boolean remove) {
removeAfterDone = remove;
return this;
} | 3.26 |
hadoop_BalanceJob_getId_rdh | /**
* Get the uid of the job.
*/
public String getId() {
return this.id;
} | 3.26 |
hadoop_RunnableCallable_call_rdh | /**
* Invokes the wrapped callable/runnable as a callable.
*
* @return void
* @throws Exception
* thrown by the wrapped callable/runnable invocation.
*/
@Override
public Void call() throws Exception {
if (runnable != null) {runnable.run();} else {
callable.call();
}
return null;
} | 3.26 |
hadoop_RunnableCallable_toString_rdh | /**
* Returns the class name of the wrapper callable/runnable.
*
* @return the class name of the wrapper callable/runnable.
*/
@Override
public String toString() {
return runnable != null ? runnable.getClass().getSimpleName() : callable.getClass().getSimpleName();
} | 3.26 |
hadoop_KerberosSecurityTestcase_createTestDir_rdh | /**
* Create a working directory, it should be the build directory. Under
* this directory an ApacheDS working directory will be created, this
* directory will be deleted when the MiniKdc stops.
*/
public void createTestDir() {
workDir = new
File(System.getProperty("test.dir", "target"));
} | 3.26 |
hadoop_KerberosSecurityTestcase_createMiniKdcConf_rdh | /**
* Create a Kdc configuration
*/
public void createMiniKdcConf() {
f0 = MiniKdc.createConf();
} | 3.26 |
hadoop_MRProtoUtils_convertToProtoFormat_rdh | /* TaskType */
public static TaskTypeProto convertToProtoFormat(TaskType e) {
return TaskTypeProto.valueOf(e.name());
} | 3.26 |
hadoop_SharedCacheManager_getSCMStore_rdh | /**
* For testing purposes only.
*/
@VisibleForTesting
SCMStore getSCMStore() {
return this.store;
} | 3.26 |
hadoop_DateSplitter_longToDate_rdh | /**
* Parse the long-valued timestamp into the appropriate SQL date type.
*/
private Date longToDate(long val,
int sqlDataType) {
switch (sqlDataType) {
case Types.DATE :
return new Date(val);
case Types.TIME :
return new Time(val);
case Types.TIMESTAMP :
return new Timestamp(val);... | 3.26 |
hadoop_DateSplitter_m0_rdh | /**
* Retrieve the value from the column in a type-appropriate manner and return
* its timestamp since the epoch. If the column is null, then return Long.MIN_VALUE.
* This will cause a special split to be generated for the NULL case, but may also
* cause poorly-balanced split... | 3.26 |
hadoop_Environment_toArray_rdh | // to be used with Runtime.exec(String[] cmdarray, String[] envp)
String[] toArray() {
String[] arr = new String[super.size()];
Enumeration<Object> it = super.keys();
int i = -1;
while (it.hasMoreElements()) {
String v12 = ((String) (it.nextElement()));
String val = ((String) (get(v12)))... | 3.26 |
hadoop_ReadaheadPool_submitReadahead_rdh | /**
* Submit a request to readahead on the given file descriptor.
*
* @param identifier
* a textual identifier used in error messages, etc.
* @param fd
* the file descriptor to readahead
* @param off
* the offset at which to start the readahead
* @param len
* the number of bytes to read
* @return an ... | 3.26 |
hadoop_ReadaheadPool_getInstance_rdh | /**
*
* @return Return the singleton instance for the current process.
*/
public static ReadaheadPool getInstance() {
synchronized(ReadaheadPool.class) {
if ((instance == null) && NativeIO.isAvailable()) {
instance = new ReadaheadPool();
}
return instance;
}
} | 3.26 |
hadoop_FieldSelectionMapReduce_map_rdh | /**
* The identify function. Input key/value pair is written directly to output.
*/
public void map(K key, V val, OutputCollector<Text, Text> output, Reporter reporter) throws IOException {
FieldSelectionHelper helper = new FieldSelectionHelper(FieldSelectionHelper.emptyText, FieldSelectionHelper.emptyText);
help... | 3.26 |
hadoop_EntityTableRW_setMetricsTTL_rdh | /**
*
* @param metricsTTL
* time to live parameter for the metricss in this table.
* @param hbaseConf
* configururation in which to set the metrics TTL config
* variable.
*/
public void setMetricsTTL(int metricsTTL, Configuration hbaseConf) {
hbaseConf.setInt(METRICS_TTL_CONF_NAME, metricsTTL);
} | 3.26 |
hadoop_Nfs3Constant_getValue_rdh | /**
*
* @return the int value representing the procedure.
*/
public int getValue() {
return ordinal();
} | 3.26 |
hadoop_TimelineEntityReaderFactory_createEntityTypeReader_rdh | /**
* Creates a timeline entity type reader that will read all available entity
* types within the specified context.
*
* @param context
* Reader context which defines the scope in which query has to
* be made. Limited to application level only.
* @return an <cite>EntityTypeReader</cite> object
*/
public st... | 3.26 |
hadoop_SharedKeyCredentials_canonicalizeHttpRequest_rdh | /**
* Constructs a canonicalized string from the request's headers that will be used to construct the signature string
* for signing a Blob or Queue service request under the Shared Key Full authentication scheme.
*
* @param address
* the request URI
* @param accountName
* the account name associated with th... | 3.26 |
hadoop_SharedKeyCredentials_getCanonicalizedResource_rdh | /**
* Gets the canonicalized resource string for a Blob or Queue service request under the Shared Key Lite
* authentication scheme.
*
* @param address
* the resource URI.
* @param accountName
* the account name for the request.
* @return the canonicalized resource string.
*/
private static String getCanoni... | 3.26 |
hadoop_SharedKeyCredentials_parseQueryString_rdh | /**
* Parses a query string into a one to many hashmap.
*
* @param parseString
* the string to parse
* @return a HashMap<String, String[]> of the key values.
*/
private static HashMap<String, String[]> parseQueryString(String parseString) throws UnsupportedEncodingException {
... | 3.26 |
hadoop_SharedKeyCredentials_canonicalize_rdh | /**
* Constructs a canonicalized string for signing a request.
*
* @param conn
* the HttpURLConnection to canonicalize
* @param accountName
* the account name associated with the request
* @param contentLength
* the length of the content written to the outputstream in bytes,
* -1 if unknown
* @return ... | 3.26 |
hadoop_SharedKeyCredentials_addCanonicalizedHeaders_rdh | /**
* Add x-ms- prefixed headers in a fixed order.
*
* @param conn
* the HttpURLConnection for the operation
* @param canonicalizedString
* the canonicalized string to add the canonicalized headerst to.
*/
private static void addCanonicalizedHeaders(final HttpURLConnection conn, final
StringBuilder canonical... | 3.26 |
hadoop_SharedKeyCredentials_appendCanonicalizedElement_rdh | /**
* Append a string to a string builder with a newline constant.
*
* @param builder
* the StringBuilder object
* @param element
* the string to append.
*/
private static void appendCanonicalizedElement(final StringBuilder builder, final String element) {
builder.append("\n");builder.append(element);
} | 3.26 |
hadoop_SharedKeyCredentials_initializeMac_rdh | /**
* Initialize the HmacSha256 associated with the account key.
*/
private void initializeMac() {
// Initializes the HMAC-SHA256 Mac and SecretKey.
try {
hmacSha256 = Mac.getInstance(HMAC_SHA256);
hmacSha256.init(new SecretKeySpec(accountKey, HMAC_SHA256));
} catch (final Exception e) {
... | 3.26 |
hadoop_SharedKeyCredentials_getGMTTime_rdh | /**
* Returns the current GMT date/time String using the RFC1123 pattern.
*
* @return A <code>String</code> that represents the current GMT date/time using the RFC1123 pattern.
*/
static String getGMTTime() {
return getGMTTime(new Date());
} | 3.26 |
hadoop_SharedKeyCredentials_initialValue_rdh | /**
* Thread local for storing GMT date format.
*/private static ThreadLocal<DateFormat> rfc1123GmtDateTimeFormatter = new ThreadLocal<DateFormat>() {
@Override
protected DateFormat initialValue() {
final DateFormat formatter
= new
SimpleDateFormat(RFC1123_PATTERN,
Locale.ROOT);
formatter.setTimeZone(GMT_ZONE);
ret... | 3.26 |
hadoop_ByteArray_buffer_rdh | /**
*
* @return the underlying buffer.
*/
@Override
public byte[] buffer() {
return buffer;
} | 3.26 |
hadoop_ByteArray_offset_rdh | /**
*
* @return the offset in the buffer.
*/
@Override
public int offset() {
return offset;
} | 3.26 |
hadoop_ByteArray_size_rdh | /**
*
* @return the size of the byte array.
*/
@Override
public int size() {
return len;
} | 3.26 |
hadoop_SignerManager_initCustomSigners_rdh | /**
* Initialize custom signers and register them with the AWS SDK.
*/
public void initCustomSigners() {
String[] customSigners = ownerConf.getTrimmedStrings(CUSTOM_SIGNERS);
if ((customSigners == null) || (customSigners.length == 0))
{
// No custom signers specified, nothing to do.
LOG.d... | 3.26 |
hadoop_MemoryMappableBlockLoader_load_rdh | /**
* Load the block.
*
* mmap and mlock the block, and then verify its checksum.
*
* @param length
* The current length of the block.
* @param blockIn
* The block input stream. Should be positioned at the
* start. The caller must close this.
* @param metaIn
* The meta file input stream. Should be po... | 3.26 |
hadoop_MapTaskImpl_getSplitsAsString_rdh | /**
*
* @return a String formatted as a comma-separated list of splits.
*/
@Override
protected String getSplitsAsString() {
String[] splits = getTaskSplitMetaInfo().getLocations();
if ((splits ==
null) || (splits.length == 0))
return "";
StringBuilder v1 = new StringBuilder();
for (int ... | 3.26 |
hadoop_LocalIdentityTransformer_transformIdentityForGetRequest_rdh | /**
* Perform identity transformation for the Get request results.
*
* @param originalIdentity
* the original user or group in the get request results: FileStatus, AclStatus.
* @param isUserName
* indicate whether the input originalIdentity is an owner name or owning group name.
* @param localIdentity
* t... | 3.26 |
hadoop_ReadBufferWorker_run_rdh | /**
* Waits until a buffer becomes available in ReadAheadQueue.
* Once a buffer becomes available, reads the file specified in it and then posts results back to buffer manager.
* Rinse and repeat. Forever.
*/
public void run() {
... | 3.26 |
hadoop_ReadBufferWorker_getId_rdh | /**
* return the ID of ReadBufferWorker.
*/
public int getId() {
return this.id;
} | 3.26 |
hadoop_TokenIdentifier_getTrackingId_rdh | /**
* Returns a tracking identifier that can be used to associate usages of a
* token across multiple client sessions.
*
* Currently, this function just returns an MD5 of {{@link #getBytes()}.
*
* @return tracking identifier
*/
public String getTrackingId() {
if (trackingId == null) {
trackingId = Di... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.