id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
119,800
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/GenericOptionsParser.java
GenericOptionsParser.buildGeneralOptions
@SuppressWarnings("static-access") private static Options buildGeneralOptions(Options opts) { Option fs = OptionBuilder.withArgName("local|namenode:port") .hasArg() .withDescription("specify a namenode") .create("fs"); Option jt = OptionBuilder.withArgName("local|jobtracker:port") .hasArg() ...
java
@SuppressWarnings("static-access") private static Options buildGeneralOptions(Options opts) { Option fs = OptionBuilder.withArgName("local|namenode:port") .hasArg() .withDescription("specify a namenode") .create("fs"); Option jt = OptionBuilder.withArgName("local|jobtracker:port") .hasArg() ...
[ "@", "SuppressWarnings", "(", "\"static-access\"", ")", "private", "static", "Options", "buildGeneralOptions", "(", "Options", "opts", ")", "{", "Option", "fs", "=", "OptionBuilder", ".", "withArgName", "(", "\"local|namenode:port\"", ")", ".", "hasArg", "(", ")",...
Specify properties of each generic option
[ "Specify", "properties", "of", "each", "generic", "option" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/GenericOptionsParser.java#L193-L235
119,801
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/GenericOptionsParser.java
GenericOptionsParser.processGeneralOptions
private void processGeneralOptions(Configuration conf, CommandLine line) { if (line.hasOption("fs")) { FileSystem.setDefaultUri(conf, line.getOptionValue("fs")); } if (line.hasOption("jt")) { conf.set("mapred.job.tracker", line.getOptionValue("jt")); } if (line.hasOption("conf")) ...
java
private void processGeneralOptions(Configuration conf, CommandLine line) { if (line.hasOption("fs")) { FileSystem.setDefaultUri(conf, line.getOptionValue("fs")); } if (line.hasOption("jt")) { conf.set("mapred.job.tracker", line.getOptionValue("jt")); } if (line.hasOption("conf")) ...
[ "private", "void", "processGeneralOptions", "(", "Configuration", "conf", ",", "CommandLine", "line", ")", "{", "if", "(", "line", ".", "hasOption", "(", "\"fs\"", ")", ")", "{", "FileSystem", ".", "setDefaultUri", "(", "conf", ",", "line", ".", "getOptionVa...
Modify configuration according user-specified generic options @param conf Configuration to be modified @param line User-specified generic options
[ "Modify", "configuration", "according", "user", "-", "specified", "generic", "options" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/GenericOptionsParser.java#L242-L291
119,802
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/GenericOptionsParser.java
GenericOptionsParser.getLibJars
public static URL[] getLibJars(Configuration conf) throws IOException { String jars = conf.get("tmpjars"); if(jars==null) { return null; } String[] files = jars.split(","); URL[] cp = new URL[files.length]; for (int i=0;i<cp.length;i++) { Path tmp = new Path(files[i]); cp[i] = ...
java
public static URL[] getLibJars(Configuration conf) throws IOException { String jars = conf.get("tmpjars"); if(jars==null) { return null; } String[] files = jars.split(","); URL[] cp = new URL[files.length]; for (int i=0;i<cp.length;i++) { Path tmp = new Path(files[i]); cp[i] = ...
[ "public", "static", "URL", "[", "]", "getLibJars", "(", "Configuration", "conf", ")", "throws", "IOException", "{", "String", "jars", "=", "conf", ".", "get", "(", "\"tmpjars\"", ")", ";", "if", "(", "jars", "==", "null", ")", "{", "return", "null", ";...
If libjars are set in the conf, parse the libjars. @param conf @return libjar urls @throws IOException
[ "If", "libjars", "are", "set", "in", "the", "conf", "parse", "the", "libjars", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/GenericOptionsParser.java#L299-L311
119,803
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/GenericOptionsParser.java
GenericOptionsParser.parseGeneralOptions
private String[] parseGeneralOptions(Options opts, Configuration conf, String[] args) { opts = buildGeneralOptions(opts); CommandLineParser parser = new GnuParser(); try { commandLine = parser.parse(opts, args, true); processGeneralOptions(conf, commandLine); return commandLine.getA...
java
private String[] parseGeneralOptions(Options opts, Configuration conf, String[] args) { opts = buildGeneralOptions(opts); CommandLineParser parser = new GnuParser(); try { commandLine = parser.parse(opts, args, true); processGeneralOptions(conf, commandLine); return commandLine.getA...
[ "private", "String", "[", "]", "parseGeneralOptions", "(", "Options", "opts", ",", "Configuration", "conf", ",", "String", "[", "]", "args", ")", "{", "opts", "=", "buildGeneralOptions", "(", "opts", ")", ";", "CommandLineParser", "parser", "=", "new", "GnuP...
Parse the user-specified options, get the generic options, and modify configuration accordingly @param conf Configuration to be modified @param args User-specified arguments @return Command-specific arguments
[ "Parse", "the", "user", "-", "specified", "options", "get", "the", "generic", "options", "and", "modify", "configuration", "accordingly" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/GenericOptionsParser.java#L369-L384
119,804
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/GenericOptionsParser.java
GenericOptionsParser.printGenericCommandUsage
public static void printGenericCommandUsage(PrintStream out) { out.println("Generic options supported are"); out.println("-conf <configuration file> specify an application configuration file"); out.println("-D <property=value> use value for given property"); out.println("-fs <local|n...
java
public static void printGenericCommandUsage(PrintStream out) { out.println("Generic options supported are"); out.println("-conf <configuration file> specify an application configuration file"); out.println("-D <property=value> use value for given property"); out.println("-fs <local|n...
[ "public", "static", "void", "printGenericCommandUsage", "(", "PrintStream", "out", ")", "{", "out", ".", "println", "(", "\"Generic options supported are\"", ")", ";", "out", ".", "println", "(", "\"-conf <configuration file> specify an application configuration file\"", ...
Print the usage message for generic command-line options supported. @param out stream to print the usage message to.
[ "Print", "the", "usage", "message", "for", "generic", "command", "-", "line", "options", "supported", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/GenericOptionsParser.java#L391-L407
119,805
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java
FaultManager.addNode
public void addNode(String name, Set<ResourceType> resourceTypes) { List<FaultStatsForType> faultStats = new ArrayList<FaultStatsForType>( resourceTypes.size()); for (ResourceType type : resourceTypes) { faultStats.add(new FaultStatsForType(type)); } nodeToFaultStats.put(name, faultStats);...
java
public void addNode(String name, Set<ResourceType> resourceTypes) { List<FaultStatsForType> faultStats = new ArrayList<FaultStatsForType>( resourceTypes.size()); for (ResourceType type : resourceTypes) { faultStats.add(new FaultStatsForType(type)); } nodeToFaultStats.put(name, faultStats);...
[ "public", "void", "addNode", "(", "String", "name", ",", "Set", "<", "ResourceType", ">", "resourceTypes", ")", "{", "List", "<", "FaultStatsForType", ">", "faultStats", "=", "new", "ArrayList", "<", "FaultStatsForType", ">", "(", "resourceTypes", ".", "size",...
Notify the fault manager of a new node. @param name The node name. @param resourceTypes The types of resource on this node.
[ "Notify", "the", "fault", "manager", "of", "a", "new", "node", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java#L115-L122
119,806
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java
FaultManager.nodeFeedback
public void nodeFeedback(String nodeName, List<ResourceType> resourceTypes, NodeUsageReport usageReport) { List<FaultStatsForType> faultStats = nodeToFaultStats.get(nodeName); if (faultStats == null) { LOG.info("Received node feedback for deleted node " + nodeName); return; } boolean s...
java
public void nodeFeedback(String nodeName, List<ResourceType> resourceTypes, NodeUsageReport usageReport) { List<FaultStatsForType> faultStats = nodeToFaultStats.get(nodeName); if (faultStats == null) { LOG.info("Received node feedback for deleted node " + nodeName); return; } boolean s...
[ "public", "void", "nodeFeedback", "(", "String", "nodeName", ",", "List", "<", "ResourceType", ">", "resourceTypes", ",", "NodeUsageReport", "usageReport", ")", "{", "List", "<", "FaultStatsForType", ">", "faultStats", "=", "nodeToFaultStats", ".", "get", "(", "...
Provide the fault manager with new feedback about a node. @param nodeName The node name. @param resourceTypes The types of resources used on the node. @param usageReport The {@link NodeUsageReport} for this node.
[ "Provide", "the", "fault", "manager", "with", "new", "feedback", "about", "a", "node", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java#L141-L171
119,807
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java
FaultManager.isBlacklisted
public boolean isBlacklisted(String nodeName, ResourceType type) { List<ResourceType> blacklistedResourceTypes = blacklistedNodes.get(nodeName); if (blacklistedResourceTypes != null) { synchronized (blacklistedResourceTypes) { return blacklistedResourceTypes.contains(type); } } els...
java
public boolean isBlacklisted(String nodeName, ResourceType type) { List<ResourceType> blacklistedResourceTypes = blacklistedNodes.get(nodeName); if (blacklistedResourceTypes != null) { synchronized (blacklistedResourceTypes) { return blacklistedResourceTypes.contains(type); } } els...
[ "public", "boolean", "isBlacklisted", "(", "String", "nodeName", ",", "ResourceType", "type", ")", "{", "List", "<", "ResourceType", ">", "blacklistedResourceTypes", "=", "blacklistedNodes", ".", "get", "(", "nodeName", ")", ";", "if", "(", "blacklistedResourceTyp...
Check if a resource on a node is blacklisted. @param nodeName The node name. @param type The type of resource to check for blacklisting. @return A boolean value that is true if blacklisted, false if not.
[ "Check", "if", "a", "resource", "on", "a", "node", "is", "blacklisted", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java#L191-L201
119,808
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java
FaultManager.getBlacklistedNodes
public List<String> getBlacklistedNodes() { List<String> ret = new ArrayList<String>(); for (String nodeName : blacklistedNodes.keySet()) { ret.add(nodeName); } return ret; }
java
public List<String> getBlacklistedNodes() { List<String> ret = new ArrayList<String>(); for (String nodeName : blacklistedNodes.keySet()) { ret.add(nodeName); } return ret; }
[ "public", "List", "<", "String", ">", "getBlacklistedNodes", "(", ")", "{", "List", "<", "String", ">", "ret", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "String", "nodeName", ":", "blacklistedNodes", ".", "keySet", "(", ")...
Return the list of blacklisted nodes. @return The list of blacklisted nodes.
[ "Return", "the", "list", "of", "blacklisted", "nodes", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java#L215-L221
119,809
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java
FaultManager.blacklistIfNeeded
private void blacklistIfNeeded( String nodeName, List<FaultStatsForType> faultStats) { for (FaultStatsForType stat : faultStats) { if (isBlacklisted(nodeName, stat.type)) { continue; } if (tooManyFailuresOnNode(stat) || tooManyConnectionFailuresOnNode(stat)) { nm....
java
private void blacklistIfNeeded( String nodeName, List<FaultStatsForType> faultStats) { for (FaultStatsForType stat : faultStats) { if (isBlacklisted(nodeName, stat.type)) { continue; } if (tooManyFailuresOnNode(stat) || tooManyConnectionFailuresOnNode(stat)) { nm....
[ "private", "void", "blacklistIfNeeded", "(", "String", "nodeName", ",", "List", "<", "FaultStatsForType", ">", "faultStats", ")", "{", "for", "(", "FaultStatsForType", "stat", ":", "faultStats", ")", "{", "if", "(", "isBlacklisted", "(", "nodeName", ",", "stat...
Checks if a node needs to be blacklisted and blacklists it. @param nodeName The node name. @param faultStats The fault statistics for the node.
[ "Checks", "if", "a", "node", "needs", "to", "be", "blacklisted", "and", "blacklists", "it", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java#L228-L240
119,810
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java
FaultManager.blacklist
private void blacklist(String nodeName, ResourceType type) { List<ResourceType> blacklistedResourceTypes = blacklistedNodes.get(nodeName); if (blacklistedResourceTypes == null) { blacklistedResourceTypes = new ArrayList<ResourceType>(); blacklistedNodes.put(nodeName, blacklistedResourceTypes);...
java
private void blacklist(String nodeName, ResourceType type) { List<ResourceType> blacklistedResourceTypes = blacklistedNodes.get(nodeName); if (blacklistedResourceTypes == null) { blacklistedResourceTypes = new ArrayList<ResourceType>(); blacklistedNodes.put(nodeName, blacklistedResourceTypes);...
[ "private", "void", "blacklist", "(", "String", "nodeName", ",", "ResourceType", "type", ")", "{", "List", "<", "ResourceType", ">", "blacklistedResourceTypes", "=", "blacklistedNodes", ".", "get", "(", "nodeName", ")", ";", "if", "(", "blacklistedResourceTypes", ...
Blacklists a resource on a node. @param nodeName The node name. @param type The type of the resource.
[ "Blacklists", "a", "resource", "on", "a", "node", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java#L247-L259
119,811
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java
FSPermissionChecker.checkPermission
void checkPermission(String path, INode[] inodes, boolean doCheckOwner, FsAction ancestorAccess, FsAction parentAccess, FsAction access, FsAction subAccess) throws AccessControlException { if (LOG.isDebugEnabled()) { LOG.debug("ACCESS CHECK: " + this + ", doCheckOwner=" + doCheckOwner ...
java
void checkPermission(String path, INode[] inodes, boolean doCheckOwner, FsAction ancestorAccess, FsAction parentAccess, FsAction access, FsAction subAccess) throws AccessControlException { if (LOG.isDebugEnabled()) { LOG.debug("ACCESS CHECK: " + this + ", doCheckOwner=" + doCheckOwner ...
[ "void", "checkPermission", "(", "String", "path", ",", "INode", "[", "]", "inodes", ",", "boolean", "doCheckOwner", ",", "FsAction", "ancestorAccess", ",", "FsAction", "parentAccess", ",", "FsAction", "access", ",", "FsAction", "subAccess", ")", "throws", "Acces...
Check whether current user have permissions to access the path. Traverse is always checked. Parent path means the parent directory for the path. Ancestor path means the last (the closest) existing ancestor directory of the path. Note that if the parent path exists, then the parent path and the ancestor path are the sa...
[ "Check", "whether", "current", "user", "have", "permissions", "to", "access", "the", "path", ".", "Traverse", "is", "always", "checked", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java#L69-L101
119,812
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/util/WebUtils.java
WebUtils.convertResourceTypesToStrings
public static Collection<String> convertResourceTypesToStrings( Collection<ResourceType> resourceTypes) { List<String> retList = new ArrayList<String>(resourceTypes.size()); for (ResourceType resourceType : resourceTypes) { retList.add(resourceType.toString()); } return retList; }
java
public static Collection<String> convertResourceTypesToStrings( Collection<ResourceType> resourceTypes) { List<String> retList = new ArrayList<String>(resourceTypes.size()); for (ResourceType resourceType : resourceTypes) { retList.add(resourceType.toString()); } return retList; }
[ "public", "static", "Collection", "<", "String", ">", "convertResourceTypesToStrings", "(", "Collection", "<", "ResourceType", ">", "resourceTypes", ")", "{", "List", "<", "String", ">", "retList", "=", "new", "ArrayList", "<", "String", ">", "(", "resourceTypes...
Convert resource types of a collection of String objects @param resourceTypes Collection of types to convert @return Collection of resource types
[ "Convert", "resource", "types", "of", "a", "collection", "of", "String", "objects" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/util/WebUtils.java#L88-L96
119,813
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/util/WebUtils.java
WebUtils.validateAttributeNames
public static String validateAttributeNames( Enumeration<String> attributeNames) { while (attributeNames.hasMoreElements()) { String attribute = attributeNames.nextElement(); if (!attribute.equals("users") && !attribute.equals("poolGroups") && !attribute.equals("poolInfos") && !attribute...
java
public static String validateAttributeNames( Enumeration<String> attributeNames) { while (attributeNames.hasMoreElements()) { String attribute = attributeNames.nextElement(); if (!attribute.equals("users") && !attribute.equals("poolGroups") && !attribute.equals("poolInfos") && !attribute...
[ "public", "static", "String", "validateAttributeNames", "(", "Enumeration", "<", "String", ">", "attributeNames", ")", "{", "while", "(", "attributeNames", ".", "hasMoreElements", "(", ")", ")", "{", "String", "attribute", "=", "attributeNames", ".", "nextElement"...
Check the attribute names @param attributeNames Atttribute names to check @return Null if all attribute names are invalid, non-empty if the check failed, with an appropriate error message
[ "Check", "the", "attribute", "names" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/util/WebUtils.java#L134-L148
119,814
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/util/WebUtils.java
WebUtils.isValidKillSessionsToken
public static boolean isValidKillSessionsToken(String token) { if (token == null || token.isEmpty()) { return false; } for (String validToken:VALID_TOKENS) { if (token.equals (validToken)) { return true; } } return false; }
java
public static boolean isValidKillSessionsToken(String token) { if (token == null || token.isEmpty()) { return false; } for (String validToken:VALID_TOKENS) { if (token.equals (validToken)) { return true; } } return false; }
[ "public", "static", "boolean", "isValidKillSessionsToken", "(", "String", "token", ")", "{", "if", "(", "token", "==", "null", "||", "token", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", "for", "(", "String", "validToken", ":", "VALID...
Check if the kill sessions token is a valid one @param token The value of user supplied token @return true for valid, false for invalid
[ "Check", "if", "the", "kill", "sessions", "token", "is", "a", "valid", "one" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/util/WebUtils.java#L157-L169
119,815
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/util/WebUtils.java
WebUtils.getJspParameterFilters
public static JspParameterFilters getJspParameterFilters( String userFilter, String poolGroupFilter, String poolInfoFilter) { JspParameterFilters filters = new JspParameterFilters(); if (userFilter != null && !userFilter.equals("null")) { filters.getUserFilterSet().addAll(Arrays.asList(u...
java
public static JspParameterFilters getJspParameterFilters( String userFilter, String poolGroupFilter, String poolInfoFilter) { JspParameterFilters filters = new JspParameterFilters(); if (userFilter != null && !userFilter.equals("null")) { filters.getUserFilterSet().addAll(Arrays.asList(u...
[ "public", "static", "JspParameterFilters", "getJspParameterFilters", "(", "String", "userFilter", ",", "String", "poolGroupFilter", ",", "String", "poolInfoFilter", ")", "{", "JspParameterFilters", "filters", "=", "new", "JspParameterFilters", "(", ")", ";", "if", "("...
Convert the parameters to filters and html output @param userFilter User filter parameter @param poolGroupFilter Pool group filter parameter @param poolInfoFilter Pool info filter parameter @return Filters
[ "Convert", "the", "parameters", "to", "filters", "and", "html", "output" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/util/WebUtils.java#L178-L205
119,816
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java
ZlibCompressor.setInputFromSavedData
synchronized void setInputFromSavedData() { int len = Math.min(userBufLen, uncompressedDirectBuf.remaining()); ((ByteBuffer)uncompressedDirectBuf).put(userBuf, userBufOff, len); userBufLen -= len; userBufOff += len; uncompressedDirectBufLen = uncompressedDirectBuf.position(); }
java
synchronized void setInputFromSavedData() { int len = Math.min(userBufLen, uncompressedDirectBuf.remaining()); ((ByteBuffer)uncompressedDirectBuf).put(userBuf, userBufOff, len); userBufLen -= len; userBufOff += len; uncompressedDirectBufLen = uncompressedDirectBuf.position(); }
[ "synchronized", "void", "setInputFromSavedData", "(", ")", "{", "int", "len", "=", "Math", ".", "min", "(", "userBufLen", ",", "uncompressedDirectBuf", ".", "remaining", "(", ")", ")", ";", "(", "(", "ByteBuffer", ")", "uncompressedDirectBuf", ")", ".", "put...
copy enough data from userBuf to uncompressedDirectBuf
[ "copy", "enough", "data", "from", "userBuf", "to", "uncompressedDirectBuf" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java#L238-L244
119,817
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/util/AtomicFileOutputStream.java
AtomicFileOutputStream.abort
public void abort() { try { super.close(); } catch (IOException ioe) { LOG.warn("Unable to abort file " + tmpFile, ioe); } if (!tmpFile.delete()) { LOG.warn("Unable to delete tmp file during abort " + tmpFile); } }
java
public void abort() { try { super.close(); } catch (IOException ioe) { LOG.warn("Unable to abort file " + tmpFile, ioe); } if (!tmpFile.delete()) { LOG.warn("Unable to delete tmp file during abort " + tmpFile); } }
[ "public", "void", "abort", "(", ")", "{", "try", "{", "super", ".", "close", "(", ")", ";", "}", "catch", "(", "IOException", "ioe", ")", "{", "LOG", ".", "warn", "(", "\"Unable to abort file \"", "+", "tmpFile", ",", "ioe", ")", ";", "}", "if", "(...
Close the atomic file, but do not "commit" the temporary file on top of the destination. This should be used if there is a failure in writing.
[ "Close", "the", "atomic", "file", "but", "do", "not", "commit", "the", "temporary", "file", "on", "top", "of", "the", "destination", ".", "This", "should", "be", "used", "if", "there", "is", "a", "failure", "in", "writing", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/util/AtomicFileOutputStream.java#L99-L108
119,818
facebookarchive/hadoop-20
src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java
SimulatorJobTracker.startTracker
public static SimulatorJobTracker startTracker(JobConf conf, long startTime, SimulatorEngine engine) throws IOException { SimulatorJobTracker result = null; try { SimulatorClock simClock = new SimulatorClock(startTime); result = new SimulatorJobTracker(conf, simClock, engine); result.taskSch...
java
public static SimulatorJobTracker startTracker(JobConf conf, long startTime, SimulatorEngine engine) throws IOException { SimulatorJobTracker result = null; try { SimulatorClock simClock = new SimulatorClock(startTime); result = new SimulatorJobTracker(conf, simClock, engine); result.taskSch...
[ "public", "static", "SimulatorJobTracker", "startTracker", "(", "JobConf", "conf", ",", "long", "startTime", ",", "SimulatorEngine", "engine", ")", "throws", "IOException", "{", "SimulatorJobTracker", "result", "=", "null", ";", "try", "{", "SimulatorClock", "simClo...
Starts the JobTracker with given configuration and a given time. It also starts the JobNotifier thread. @param conf the starting configuration of the SimulatorJobTracker. @param startTime the starting time of simulation -- this is used to initialize the clock. @param engine the SimulatorEngine that we talk to. @throws ...
[ "Starts", "the", "JobTracker", "with", "given", "configuration", "and", "a", "given", "time", ".", "It", "also", "starts", "the", "JobNotifier", "thread", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java#L94-L113
119,819
facebookarchive/hadoop-20
src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java
SimulatorJobTracker.startTracker
public static SimulatorJobTracker startTracker(JobConf conf, long startTime) throws IOException, InterruptedException { return startTracker(conf, startTime, new SimulatorEngine()); }
java
public static SimulatorJobTracker startTracker(JobConf conf, long startTime) throws IOException, InterruptedException { return startTracker(conf, startTime, new SimulatorEngine()); }
[ "public", "static", "SimulatorJobTracker", "startTracker", "(", "JobConf", "conf", ",", "long", "startTime", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "startTracker", "(", "conf", ",", "startTime", ",", "new", "SimulatorEngine", "(", ...
Start the SimulatorJobTracker with given configuration after creating its own SimulatorEngine. Pretty much used for debugging only. @param conf :The starting configuration of the SimulatorJobTracker @param startTime :The starting time of simulation @return void @throws IOException @throws InterruptedException
[ "Start", "the", "SimulatorJobTracker", "with", "given", "configuration", "after", "creating", "its", "own", "SimulatorEngine", ".", "Pretty", "much", "used", "for", "debugging", "only", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java#L125-L128
119,820
facebookarchive/hadoop-20
src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java
SimulatorJobTracker.getClock
static Clock getClock() { assert(engine.getCurrentTime() == clock.getTime()): " Engine time = " + engine.getCurrentTime() + " JobTracker time = " + clock.getTime(); return clock; }
java
static Clock getClock() { assert(engine.getCurrentTime() == clock.getTime()): " Engine time = " + engine.getCurrentTime() + " JobTracker time = " + clock.getTime(); return clock; }
[ "static", "Clock", "getClock", "(", ")", "{", "assert", "(", "engine", ".", "getCurrentTime", "(", ")", "==", "clock", ".", "getTime", "(", ")", ")", ":", "\" Engine time = \"", "+", "engine", ".", "getCurrentTime", "(", ")", "+", "\" JobTracker time = \"", ...
Returns the simulatorClock in that is a static object in SimulatorJobTracker. @return SimulatorClock object.
[ "Returns", "the", "simulatorClock", "in", "that", "is", "a", "static", "object", "in", "SimulatorJobTracker", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java#L144-L149
119,821
facebookarchive/hadoop-20
src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java
SimulatorJobTracker.cleanupJob
private void cleanupJob(JobInProgress job) { cleanupQueue.add(job.getJobID()); while(cleanupQueue.size()> JOBS_IN_MUMAK_MEMORY) { JobID removedJob = cleanupQueue.poll(); // retireJob(removedJob, ""); } }
java
private void cleanupJob(JobInProgress job) { cleanupQueue.add(job.getJobID()); while(cleanupQueue.size()> JOBS_IN_MUMAK_MEMORY) { JobID removedJob = cleanupQueue.poll(); // retireJob(removedJob, ""); } }
[ "private", "void", "cleanupJob", "(", "JobInProgress", "job", ")", "{", "cleanupQueue", ".", "add", "(", "job", ".", "getJobID", "(", ")", ")", ";", "while", "(", "cleanupQueue", ".", "size", "(", ")", ">", "JOBS_IN_MUMAK_MEMORY", ")", "{", "JobID", "rem...
The cleanupJob method maintains the queue cleanQueue. When a job is finalized, it is added to the cleanupQueue. Jobs are removed from the cleanupQueue so that its size is maintained to be less than that specified by JOBS_IN_MUMAK_MEMORY. @param job : The JobInProgress object that was just finalized and is going to be a...
[ "The", "cleanupJob", "method", "maintains", "the", "queue", "cleanQueue", ".", "When", "a", "job", "is", "finalized", "it", "is", "added", "to", "the", "cleanupQueue", ".", "Jobs", "are", "removed", "from", "the", "cleanupQueue", "so", "that", "its", "size",...
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java#L249-L257
119,822
facebookarchive/hadoop-20
src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java
SimulatorJobTracker.validateAndSetClock
private void validateAndSetClock(long newSimulationTime) { // We do not use the getClock routine here as // the Engine and JobTracker clocks are different at // this point. long currentSimulationTime = clock.getTime(); if (newSimulationTime < currentSimulationTime) { // time has gone...
java
private void validateAndSetClock(long newSimulationTime) { // We do not use the getClock routine here as // the Engine and JobTracker clocks are different at // this point. long currentSimulationTime = clock.getTime(); if (newSimulationTime < currentSimulationTime) { // time has gone...
[ "private", "void", "validateAndSetClock", "(", "long", "newSimulationTime", ")", "{", "// We do not use the getClock routine here as ", "// the Engine and JobTracker clocks are different at", "// this point.", "long", "currentSimulationTime", "=", "clock", ".", "getTime", "(", ")...
Utility to validate the current simulation time @param newSimulationTime
[ "Utility", "to", "validate", "the", "current", "simulation", "time" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java#L311-L331
119,823
facebookarchive/hadoop-20
src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java
SimulatorJobTracker.getMapCompletionTasks
private List<TaskTrackerAction> getMapCompletionTasks( TaskTrackerStatus status, List<TaskTrackerAction> tasksToKill) { boolean loggingEnabled = LOG.isDebugEnabled(); // Build up the list of tasks about to be killed Set<TaskAttemptID> killedTasks = new HashSet<TaskAttemptID>(); if (tas...
java
private List<TaskTrackerAction> getMapCompletionTasks( TaskTrackerStatus status, List<TaskTrackerAction> tasksToKill) { boolean loggingEnabled = LOG.isDebugEnabled(); // Build up the list of tasks about to be killed Set<TaskAttemptID> killedTasks = new HashSet<TaskAttemptID>(); if (tas...
[ "private", "List", "<", "TaskTrackerAction", ">", "getMapCompletionTasks", "(", "TaskTrackerStatus", "status", ",", "List", "<", "TaskTrackerAction", ">", "tasksToKill", ")", "{", "boolean", "loggingEnabled", "=", "LOG", ".", "isDebugEnabled", "(", ")", ";", "// B...
The getMapCompletion method is intended to inform taskTrackes when to change the status of reduce tasks from "shuffle" to "reduce". For all reduce tasks in this TaskTracker that are in the shuffle phase, getMapCompletionTasks finds the number of finished maps for this job from the jobInProgress object. If this number e...
[ "The", "getMapCompletion", "method", "is", "intended", "to", "inform", "taskTrackes", "when", "to", "change", "the", "status", "of", "reduce", "tasks", "from", "shuffle", "to", "reduce", ".", "For", "all", "reduce", "tasks", "in", "this", "TaskTracker", "that"...
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorJobTracker.java#L533-L611
119,824
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalInputStream.java
BookKeeperJournalInputStream.nextEntryStream
private InputStream nextEntryStream() throws IOException { long nextLedgerEntryId = currentStreamState.getNextLedgerEntryId(); if (nextLedgerEntryId > maxLedgerEntryIdSeen) { updateMaxLedgerEntryIdSeen(); if (nextLedgerEntryId > maxLedgerEntryIdSeen) { // Return null if we've reached the end...
java
private InputStream nextEntryStream() throws IOException { long nextLedgerEntryId = currentStreamState.getNextLedgerEntryId(); if (nextLedgerEntryId > maxLedgerEntryIdSeen) { updateMaxLedgerEntryIdSeen(); if (nextLedgerEntryId > maxLedgerEntryIdSeen) { // Return null if we've reached the end...
[ "private", "InputStream", "nextEntryStream", "(", ")", "throws", "IOException", "{", "long", "nextLedgerEntryId", "=", "currentStreamState", ".", "getNextLedgerEntryId", "(", ")", ";", "if", "(", "nextLedgerEntryId", ">", "maxLedgerEntryIdSeen", ")", "{", "updateMaxLe...
a new stream for a new ledger entry
[ "a", "new", "stream", "for", "a", "new", "ledger", "entry" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalInputStream.java#L155-L193
119,825
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalInputStream.java
BookKeeperJournalInputStream.position
public void position(long position) throws IOException { if (position == 0) { currentStreamState.setNextLedgerEntryId(firstLedgerEntryId); currentStreamState.setOffsetInEntry(0); entryStream = null; } else if (savedStreamState == null || position != savedStreamState.getReaderPosition()...
java
public void position(long position) throws IOException { if (position == 0) { currentStreamState.setNextLedgerEntryId(firstLedgerEntryId); currentStreamState.setOffsetInEntry(0); entryStream = null; } else if (savedStreamState == null || position != savedStreamState.getReaderPosition()...
[ "public", "void", "position", "(", "long", "position", ")", "throws", "IOException", "{", "if", "(", "position", "==", "0", ")", "{", "currentStreamState", ".", "setNextLedgerEntryId", "(", "firstLedgerEntryId", ")", ";", "currentStreamState", ".", "setOffsetInEnt...
"Go back" to the specified reader position by resetting the reader a saved state associated with that position. @param position The reader position we want to go back to @throws IllegalArgumentException If an illegal position is specified @throws IOException If there is an error communicating with BookKeeper
[ "Go", "back", "to", "the", "specified", "reader", "position", "by", "resetting", "the", "reader", "a", "saved", "state", "associated", "with", "that", "position", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalInputStream.java#L258-L303
119,826
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/RaidShell.java
RaidShell.verifyParity
private void verifyParity(String[] args, int startIndex) { boolean restoreReplication = false; int repl = -1; Path root = null; for (int i = startIndex; i < args.length; i++) { String arg = args[i]; if (arg.equals("-restore")) { restoreReplication = true; } else if (arg.equals(...
java
private void verifyParity(String[] args, int startIndex) { boolean restoreReplication = false; int repl = -1; Path root = null; for (int i = startIndex; i < args.length; i++) { String arg = args[i]; if (arg.equals("-restore")) { restoreReplication = true; } else if (arg.equals(...
[ "private", "void", "verifyParity", "(", "String", "[", "]", "args", ",", "int", "startIndex", ")", "{", "boolean", "restoreReplication", "=", "false", ";", "int", "repl", "=", "-", "1", ";", "Path", "root", "=", "null", ";", "for", "(", "int", "i", "...
search each parity and verify the source files have the expected replication
[ "search", "each", "parity", "and", "verify", "the", "source", "files", "have", "the", "expected", "replication" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/RaidShell.java#L649-L701
119,827
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/RaidShell.java
RaidShell.recover
public Path[] recover(String cmd, String argv[], int startindex) throws IOException { Path[] paths = new Path[(argv.length - startindex) / 2]; int j = 0; for (int i = startindex; i < argv.length; i = i + 2) { String path = argv[i]; long corruptOffset = Long.parseLong(argv[i+1]); LOG.in...
java
public Path[] recover(String cmd, String argv[], int startindex) throws IOException { Path[] paths = new Path[(argv.length - startindex) / 2]; int j = 0; for (int i = startindex; i < argv.length; i = i + 2) { String path = argv[i]; long corruptOffset = Long.parseLong(argv[i+1]); LOG.in...
[ "public", "Path", "[", "]", "recover", "(", "String", "cmd", ",", "String", "argv", "[", "]", ",", "int", "startindex", ")", "throws", "IOException", "{", "Path", "[", "]", "paths", "=", "new", "Path", "[", "(", "argv", ".", "length", "-", "startinde...
Recovers the specified path from the parity file
[ "Recovers", "the", "specified", "path", "from", "the", "parity", "file" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/RaidShell.java#L797-L823
119,828
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/RaidShell.java
RaidShell.isFileCorrupt
protected boolean isFileCorrupt(final DistributedFileSystem dfs, final FileStatus fileStat) throws IOException { return isFileCorrupt(dfs, fileStat, false, conf, this.numNonRaidedMissingBlks, this.numStrpMissingBlksMap); }
java
protected boolean isFileCorrupt(final DistributedFileSystem dfs, final FileStatus fileStat) throws IOException { return isFileCorrupt(dfs, fileStat, false, conf, this.numNonRaidedMissingBlks, this.numStrpMissingBlksMap); }
[ "protected", "boolean", "isFileCorrupt", "(", "final", "DistributedFileSystem", "dfs", ",", "final", "FileStatus", "fileStat", ")", "throws", "IOException", "{", "return", "isFileCorrupt", "(", "dfs", ",", "fileStat", ",", "false", ",", "conf", ",", "this", ".",...
checks whether a file has more than the allowable number of corrupt blocks and must therefore be considered corrupt
[ "checks", "whether", "a", "file", "has", "more", "than", "the", "allowable", "number", "of", "corrupt", "blocks", "and", "must", "therefore", "be", "considered", "corrupt" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/RaidShell.java#L1015-L1020
119,829
facebookarchive/hadoop-20
src/core/org/apache/hadoop/ipc/FastProtocolRegister.java
FastProtocolRegister.tryGetMethod
public static Method tryGetMethod(String id) { if (id.length() != NAME_LEN) { // we use it to fast discard the request without doing map lookup return null; } return idToMethod.get(id); }
java
public static Method tryGetMethod(String id) { if (id.length() != NAME_LEN) { // we use it to fast discard the request without doing map lookup return null; } return idToMethod.get(id); }
[ "public", "static", "Method", "tryGetMethod", "(", "String", "id", ")", "{", "if", "(", "id", ".", "length", "(", ")", "!=", "NAME_LEN", ")", "{", "// we use it to fast discard the request without doing map lookup", "return", "null", ";", "}", "return", "idToMetho...
Tries to get a method given the id. Returns null if no such method is registered.
[ "Tries", "to", "get", "a", "method", "given", "the", "id", ".", "Returns", "null", "if", "no", "such", "method", "is", "registered", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/ipc/FastProtocolRegister.java#L92-L98
119,830
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/Job.java
Job.setCombinerClass
public void setCombinerClass(Class<? extends Reducer> cls ) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setClass(COMBINE_CLASS_ATTR, cls, Reducer.class); }
java
public void setCombinerClass(Class<? extends Reducer> cls ) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setClass(COMBINE_CLASS_ATTR, cls, Reducer.class); }
[ "public", "void", "setCombinerClass", "(", "Class", "<", "?", "extends", "Reducer", ">", "cls", ")", "throws", "IllegalStateException", "{", "ensureState", "(", "JobState", ".", "DEFINE", ")", ";", "conf", ".", "setClass", "(", "COMBINE_CLASS_ATTR", ",", "cls"...
Set the combiner class for the job. @param cls the combiner to use @throws IllegalStateException if the job is submitted
[ "Set", "the", "combiner", "class", "for", "the", "job", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/Job.java#L150-L154
119,831
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/Job.java
Job.setMapOutputKeyClass
public void setMapOutputKeyClass(Class<?> theClass ) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setMapOutputKeyClass(theClass); }
java
public void setMapOutputKeyClass(Class<?> theClass ) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setMapOutputKeyClass(theClass); }
[ "public", "void", "setMapOutputKeyClass", "(", "Class", "<", "?", ">", "theClass", ")", "throws", "IllegalStateException", "{", "ensureState", "(", "JobState", ".", "DEFINE", ")", ";", "conf", ".", "setMapOutputKeyClass", "(", "theClass", ")", ";", "}" ]
Set the key class for the map output data. This allows the user to specify the map output key class to be different than the final output value class. @param theClass the map output key class. @throws IllegalStateException if the job is submitted
[ "Set", "the", "key", "class", "for", "the", "map", "output", "data", ".", "This", "allows", "the", "user", "to", "specify", "the", "map", "output", "key", "class", "to", "be", "different", "than", "the", "final", "output", "value", "class", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/Job.java#L186-L190
119,832
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/Job.java
Job.setMapOutputValueClass
public void setMapOutputValueClass(Class<?> theClass ) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setMapOutputValueClass(theClass); }
java
public void setMapOutputValueClass(Class<?> theClass ) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setMapOutputValueClass(theClass); }
[ "public", "void", "setMapOutputValueClass", "(", "Class", "<", "?", ">", "theClass", ")", "throws", "IllegalStateException", "{", "ensureState", "(", "JobState", ".", "DEFINE", ")", ";", "conf", ".", "setMapOutputValueClass", "(", "theClass", ")", ";", "}" ]
Set the value class for the map output data. This allows the user to specify the map output value class to be different than the final output value class. @param theClass the map output value class. @throws IllegalStateException if the job is submitted
[ "Set", "the", "value", "class", "for", "the", "map", "output", "data", ".", "This", "allows", "the", "user", "to", "specify", "the", "map", "output", "value", "class", "to", "be", "different", "than", "the", "final", "output", "value", "class", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/Job.java#L200-L204
119,833
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/Job.java
Job.setOutputKeyClass
public void setOutputKeyClass(Class<?> theClass ) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setOutputKeyClass(theClass); }
java
public void setOutputKeyClass(Class<?> theClass ) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setOutputKeyClass(theClass); }
[ "public", "void", "setOutputKeyClass", "(", "Class", "<", "?", ">", "theClass", ")", "throws", "IllegalStateException", "{", "ensureState", "(", "JobState", ".", "DEFINE", ")", ";", "conf", ".", "setOutputKeyClass", "(", "theClass", ")", ";", "}" ]
Set the key class for the job output data. @param theClass the key class for the job output data. @throws IllegalStateException if the job is submitted
[ "Set", "the", "key", "class", "for", "the", "job", "output", "data", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/Job.java#L212-L216
119,834
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/Job.java
Job.setOutputValueClass
public void setOutputValueClass(Class<?> theClass ) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setOutputValueClass(theClass); }
java
public void setOutputValueClass(Class<?> theClass ) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setOutputValueClass(theClass); }
[ "public", "void", "setOutputValueClass", "(", "Class", "<", "?", ">", "theClass", ")", "throws", "IllegalStateException", "{", "ensureState", "(", "JobState", ".", "DEFINE", ")", ";", "conf", ".", "setOutputValueClass", "(", "theClass", ")", ";", "}" ]
Set the value class for job outputs. @param theClass the value class for job outputs. @throws IllegalStateException if the job is submitted
[ "Set", "the", "value", "class", "for", "job", "outputs", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/Job.java#L224-L228
119,835
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/Job.java
Job.setJobName
public void setJobName(String name) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setJobName(name); }
java
public void setJobName(String name) throws IllegalStateException { ensureState(JobState.DEFINE); conf.setJobName(name); }
[ "public", "void", "setJobName", "(", "String", "name", ")", "throws", "IllegalStateException", "{", "ensureState", "(", "JobState", ".", "DEFINE", ")", ";", "conf", ".", "setJobName", "(", "name", ")", ";", "}" ]
Set the user-specified job name. @param name the job's new name. @throws IllegalStateException if the job is submitted
[ "Set", "the", "user", "-", "specified", "job", "name", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/Job.java#L262-L265
119,836
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/Job.java
Job.killTask
public void killTask(TaskAttemptID taskId) throws IOException { ensureState(JobState.RUNNING); info.killTask(org.apache.hadoop.mapred.TaskAttemptID.downgrade(taskId), false); }
java
public void killTask(TaskAttemptID taskId) throws IOException { ensureState(JobState.RUNNING); info.killTask(org.apache.hadoop.mapred.TaskAttemptID.downgrade(taskId), false); }
[ "public", "void", "killTask", "(", "TaskAttemptID", "taskId", ")", "throws", "IOException", "{", "ensureState", "(", "JobState", ".", "RUNNING", ")", ";", "info", ".", "killTask", "(", "org", ".", "apache", ".", "hadoop", ".", "mapred", ".", "TaskAttemptID",...
Kill indicated task attempt. @param taskId the id of the task to be terminated. @throws IOException
[ "Kill", "indicated", "task", "attempt", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/Job.java#L366-L370
119,837
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/Job.java
Job.getCounters
public Counters getCounters() throws IOException { ensureState(JobState.RUNNING); org.apache.hadoop.mapred.Counters ctrs = info.getCounters(); if (ctrs == null) { return null; } else { return new Counters(ctrs); } }
java
public Counters getCounters() throws IOException { ensureState(JobState.RUNNING); org.apache.hadoop.mapred.Counters ctrs = info.getCounters(); if (ctrs == null) { return null; } else { return new Counters(ctrs); } }
[ "public", "Counters", "getCounters", "(", ")", "throws", "IOException", "{", "ensureState", "(", "JobState", ".", "RUNNING", ")", ";", "org", ".", "apache", ".", "hadoop", ".", "mapred", ".", "Counters", "ctrs", "=", "info", ".", "getCounters", "(", ")", ...
Gets the counters for this job. @return the counters for this job. @throws IOException
[ "Gets", "the", "counters", "for", "this", "job", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/Job.java#L390-L398
119,838
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/Job.java
Job.setUseNewAPI
private void setUseNewAPI() throws IOException { int numReduces = conf.getNumReduceTasks(); String oldMapperClass = "mapred.mapper.class"; String oldReduceClass = "mapred.reducer.class"; conf.setBooleanIfUnset("mapred.mapper.new-api", conf.get(oldMapperClass) == null); if ...
java
private void setUseNewAPI() throws IOException { int numReduces = conf.getNumReduceTasks(); String oldMapperClass = "mapred.mapper.class"; String oldReduceClass = "mapred.reducer.class"; conf.setBooleanIfUnset("mapred.mapper.new-api", conf.get(oldMapperClass) == null); if ...
[ "private", "void", "setUseNewAPI", "(", ")", "throws", "IOException", "{", "int", "numReduces", "=", "conf", ".", "getNumReduceTasks", "(", ")", ";", "String", "oldMapperClass", "=", "\"mapred.mapper.class\"", ";", "String", "oldReduceClass", "=", "\"mapred.reducer....
Default to the new APIs unless they are explicitly set or the old mapper or reduce attributes are used. @throws IOException if the configuration is inconsistant
[ "Default", "to", "the", "new", "APIs", "unless", "they", "are", "explicitly", "set", "or", "the", "old", "mapper", "or", "reduce", "attributes", "are", "used", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/Job.java#L411-L449
119,839
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/Job.java
Job.submit
public void submit() throws IOException, InterruptedException, ClassNotFoundException { ensureState(JobState.DEFINE); setUseNewAPI(); info = jobClient.submitJobInternal(conf); state = JobState.RUNNING; }
java
public void submit() throws IOException, InterruptedException, ClassNotFoundException { ensureState(JobState.DEFINE); setUseNewAPI(); info = jobClient.submitJobInternal(conf); state = JobState.RUNNING; }
[ "public", "void", "submit", "(", ")", "throws", "IOException", ",", "InterruptedException", ",", "ClassNotFoundException", "{", "ensureState", "(", "JobState", ".", "DEFINE", ")", ";", "setUseNewAPI", "(", ")", ";", "info", "=", "jobClient", ".", "submitJobInter...
Submit the job to the cluster and return immediately. @throws IOException
[ "Submit", "the", "job", "to", "the", "cluster", "and", "return", "immediately", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/Job.java#L455-L461
119,840
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/Job.java
Job.waitForCompletion
public boolean waitForCompletion(boolean verbose ) throws IOException, InterruptedException, ClassNotFoundException { if (state == JobState.DEFINE) { submit(); } if (verbose) { jobClient.monitorAndPrintJob(conf, info)...
java
public boolean waitForCompletion(boolean verbose ) throws IOException, InterruptedException, ClassNotFoundException { if (state == JobState.DEFINE) { submit(); } if (verbose) { jobClient.monitorAndPrintJob(conf, info)...
[ "public", "boolean", "waitForCompletion", "(", "boolean", "verbose", ")", "throws", "IOException", ",", "InterruptedException", ",", "ClassNotFoundException", "{", "if", "(", "state", "==", "JobState", ".", "DEFINE", ")", "{", "submit", "(", ")", ";", "}", "if...
Submit the job to the cluster and wait for it to finish. @param verbose print the progress to the user @return true if the job succeeded @throws IOException thrown if the communication with the <code>JobTracker</code> is lost
[ "Submit", "the", "job", "to", "the", "cluster", "and", "wait", "for", "it", "to", "finish", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/Job.java#L470-L482
119,841
facebookarchive/hadoop-20
src/contrib/hive-streaming/src/java/org/apache/hadoop/streaming/StreamJob.java
StreamJob.setUserJobConfProps
protected void setUserJobConfProps(boolean doEarlyProps) { Iterator it = userJobConfProps_.keySet().iterator(); while (it.hasNext()) { String key = (String) it.next(); String val = (String)userJobConfProps_.get(key); boolean earlyName = key.equals("fs.default.name"); earlyName |= key.equ...
java
protected void setUserJobConfProps(boolean doEarlyProps) { Iterator it = userJobConfProps_.keySet().iterator(); while (it.hasNext()) { String key = (String) it.next(); String val = (String)userJobConfProps_.get(key); boolean earlyName = key.equals("fs.default.name"); earlyName |= key.equ...
[ "protected", "void", "setUserJobConfProps", "(", "boolean", "doEarlyProps", ")", "{", "Iterator", "it", "=", "userJobConfProps_", ".", "keySet", "(", ")", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext", "(", ")", ")", "{", "String", "...
This method sets the user jobconf variable specified by user using -jobconf key=value @param doEarlyProps
[ "This", "method", "sets", "the", "user", "jobconf", "variable", "specified", "by", "user", "using", "-", "jobconf", "key", "=", "value" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/hive-streaming/src/java/org/apache/hadoop/streaming/StreamJob.java#L645-L657
119,842
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/qjournal/server/JournalNodeHttpServer.java
JournalNodeHttpServer.getJournalStats
public static Map<String, Map<String, String>> getJournalStats( Collection<Journal> journals) { Map<String, Map<String, String>> stats = new HashMap<String, Map<String, String>>(); for (Journal j : journals) { try { Map<String, String> stat = new HashMap<String, String>(); stats.put(...
java
public static Map<String, Map<String, String>> getJournalStats( Collection<Journal> journals) { Map<String, Map<String, String>> stats = new HashMap<String, Map<String, String>>(); for (Journal j : journals) { try { Map<String, String> stat = new HashMap<String, String>(); stats.put(...
[ "public", "static", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "getJournalStats", "(", "Collection", "<", "Journal", ">", "journals", ")", "{", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "...
Get journal stats for webui.
[ "Get", "journal", "stats", "for", "webui", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/qjournal/server/JournalNodeHttpServer.java#L132-L149
119,843
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/qjournal/server/JournalNodeHttpServer.java
JournalNodeHttpServer.sendResponse
static void sendResponse(String output, HttpServletResponse response) throws IOException { PrintWriter out = null; try { out = response.getWriter(); out.write(output); } finally { if (out != null) { out.close(); } } }
java
static void sendResponse(String output, HttpServletResponse response) throws IOException { PrintWriter out = null; try { out = response.getWriter(); out.write(output); } finally { if (out != null) { out.close(); } } }
[ "static", "void", "sendResponse", "(", "String", "output", ",", "HttpServletResponse", "response", ")", "throws", "IOException", "{", "PrintWriter", "out", "=", "null", ";", "try", "{", "out", "=", "response", ".", "getWriter", "(", ")", ";", "out", ".", "...
Send string output when serving http request. @param output data to be sent @param response http response @throws IOException
[ "Send", "string", "output", "when", "serving", "http", "request", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/qjournal/server/JournalNodeHttpServer.java#L157-L168
119,844
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
DFSAdmin.report
public void report() throws IOException { DistributedFileSystem dfs = getDFS(); if (dfs != null) { DiskStatus ds = dfs.getDiskStatus(); long capacity = ds.getCapacity(); long used = ds.getDfsUsed(); long remaining = ds.getRemaining(); long presentCapacity = used + remaining; ...
java
public void report() throws IOException { DistributedFileSystem dfs = getDFS(); if (dfs != null) { DiskStatus ds = dfs.getDiskStatus(); long capacity = ds.getCapacity(); long used = ds.getDfsUsed(); long remaining = ds.getRemaining(); long presentCapacity = used + remaining; ...
[ "public", "void", "report", "(", ")", "throws", "IOException", "{", "DistributedFileSystem", "dfs", "=", "getDFS", "(", ")", ";", "if", "(", "dfs", "!=", "null", ")", "{", "DiskStatus", "ds", "=", "dfs", ".", "getDiskStatus", "(", ")", ";", "long", "ca...
Gives a report on how the FileSystem is doing. @exception IOException if the filesystem does not exist.
[ "Gives", "a", "report", "on", "how", "the", "FileSystem", "is", "doing", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java#L326-L389
119,845
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
DFSAdmin.upgradeProgress
public int upgradeProgress(String[] argv, int idx) throws IOException { DistributedFileSystem dfs = getDFS(); if (dfs == null) { System.out.println("FileSystem is " + getFS().getUri()); return -1; } if (idx != argv.length - 1) { printUsage("-upgradeProgress"); return -1; } ...
java
public int upgradeProgress(String[] argv, int idx) throws IOException { DistributedFileSystem dfs = getDFS(); if (dfs == null) { System.out.println("FileSystem is " + getFS().getUri()); return -1; } if (idx != argv.length - 1) { printUsage("-upgradeProgress"); return -1; } ...
[ "public", "int", "upgradeProgress", "(", "String", "[", "]", "argv", ",", "int", "idx", ")", "throws", "IOException", "{", "DistributedFileSystem", "dfs", "=", "getDFS", "(", ")", ";", "if", "(", "dfs", "==", "null", ")", "{", "System", ".", "out", "."...
Command to request current distributed upgrade status, a detailed status, or to force the upgrade to proceed. Usage: java DFSAdmin -upgradeProgress [status | details | force] @exception IOException
[ "Command", "to", "request", "current", "distributed", "upgrade", "status", "a", "detailed", "status", "or", "to", "force", "the", "upgrade", "to", "proceed", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java#L709-L738
119,846
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
DFSAdmin.getClientDatanodeProtocol
private ClientDatanodeProtocol getClientDatanodeProtocol(String dnAddr) throws IOException { String hostname = null; int port; int index; Configuration conf = getConf(); if (dnAddr == null) { // Defaulting the configured address for the port dnAddr = conf.get(FSConsta...
java
private ClientDatanodeProtocol getClientDatanodeProtocol(String dnAddr) throws IOException { String hostname = null; int port; int index; Configuration conf = getConf(); if (dnAddr == null) { // Defaulting the configured address for the port dnAddr = conf.get(FSConsta...
[ "private", "ClientDatanodeProtocol", "getClientDatanodeProtocol", "(", "String", "dnAddr", ")", "throws", "IOException", "{", "String", "hostname", "=", "null", ";", "int", "port", ";", "int", "index", ";", "Configuration", "conf", "=", "getConf", "(", ")", ";",...
Gets a new ClientDataNodeProtocol object. @param dnAddr The address of the DataNode or null for the default value (connecting to localhost). @return the initialized ClientDatanodeProtocol object or null on failure
[ "Gets", "a", "new", "ClientDataNodeProtocol", "object", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java#L892-L920
119,847
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
DFSAdmin.getBlockInfo
private int getBlockInfo(String[] argv, int i) throws IOException { long blockId = Long.valueOf(argv[i++]); LocatedBlockWithFileName locatedBlock = getDFS().getClient().getBlockInfo(blockId); if (null == locatedBlock) { System.err.println("Could not find the block with id : " + blockId); retur...
java
private int getBlockInfo(String[] argv, int i) throws IOException { long blockId = Long.valueOf(argv[i++]); LocatedBlockWithFileName locatedBlock = getDFS().getClient().getBlockInfo(blockId); if (null == locatedBlock) { System.err.println("Could not find the block with id : " + blockId); retur...
[ "private", "int", "getBlockInfo", "(", "String", "[", "]", "argv", ",", "int", "i", ")", "throws", "IOException", "{", "long", "blockId", "=", "Long", ".", "valueOf", "(", "argv", "[", "i", "++", "]", ")", ";", "LocatedBlockWithFileName", "locatedBlock", ...
Display the filename the block belongs to and its locations. @throws IOException
[ "Display", "the", "filename", "the", "block", "belongs", "to", "and", "its", "locations", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java#L1009-L1036
119,848
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/HftpFileSystem.java
HftpFileSystem.openConnection
protected HttpURLConnection openConnection(String path, String query) throws IOException { try { final URL url = new URI("http", null, nnAddr.getAddress().getHostAddress(), nnAddr.getPort(), path, query, null).toURL(); if (LOG.isTraceEnabled()) { LOG.trace("url=" + url); } ...
java
protected HttpURLConnection openConnection(String path, String query) throws IOException { try { final URL url = new URI("http", null, nnAddr.getAddress().getHostAddress(), nnAddr.getPort(), path, query, null).toURL(); if (LOG.isTraceEnabled()) { LOG.trace("url=" + url); } ...
[ "protected", "HttpURLConnection", "openConnection", "(", "String", "path", ",", "String", "query", ")", "throws", "IOException", "{", "try", "{", "final", "URL", "url", "=", "new", "URI", "(", "\"http\"", ",", "null", ",", "nnAddr", ".", "getAddress", "(", ...
Open an HTTP connection to the namenode to read file data and metadata. @param path The path component of the URL @param query The query component of the URL
[ "Open", "an", "HTTP", "connection", "to", "the", "namenode", "to", "read", "file", "data", "and", "metadata", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/HftpFileSystem.java#L133-L145
119,849
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java
HarIndex.getHarIndex
public static HarIndex getHarIndex(FileSystem fs, Path initializer) throws IOException { if (!initializer.getName().endsWith(HAR)) { initializer = initializer.getParent(); } InputStream in = null; try { Path indexFile = new Path(initializer, INDEX); FileStatus indexStat = fs.getF...
java
public static HarIndex getHarIndex(FileSystem fs, Path initializer) throws IOException { if (!initializer.getName().endsWith(HAR)) { initializer = initializer.getParent(); } InputStream in = null; try { Path indexFile = new Path(initializer, INDEX); FileStatus indexStat = fs.getF...
[ "public", "static", "HarIndex", "getHarIndex", "(", "FileSystem", "fs", ",", "Path", "initializer", ")", "throws", "IOException", "{", "if", "(", "!", "initializer", ".", "getName", "(", ")", ".", "endsWith", "(", "HAR", ")", ")", "{", "initializer", "=", ...
Creates a HarIndex object with the path to either the HAR or a part file in the HAR.
[ "Creates", "a", "HarIndex", "object", "with", "the", "path", "to", "either", "the", "HAR", "or", "a", "part", "file", "in", "the", "HAR", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java#L77-L95
119,850
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java
HarIndex.parseLine
void parseLine(String line) throws UnsupportedEncodingException { String[] splits = line.split(" "); boolean isDir = "dir".equals(splits[1]) ? true: false; if (!isDir && splits.length >= 6) { String name = URLDecoder.decode(splits[0], "UTF-8"); String partName = URLDecoder.decode(splits[2], "UT...
java
void parseLine(String line) throws UnsupportedEncodingException { String[] splits = line.split(" "); boolean isDir = "dir".equals(splits[1]) ? true: false; if (!isDir && splits.length >= 6) { String name = URLDecoder.decode(splits[0], "UTF-8"); String partName = URLDecoder.decode(splits[2], "UT...
[ "void", "parseLine", "(", "String", "line", ")", "throws", "UnsupportedEncodingException", "{", "String", "[", "]", "splits", "=", "line", ".", "split", "(", "\" \"", ")", ";", "boolean", "isDir", "=", "\"dir\"", ".", "equals", "(", "splits", "[", "1", "...
Parses each line and extracts relevant information. @param line @throws UnsupportedEncodingException
[ "Parses", "each", "line", "and", "extracts", "relevant", "information", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java#L126-L143
119,851
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java
HarIndex.findEntry
public IndexEntry findEntry(String partName, long partFileOffset) { for (IndexEntry e: entries) { boolean nameMatch = partName.equals(e.partFileName); boolean inRange = (partFileOffset >= e.startOffset) && (partFileOffset < e.startOffset + e.length); if (nameMatch && inRang...
java
public IndexEntry findEntry(String partName, long partFileOffset) { for (IndexEntry e: entries) { boolean nameMatch = partName.equals(e.partFileName); boolean inRange = (partFileOffset >= e.startOffset) && (partFileOffset < e.startOffset + e.length); if (nameMatch && inRang...
[ "public", "IndexEntry", "findEntry", "(", "String", "partName", ",", "long", "partFileOffset", ")", "{", "for", "(", "IndexEntry", "e", ":", "entries", ")", "{", "boolean", "nameMatch", "=", "partName", ".", "equals", "(", "e", ".", "partFileName", ")", ";...
Finds the index entry corresponding to a HAR partFile at an offset. @param partName The name of the part file (part-*). @param partFileOffset The offset into the part file. @return The entry corresponding to partName:partFileOffset.
[ "Finds", "the", "index", "entry", "corresponding", "to", "a", "HAR", "partFile", "at", "an", "offset", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java#L151-L161
119,852
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java
HarIndex.findEntryByFileName
public IndexEntry findEntryByFileName(String fileName) { for (IndexEntry e: entries) { if (fileName.equals(e.fileName)) { return e; } } return null; }
java
public IndexEntry findEntryByFileName(String fileName) { for (IndexEntry e: entries) { if (fileName.equals(e.fileName)) { return e; } } return null; }
[ "public", "IndexEntry", "findEntryByFileName", "(", "String", "fileName", ")", "{", "for", "(", "IndexEntry", "e", ":", "entries", ")", "{", "if", "(", "fileName", ".", "equals", "(", "e", ".", "fileName", ")", ")", "{", "return", "e", ";", "}", "}", ...
Finds the index entry corresponding to a file in the archive
[ "Finds", "the", "index", "entry", "corresponding", "to", "a", "file", "in", "the", "archive" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java#L166-L173
119,853
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalManager.java
BookKeeperJournalManager.prepareBookKeeperEnv
@VisibleForTesting public static void prepareBookKeeperEnv(final String availablePath, ZooKeeper zooKeeper) throws IOException { final CountDownLatch availablePathLatch = new CountDownLatch(1); StringCallback cb = new StringCallback() { @Override public void processResult(int rc, String pat...
java
@VisibleForTesting public static void prepareBookKeeperEnv(final String availablePath, ZooKeeper zooKeeper) throws IOException { final CountDownLatch availablePathLatch = new CountDownLatch(1); StringCallback cb = new StringCallback() { @Override public void processResult(int rc, String pat...
[ "@", "VisibleForTesting", "public", "static", "void", "prepareBookKeeperEnv", "(", "final", "String", "availablePath", ",", "ZooKeeper", "zooKeeper", ")", "throws", "IOException", "{", "final", "CountDownLatch", "availablePathLatch", "=", "new", "CountDownLatch", "(", ...
Create parent ZNode under which available BookKeeper bookie servers will register themselves. Will create parent ZNodes for that path as well. @see ZkUtils#createFullPathOptimistic(ZooKeeper, String, byte[], List, CreateMode, StringCallback, Object) @param availablePath Full ZooKeeper path for bookies to register thems...
[ "Create", "parent", "ZNode", "under", "which", "available", "BookKeeper", "bookie", "servers", "will", "register", "themselves", ".", "Will", "create", "parent", "ZNodes", "for", "that", "path", "as", "well", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalManager.java#L212-L243
119,854
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalManager.java
BookKeeperJournalManager.createZkMetadataIfNotExists
private void createZkMetadataIfNotExists(StorageInfo si) throws IOException { try { if (!hasSomeJournalData()) { try { // First create the parent path zk.create(zkParentPath, new byte[] { '0' }, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); // Write format/n...
java
private void createZkMetadataIfNotExists(StorageInfo si) throws IOException { try { if (!hasSomeJournalData()) { try { // First create the parent path zk.create(zkParentPath, new byte[] { '0' }, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); // Write format/n...
[ "private", "void", "createZkMetadataIfNotExists", "(", "StorageInfo", "si", ")", "throws", "IOException", "{", "try", "{", "if", "(", "!", "hasSomeJournalData", "(", ")", ")", "{", "try", "{", "// First create the parent path", "zk", ".", "create", "(", "zkParen...
If there is no metadata present in ZooKeeper, create and populate the metadata with the right format information @param si The format information to set @throws IOException If there is an error writing to ZooKeeper
[ "If", "there", "is", "no", "metadata", "present", "in", "ZooKeeper", "create", "and", "populate", "the", "metadata", "with", "the", "right", "format", "information" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalManager.java#L338-L364
119,855
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalManager.java
BookKeeperJournalManager.zkPathExists
private boolean zkPathExists(String path) throws IOException { try { return zk.exists(path, false) != null; } catch (KeeperException e) { keeperException("Unrecoverable ZooKeeper error checking if " + path + " exists", e); } catch (InterruptedException e) { interruptedException("...
java
private boolean zkPathExists(String path) throws IOException { try { return zk.exists(path, false) != null; } catch (KeeperException e) { keeperException("Unrecoverable ZooKeeper error checking if " + path + " exists", e); } catch (InterruptedException e) { interruptedException("...
[ "private", "boolean", "zkPathExists", "(", "String", "path", ")", "throws", "IOException", "{", "try", "{", "return", "zk", ".", "exists", "(", "path", ",", "false", ")", "!=", "null", ";", "}", "catch", "(", "KeeperException", "e", ")", "{", "keeperExce...
Check if a path exists in ZooKeeper @param path The ZNode path to check @return True if path exists, false if otherwise @throws IOException If there is an error talking to ZooKeeper
[ "Check", "if", "a", "path", "exists", "in", "ZooKeeper" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalManager.java#L372-L383
119,856
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalManager.java
BookKeeperJournalManager.purgeLogsOlderThan
@Override public void purgeLogsOlderThan(long minTxIdToKeep) throws IOException { checkEnv(); Collection<EditLogLedgerMetadata> ledgers = metadataManager.listLedgers(false); // Don't list in-progress ledgers for (EditLogLedgerMetadata ledger : ledgers) { if (ledger.getFirstTxId() < minTxId...
java
@Override public void purgeLogsOlderThan(long minTxIdToKeep) throws IOException { checkEnv(); Collection<EditLogLedgerMetadata> ledgers = metadataManager.listLedgers(false); // Don't list in-progress ledgers for (EditLogLedgerMetadata ledger : ledgers) { if (ledger.getFirstTxId() < minTxId...
[ "@", "Override", "public", "void", "purgeLogsOlderThan", "(", "long", "minTxIdToKeep", ")", "throws", "IOException", "{", "checkEnv", "(", ")", ";", "Collection", "<", "EditLogLedgerMetadata", ">", "ledgers", "=", "metadataManager", ".", "listLedgers", "(", "false...
For edit log segment that contains transactions with ids earlier than the earliest txid to be retained, remove the ZooKeeper-based metadata and BookKeeper ledgers associated with these segments. @param minTxIdToKeep the earliest txid that must be retained after purging old logs @throws IOException If there is an error...
[ "For", "edit", "log", "segment", "that", "contains", "transactions", "with", "ids", "earlier", "than", "the", "earliest", "txid", "to", "be", "retained", "remove", "the", "ZooKeeper", "-", "based", "metadata", "and", "BookKeeper", "ledgers", "associated", "with"...
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/BookKeeperJournalManager.java#L631-L662
119,857
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/util/CoronaSerializer.java
CoronaSerializer.readToken
public void readToken(String parentFieldName, JsonToken expectedToken) throws IOException { JsonToken currentToken = jsonParser.nextToken(); if (currentToken != expectedToken) { throw new IOException("Expected a " + expectedToken.toString() + " token when reading the value of the field: " + ...
java
public void readToken(String parentFieldName, JsonToken expectedToken) throws IOException { JsonToken currentToken = jsonParser.nextToken(); if (currentToken != expectedToken) { throw new IOException("Expected a " + expectedToken.toString() + " token when reading the value of the field: " + ...
[ "public", "void", "readToken", "(", "String", "parentFieldName", ",", "JsonToken", "expectedToken", ")", "throws", "IOException", "{", "JsonToken", "currentToken", "=", "jsonParser", ".", "nextToken", "(", ")", ";", "if", "(", "currentToken", "!=", "expectedToken"...
This is a helper method that reads a JSON token using a JsonParser instance, and throws an exception if the next token is not the same as the token we expect. @param parentFieldName The name of the field @param expectedToken The expected token @throws IOException
[ "This", "is", "a", "helper", "method", "that", "reads", "a", "JSON", "token", "using", "a", "JsonParser", "instance", "and", "throws", "an", "exception", "if", "the", "next", "token", "is", "not", "the", "same", "as", "the", "token", "we", "expect", "." ...
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/util/CoronaSerializer.java#L121-L131
119,858
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/util/CoronaSerializer.java
CoronaSerializer.getFieldName
public String getFieldName() throws IOException { if (jsonParser.getCurrentToken() != JsonToken.FIELD_NAME) { throw new IOException("Expected a field of type " + JsonToken.FIELD_NAME + ", but found a field of type " + jsonParser.getCurrentToken()); }...
java
public String getFieldName() throws IOException { if (jsonParser.getCurrentToken() != JsonToken.FIELD_NAME) { throw new IOException("Expected a field of type " + JsonToken.FIELD_NAME + ", but found a field of type " + jsonParser.getCurrentToken()); }...
[ "public", "String", "getFieldName", "(", ")", "throws", "IOException", "{", "if", "(", "jsonParser", ".", "getCurrentToken", "(", ")", "!=", "JsonToken", ".", "FIELD_NAME", ")", "{", "throw", "new", "IOException", "(", "\"Expected a field of type \"", "+", "Json...
If the current token is a field name, this method returns the name of the field. @return A String object containing the name of the field @throws IOException
[ "If", "the", "current", "token", "is", "a", "field", "name", "this", "method", "returns", "the", "name", "of", "the", "field", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/util/CoronaSerializer.java#L206-L213
119,859
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/protocol/BlockListAsLongs.java
BlockListAsLongs.setBlock
void setBlock(final int index, final Block b) { blockList[index2BlockId(index)] = b.getBlockId(); blockList[index2BlockLen(index)] = b.getNumBytes(); blockList[index2BlockGenStamp(index)] = b.getGenerationStamp(); }
java
void setBlock(final int index, final Block b) { blockList[index2BlockId(index)] = b.getBlockId(); blockList[index2BlockLen(index)] = b.getNumBytes(); blockList[index2BlockGenStamp(index)] = b.getGenerationStamp(); }
[ "void", "setBlock", "(", "final", "int", "index", ",", "final", "Block", "b", ")", "{", "blockList", "[", "index2BlockId", "(", "index", ")", "]", "=", "b", ".", "getBlockId", "(", ")", ";", "blockList", "[", "index2BlockLen", "(", "index", ")", "]", ...
Set the indexTh block @param index - the index of the block to set @param b - the block is set to the value of the this block
[ "Set", "the", "indexTh", "block" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/protocol/BlockListAsLongs.java#L138-L142
119,860
facebookarchive/hadoop-20
src/contrib/hmon/src/java/org/apache/hadoop/mapred/UtilizationReporter.java
UtilizationReporter.main
public static void main(String argv[]) throws Exception { try { Configuration conf = new Configuration(); UtilizationReporter utilizationReporter = new UtilizationReporter(conf); utilizationReporter.start(); } catch (Throwable e) { System.err.println(e); LOG.error(St...
java
public static void main(String argv[]) throws Exception { try { Configuration conf = new Configuration(); UtilizationReporter utilizationReporter = new UtilizationReporter(conf); utilizationReporter.start(); } catch (Throwable e) { System.err.println(e); LOG.error(St...
[ "public", "static", "void", "main", "(", "String", "argv", "[", "]", ")", "throws", "Exception", "{", "try", "{", "Configuration", "conf", "=", "new", "Configuration", "(", ")", ";", "UtilizationReporter", "utilizationReporter", "=", "new", "UtilizationReporter"...
main program to run on each TaskTracker
[ "main", "program", "to", "run", "on", "each", "TaskTracker" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/hmon/src/java/org/apache/hadoop/mapred/UtilizationReporter.java#L112-L123
119,861
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/datanode/AvatarDataNode.java
AvatarDataNode.getNameNodeAddress
static InetSocketAddress getNameNodeAddress(Configuration conf, String cname, String rpcKey, String cname2) { String fs = conf.get(cname); String fs1 = conf.get(rpcKey); String fs2 = conf.get(cname2); Configuration newconf = new Configuration(conf); ...
java
static InetSocketAddress getNameNodeAddress(Configuration conf, String cname, String rpcKey, String cname2) { String fs = conf.get(cname); String fs1 = conf.get(rpcKey); String fs2 = conf.get(cname2); Configuration newconf = new Configuration(conf); ...
[ "static", "InetSocketAddress", "getNameNodeAddress", "(", "Configuration", "conf", ",", "String", "cname", ",", "String", "rpcKey", ",", "String", "cname2", ")", "{", "String", "fs", "=", "conf", ".", "get", "(", "cname", ")", ";", "String", "fs1", "=", "c...
Returns the IP address of the namenode
[ "Returns", "the", "IP", "address", "of", "the", "namenode" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/datanode/AvatarDataNode.java#L1204-L1218
119,862
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java
MD5MD5CRC32FileChecksum.write
public static void write(XMLOutputter xml, MD5MD5CRC32FileChecksum that ) throws IOException { xml.startTag(MD5MD5CRC32FileChecksum.class.getName()); if (that != null) { xml.attribute("bytesPerCRC", "" + that.bytesPerCRC); xml.attribute("crcPerBlock", "" + that.crcPerBlock); xml.attribut...
java
public static void write(XMLOutputter xml, MD5MD5CRC32FileChecksum that ) throws IOException { xml.startTag(MD5MD5CRC32FileChecksum.class.getName()); if (that != null) { xml.attribute("bytesPerCRC", "" + that.bytesPerCRC); xml.attribute("crcPerBlock", "" + that.crcPerBlock); xml.attribut...
[ "public", "static", "void", "write", "(", "XMLOutputter", "xml", ",", "MD5MD5CRC32FileChecksum", "that", ")", "throws", "IOException", "{", "xml", ".", "startTag", "(", "MD5MD5CRC32FileChecksum", ".", "class", ".", "getName", "(", ")", ")", ";", "if", "(", "...
Write that object to xml output.
[ "Write", "that", "object", "to", "xml", "output", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java#L79-L88
119,863
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java
MD5MD5CRC32FileChecksum.valueOf
public static MD5MD5CRC32FileChecksum valueOf(Attributes attrs ) throws SAXException { final String bytesPerCRC = attrs.getValue("bytesPerCRC"); final String crcPerBlock = attrs.getValue("crcPerBlock"); final String md5 = attrs.getValue("md5"); if (bytesPerCRC == null || crcPerBlock == null || md5...
java
public static MD5MD5CRC32FileChecksum valueOf(Attributes attrs ) throws SAXException { final String bytesPerCRC = attrs.getValue("bytesPerCRC"); final String crcPerBlock = attrs.getValue("crcPerBlock"); final String md5 = attrs.getValue("md5"); if (bytesPerCRC == null || crcPerBlock == null || md5...
[ "public", "static", "MD5MD5CRC32FileChecksum", "valueOf", "(", "Attributes", "attrs", ")", "throws", "SAXException", "{", "final", "String", "bytesPerCRC", "=", "attrs", ".", "getValue", "(", "\"bytesPerCRC\"", ")", ";", "final", "String", "crcPerBlock", "=", "att...
Return the object represented in the attributes.
[ "Return", "the", "object", "represented", "in", "the", "attributes", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java#L91-L107
119,864
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/tools/offlineEditsViewer/XmlTokenizer.java
XmlTokenizer.getNextElementsValue
private String getNextElementsValue(String wantedName) throws IOException { boolean gotSTART_ELEMENT = false; try { int eventType = in.getEventType(); while(true) { switch(eventType) { case XMLStreamConstants.CHARACTERS: // 4 if(gotSTART_ELEMENT) { // XML ...
java
private String getNextElementsValue(String wantedName) throws IOException { boolean gotSTART_ELEMENT = false; try { int eventType = in.getEventType(); while(true) { switch(eventType) { case XMLStreamConstants.CHARACTERS: // 4 if(gotSTART_ELEMENT) { // XML ...
[ "private", "String", "getNextElementsValue", "(", "String", "wantedName", ")", "throws", "IOException", "{", "boolean", "gotSTART_ELEMENT", "=", "false", ";", "try", "{", "int", "eventType", "=", "in", ".", "getEventType", "(", ")", ";", "while", "(", "true", ...
Get next element's value, checks that the element's name is wantedName. @param wantedName a name of node that we are looking for
[ "Get", "next", "element", "s", "value", "checks", "that", "the", "element", "s", "name", "is", "wantedName", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/offlineEditsViewer/XmlTokenizer.java#L64-L123
119,865
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/metadata/CurrentInProgressMetadata.java
CurrentInProgressMetadata.update
public void update(String newPath) throws IOException { String id = hostname + Thread.currentThread().getId(); CurrentInProgressMetadataWritable cip = localWritable.get(); cip.set(id, newPath); byte[] data = WritableUtil.writableToByteArray(cip); try { zooKeeper.setData(fullyQualifiedZNode, da...
java
public void update(String newPath) throws IOException { String id = hostname + Thread.currentThread().getId(); CurrentInProgressMetadataWritable cip = localWritable.get(); cip.set(id, newPath); byte[] data = WritableUtil.writableToByteArray(cip); try { zooKeeper.setData(fullyQualifiedZNode, da...
[ "public", "void", "update", "(", "String", "newPath", ")", "throws", "IOException", "{", "String", "id", "=", "hostname", "+", "Thread", ".", "currentThread", "(", ")", ".", "getId", "(", ")", ";", "CurrentInProgressMetadataWritable", "cip", "=", "localWritabl...
Update the data in the ZNode to point to a the ZNode containing the metadata for the ledger containing the current in-progress edit log segment. @param newPath Path to the metadata for the current ledger @throws StaleVersionException If path read is out of date compared to the version in ZooKeeper @throws IOException I...
[ "Update", "the", "data", "in", "the", "ZNode", "to", "point", "to", "a", "the", "ZNode", "containing", "the", "metadata", "for", "the", "ledger", "containing", "the", "current", "in", "-", "progress", "edit", "log", "segment", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/metadata/CurrentInProgressMetadata.java#L139-L162
119,866
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/metadata/CurrentInProgressMetadata.java
CurrentInProgressMetadata.read
public String read() throws IOException { CurrentInProgressMetadataWritable cip = localWritable.get(); if (readAndUpdateVersion(cip)) { return cip.getPath(); } else { if (LOG.isDebugEnabled()) { LOG.debug(fullyQualifiedZNode + " is currently clear."); } } return null; }
java
public String read() throws IOException { CurrentInProgressMetadataWritable cip = localWritable.get(); if (readAndUpdateVersion(cip)) { return cip.getPath(); } else { if (LOG.isDebugEnabled()) { LOG.debug(fullyQualifiedZNode + " is currently clear."); } } return null; }
[ "public", "String", "read", "(", ")", "throws", "IOException", "{", "CurrentInProgressMetadataWritable", "cip", "=", "localWritable", ".", "get", "(", ")", ";", "if", "(", "readAndUpdateVersion", "(", "cip", ")", ")", "{", "return", "cip", ".", "getPath", "(...
Read the full path to the ZNode holding the metadata for the ledger containing the current in-progress edit log segment or null if no segment is currently in-progress @return Full path to the ledger's metadata ZNode or null if no segment is in progress @throws IOException If there is an error talking to ZooKeeper
[ "Read", "the", "full", "path", "to", "the", "ZNode", "holding", "the", "metadata", "for", "the", "ledger", "containing", "the", "current", "in", "-", "progress", "edit", "log", "segment", "or", "null", "if", "no", "segment", "is", "currently", "in", "-", ...
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/metadata/CurrentInProgressMetadata.java#L172-L182
119,867
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/metadata/CurrentInProgressMetadata.java
CurrentInProgressMetadata.clear
public void clear() throws IOException { try { zooKeeper.setData(fullyQualifiedZNode, null, expectedZNodeVersion.get()); } catch (KeeperException.BadVersionException e) { LOG.error(fullyQualifiedZNode + " has been updated by another process", e); throw new StaleVersionException(fully...
java
public void clear() throws IOException { try { zooKeeper.setData(fullyQualifiedZNode, null, expectedZNodeVersion.get()); } catch (KeeperException.BadVersionException e) { LOG.error(fullyQualifiedZNode + " has been updated by another process", e); throw new StaleVersionException(fully...
[ "public", "void", "clear", "(", ")", "throws", "IOException", "{", "try", "{", "zooKeeper", ".", "setData", "(", "fullyQualifiedZNode", ",", "null", ",", "expectedZNodeVersion", ".", "get", "(", ")", ")", ";", "}", "catch", "(", "KeeperException", ".", "Ba...
Clear out the data in the ZNode specified in the constructor to indicate that no segment is currently in progress. This does not delete the actual ZNode. @throws IOException If there is an unrecoverable error talking to ZooKeeper
[ "Clear", "out", "the", "data", "in", "the", "ZNode", "specified", "in", "the", "constructor", "to", "indicate", "that", "no", "segment", "is", "currently", "in", "progress", ".", "This", "does", "not", "delete", "the", "actual", "ZNode", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/metadata/CurrentInProgressMetadata.java#L222-L236
119,868
pnikosis/materialish-progress
library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java
ProgressWheel.onSizeChanged
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); setupBounds(w, h); setupPaints(); invalidate(); }
java
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); setupBounds(w, h); setupPaints(); invalidate(); }
[ "@", "Override", "protected", "void", "onSizeChanged", "(", "int", "w", ",", "int", "h", ",", "int", "oldw", ",", "int", "oldh", ")", "{", "super", ".", "onSizeChanged", "(", "w", ",", "h", ",", "oldw", ",", "oldh", ")", ";", "setupBounds", "(", "w...
Use onSizeChanged instead of onAttachedToWindow to get the dimensions of the view, because this method is called after measuring the dimensions of MATCH_PARENT & WRAP_CONTENT. Use this dimensions to setup the bounds and paints.
[ "Use", "onSizeChanged", "instead", "of", "onAttachedToWindow", "to", "get", "the", "dimensions", "of", "the", "view", "because", "this", "method", "is", "called", "after", "measuring", "the", "dimensions", "of", "MATCH_PARENT", "&", "WRAP_CONTENT", ".", "Use", "...
f82831e11c81a4385cdd5bf4ced93e5ecd93550d
https://github.com/pnikosis/materialish-progress/blob/f82831e11c81a4385cdd5bf4ced93e5ecd93550d/library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java#L161-L167
119,869
pnikosis/materialish-progress
library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java
ProgressWheel.setupPaints
private void setupPaints() { barPaint.setColor(barColor); barPaint.setAntiAlias(true); barPaint.setStyle(Style.STROKE); barPaint.setStrokeWidth(barWidth); rimPaint.setColor(rimColor); rimPaint.setAntiAlias(true); rimPaint.setStyle(Style.STROKE); rimPaint.setStrokeWidth(rimWidth); }
java
private void setupPaints() { barPaint.setColor(barColor); barPaint.setAntiAlias(true); barPaint.setStyle(Style.STROKE); barPaint.setStrokeWidth(barWidth); rimPaint.setColor(rimColor); rimPaint.setAntiAlias(true); rimPaint.setStyle(Style.STROKE); rimPaint.setStrokeWidth(rimWidth); }
[ "private", "void", "setupPaints", "(", ")", "{", "barPaint", ".", "setColor", "(", "barColor", ")", ";", "barPaint", ".", "setAntiAlias", "(", "true", ")", ";", "barPaint", ".", "setStyle", "(", "Style", ".", "STROKE", ")", ";", "barPaint", ".", "setStro...
Set the properties of the paints we're using to draw the progress wheel
[ "Set", "the", "properties", "of", "the", "paints", "we", "re", "using", "to", "draw", "the", "progress", "wheel" ]
f82831e11c81a4385cdd5bf4ced93e5ecd93550d
https://github.com/pnikosis/materialish-progress/blob/f82831e11c81a4385cdd5bf4ced93e5ecd93550d/library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java#L173-L183
119,870
pnikosis/materialish-progress
library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java
ProgressWheel.setupBounds
private void setupBounds(int layout_width, int layout_height) { int paddingTop = getPaddingTop(); int paddingBottom = getPaddingBottom(); int paddingLeft = getPaddingLeft(); int paddingRight = getPaddingRight(); if (!fillRadius) { // Width should equal to Height, find the min value to setup t...
java
private void setupBounds(int layout_width, int layout_height) { int paddingTop = getPaddingTop(); int paddingBottom = getPaddingBottom(); int paddingLeft = getPaddingLeft(); int paddingRight = getPaddingRight(); if (!fillRadius) { // Width should equal to Height, find the min value to setup t...
[ "private", "void", "setupBounds", "(", "int", "layout_width", ",", "int", "layout_height", ")", "{", "int", "paddingTop", "=", "getPaddingTop", "(", ")", ";", "int", "paddingBottom", "=", "getPaddingBottom", "(", ")", ";", "int", "paddingLeft", "=", "getPaddin...
Set the bounds of the component
[ "Set", "the", "bounds", "of", "the", "component" ]
f82831e11c81a4385cdd5bf4ced93e5ecd93550d
https://github.com/pnikosis/materialish-progress/blob/f82831e11c81a4385cdd5bf4ced93e5ecd93550d/library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java#L188-L212
119,871
pnikosis/materialish-progress
library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java
ProgressWheel.parseAttributes
private void parseAttributes(TypedArray a) { // We transform the default values from DIP to pixels DisplayMetrics metrics = getContext().getResources().getDisplayMetrics(); barWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, barWidth, metrics); rimWidth = (int) TypedValue.applyDimens...
java
private void parseAttributes(TypedArray a) { // We transform the default values from DIP to pixels DisplayMetrics metrics = getContext().getResources().getDisplayMetrics(); barWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, barWidth, metrics); rimWidth = (int) TypedValue.applyDimens...
[ "private", "void", "parseAttributes", "(", "TypedArray", "a", ")", "{", "// We transform the default values from DIP to pixels", "DisplayMetrics", "metrics", "=", "getContext", "(", ")", ".", "getResources", "(", ")", ".", "getDisplayMetrics", "(", ")", ";", "barWidth...
Parse the attributes passed to the view from the XML @param a the attributes to parse
[ "Parse", "the", "attributes", "passed", "to", "the", "view", "from", "the", "XML" ]
f82831e11c81a4385cdd5bf4ced93e5ecd93550d
https://github.com/pnikosis/materialish-progress/blob/f82831e11c81a4385cdd5bf4ced93e5ecd93550d/library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java#L219-L255
119,872
pnikosis/materialish-progress
library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java
ProgressWheel.setInstantProgress
public void setInstantProgress(float progress) { if (isSpinning) { mProgress = 0.0f; isSpinning = false; } if (progress > 1.0f) { progress -= 1.0f; } else if (progress < 0) { progress = 0; } if (progress == mTargetProgress) { return; } mTargetProgress = M...
java
public void setInstantProgress(float progress) { if (isSpinning) { mProgress = 0.0f; isSpinning = false; } if (progress > 1.0f) { progress -= 1.0f; } else if (progress < 0) { progress = 0; } if (progress == mTargetProgress) { return; } mTargetProgress = M...
[ "public", "void", "setInstantProgress", "(", "float", "progress", ")", "{", "if", "(", "isSpinning", ")", "{", "mProgress", "=", "0.0f", ";", "isSpinning", "=", "false", ";", "}", "if", "(", "progress", ">", "1.0f", ")", "{", "progress", "-=", "1.0f", ...
Set the progress to a specific value, the bar will be set instantly to that value @param progress the progress between 0 and 1
[ "Set", "the", "progress", "to", "a", "specific", "value", "the", "bar", "will", "be", "set", "instantly", "to", "that", "value" ]
f82831e11c81a4385cdd5bf4ced93e5ecd93550d
https://github.com/pnikosis/materialish-progress/blob/f82831e11c81a4385cdd5bf4ced93e5ecd93550d/library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java#L440-L460
119,873
pnikosis/materialish-progress
library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java
ProgressWheel.setProgress
public void setProgress(float progress) { if (isSpinning) { mProgress = 0.0f; isSpinning = false; runCallback(); } if (progress > 1.0f) { progress -= 1.0f; } else if (progress < 0) { progress = 0; } if (progress == mTargetProgress) { return; } // I...
java
public void setProgress(float progress) { if (isSpinning) { mProgress = 0.0f; isSpinning = false; runCallback(); } if (progress > 1.0f) { progress -= 1.0f; } else if (progress < 0) { progress = 0; } if (progress == mTargetProgress) { return; } // I...
[ "public", "void", "setProgress", "(", "float", "progress", ")", "{", "if", "(", "isSpinning", ")", "{", "mProgress", "=", "0.0f", ";", "isSpinning", "=", "false", ";", "runCallback", "(", ")", ";", "}", "if", "(", "progress", ">", "1.0f", ")", "{", "...
Set the progress to a specific value, the bar will smoothly animate until that value @param progress the progress between 0 and 1
[ "Set", "the", "progress", "to", "a", "specific", "value", "the", "bar", "will", "smoothly", "animate", "until", "that", "value" ]
f82831e11c81a4385cdd5bf4ced93e5ecd93550d
https://github.com/pnikosis/materialish-progress/blob/f82831e11c81a4385cdd5bf4ced93e5ecd93550d/library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java#L526-L554
119,874
Alfresco/alfresco-sdk
plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRefreshWebappMojo.java
AbstractRefreshWebappMojo.execute
@Override public void execute() throws MojoExecutionException { if (StringUtils.isBlank(this.refreshPort)) { this.refreshPort = "8080"; } // Do a ping to see if the server is up, if not, log and just exit if (!ping()) { getLog().warn("Connection failed to " +...
java
@Override public void execute() throws MojoExecutionException { if (StringUtils.isBlank(this.refreshPort)) { this.refreshPort = "8080"; } // Do a ping to see if the server is up, if not, log and just exit if (!ping()) { getLog().warn("Connection failed to " +...
[ "@", "Override", "public", "void", "execute", "(", ")", "throws", "MojoExecutionException", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "this", ".", "refreshPort", ")", ")", "{", "this", ".", "refreshPort", "=", "\"8080\"", ";", "}", "// Do a ping to...
Mojo interface implementation
[ "Mojo", "interface", "implementation" ]
7f861a96726edb776293e2363ee85ef05643368b
https://github.com/Alfresco/alfresco-sdk/blob/7f861a96726edb776293e2363ee85ef05643368b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRefreshWebappMojo.java#L130-L143
119,875
Alfresco/alfresco-sdk
plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRefreshWebappMojo.java
AbstractRefreshWebappMojo.refreshWebScripts
protected void refreshWebScripts(String url) { // Create the Refresh URL for the Alfresco Tomcat server URL alfrescoTomcatUrl = buildFinalUrl(url); if (alfrescoTomcatUrl == null) { getLog().error("Could not build refresh URL for " + refreshWebappName + ", " + getAbortedMsg()); ...
java
protected void refreshWebScripts(String url) { // Create the Refresh URL for the Alfresco Tomcat server URL alfrescoTomcatUrl = buildFinalUrl(url); if (alfrescoTomcatUrl == null) { getLog().error("Could not build refresh URL for " + refreshWebappName + ", " + getAbortedMsg()); ...
[ "protected", "void", "refreshWebScripts", "(", "String", "url", ")", "{", "// Create the Refresh URL for the Alfresco Tomcat server", "URL", "alfrescoTomcatUrl", "=", "buildFinalUrl", "(", "url", ")", ";", "if", "(", "alfrescoTomcatUrl", "==", "null", ")", "{", "getLo...
Perform a Refresh of Web Scripts container in webapp. Called by specific refresh mojo implementation. @param url the relative path to refresh webscripts
[ "Perform", "a", "Refresh", "of", "Web", "Scripts", "container", "in", "webapp", ".", "Called", "by", "specific", "refresh", "mojo", "implementation", "." ]
7f861a96726edb776293e2363ee85ef05643368b
https://github.com/Alfresco/alfresco-sdk/blob/7f861a96726edb776293e2363ee85ef05643368b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRefreshWebappMojo.java#L170-L184
119,876
Alfresco/alfresco-sdk
plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRefreshWebappMojo.java
AbstractRefreshWebappMojo.clearDependencyCaches
protected void clearDependencyCaches(String url) { // Create the Clear Cache URL for the Alfresco Tomcat server URL alfrescoTomcatUrl = buildFinalUrl(url); if (alfrescoTomcatUrl == null) { getLog().error("Could not build clear dependency caches URL for " + refresh...
java
protected void clearDependencyCaches(String url) { // Create the Clear Cache URL for the Alfresco Tomcat server URL alfrescoTomcatUrl = buildFinalUrl(url); if (alfrescoTomcatUrl == null) { getLog().error("Could not build clear dependency caches URL for " + refresh...
[ "protected", "void", "clearDependencyCaches", "(", "String", "url", ")", "{", "// Create the Clear Cache URL for the Alfresco Tomcat server", "URL", "alfrescoTomcatUrl", "=", "buildFinalUrl", "(", "url", ")", ";", "if", "(", "alfrescoTomcatUrl", "==", "null", ")", "{", ...
Perform a Clear Dependency Caches call on Share webapp. Called by specific refresh mojo implementation, currently only applicable to Share webapp. @param url the relative path to clear cache
[ "Perform", "a", "Clear", "Dependency", "Caches", "call", "on", "Share", "webapp", ".", "Called", "by", "specific", "refresh", "mojo", "implementation", "currently", "only", "applicable", "to", "Share", "webapp", "." ]
7f861a96726edb776293e2363ee85ef05643368b
https://github.com/Alfresco/alfresco-sdk/blob/7f861a96726edb776293e2363ee85ef05643368b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRefreshWebappMojo.java#L192-L202
119,877
Alfresco/alfresco-sdk
plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRefreshWebappMojo.java
AbstractRefreshWebappMojo.makePostCall
private void makePostCall(URL alfrescoTomcatUrl, List<NameValuePair> postData, String operation) { CloseableHttpClient client = null; CloseableHttpResponse response = null; try { // Set up a HTTP POST request to the Alfresco Webapp we are targeting HttpHost targetHost = n...
java
private void makePostCall(URL alfrescoTomcatUrl, List<NameValuePair> postData, String operation) { CloseableHttpClient client = null; CloseableHttpResponse response = null; try { // Set up a HTTP POST request to the Alfresco Webapp we are targeting HttpHost targetHost = n...
[ "private", "void", "makePostCall", "(", "URL", "alfrescoTomcatUrl", ",", "List", "<", "NameValuePair", ">", "postData", ",", "String", "operation", ")", "{", "CloseableHttpClient", "client", "=", "null", ";", "CloseableHttpResponse", "response", "=", "null", ";", ...
Helper method to make a POST request to the Alfresco Webapp @param alfrescoTomcatUrl the URL for the webapp we want to post to @param postData the POST data that should be sent @param operation information about the operation we are performing
[ "Helper", "method", "to", "make", "a", "POST", "request", "to", "the", "Alfresco", "Webapp" ]
7f861a96726edb776293e2363ee85ef05643368b
https://github.com/Alfresco/alfresco-sdk/blob/7f861a96726edb776293e2363ee85ef05643368b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRefreshWebappMojo.java#L211-L271
119,878
Alfresco/alfresco-sdk
plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java
AbstractRunMojo.getPort
protected String getPort() { String port = tomcatPort; if (mavenTomcatPort != null) { port = mavenTomcatPort; getLog().info( "Tomcat Port overridden by property maven.tomcat.port"); } return port; }
java
protected String getPort() { String port = tomcatPort; if (mavenTomcatPort != null) { port = mavenTomcatPort; getLog().info( "Tomcat Port overridden by property maven.tomcat.port"); } return port; }
[ "protected", "String", "getPort", "(", ")", "{", "String", "port", "=", "tomcatPort", ";", "if", "(", "mavenTomcatPort", "!=", "null", ")", "{", "port", "=", "mavenTomcatPort", ";", "getLog", "(", ")", ".", "info", "(", "\"Tomcat Port overridden by property ma...
Get the Tomcat port. By default the port is changed by using the maven.alfresco.tomcat.port property but for legacy and external configuration purposes maven.tomcat.port will override if defined @return the Tomcat port
[ "Get", "the", "Tomcat", "port", ".", "By", "default", "the", "port", "is", "changed", "by", "using", "the", "maven", ".", "alfresco", ".", "tomcat", ".", "port", "property", "but", "for", "legacy", "and", "external", "configuration", "purposes", "maven", "...
7f861a96726edb776293e2363ee85ef05643368b
https://github.com/Alfresco/alfresco-sdk/blob/7f861a96726edb776293e2363ee85ef05643368b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java#L275-L283
119,879
Alfresco/alfresco-sdk
plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java
AbstractRunMojo.tomcatIsRunning
protected boolean tomcatIsRunning() { CloseableHttpClient client= HttpClients.createDefault(); CloseableHttpResponse response = null; try { HttpGet httpget = new HttpGet("http://localhost:" + getPort() + "/alfresco"); response = client.execute(httpget); get...
java
protected boolean tomcatIsRunning() { CloseableHttpClient client= HttpClients.createDefault(); CloseableHttpResponse response = null; try { HttpGet httpget = new HttpGet("http://localhost:" + getPort() + "/alfresco"); response = client.execute(httpget); get...
[ "protected", "boolean", "tomcatIsRunning", "(", ")", "{", "CloseableHttpClient", "client", "=", "HttpClients", ".", "createDefault", "(", ")", ";", "CloseableHttpResponse", "response", "=", "null", ";", "try", "{", "HttpGet", "httpget", "=", "new", "HttpGet", "(...
Check if Tomcat is already running. @return <code>true</code> if Tomcat is already running, <code>false</code> otherwise
[ "Check", "if", "Tomcat", "is", "already", "running", "." ]
7f861a96726edb776293e2363ee85ef05643368b
https://github.com/Alfresco/alfresco-sdk/blob/7f861a96726edb776293e2363ee85ef05643368b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java#L290-L306
119,880
Alfresco/alfresco-sdk
plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java
AbstractRunMojo.copyAlfrescoLicense
protected void copyAlfrescoLicense() throws MojoExecutionException { final String warOutputDir = getWarOutputDir(PLATFORM_WAR_PREFIX_NAME); final String licDestDir = warOutputDir + "/WEB-INF/classes/alfresco/extension/license"; getLog().info("Copying Alfresco Enterprise license to: " + licDest...
java
protected void copyAlfrescoLicense() throws MojoExecutionException { final String warOutputDir = getWarOutputDir(PLATFORM_WAR_PREFIX_NAME); final String licDestDir = warOutputDir + "/WEB-INF/classes/alfresco/extension/license"; getLog().info("Copying Alfresco Enterprise license to: " + licDest...
[ "protected", "void", "copyAlfrescoLicense", "(", ")", "throws", "MojoExecutionException", "{", "final", "String", "warOutputDir", "=", "getWarOutputDir", "(", "PLATFORM_WAR_PREFIX_NAME", ")", ";", "final", "String", "licDestDir", "=", "warOutputDir", "+", "\"/WEB-INF/cl...
Copy the Alfresco Enterprise license to its correct place in the Platform WAR, if it exists. It is not enough to have it on the test classpath, then it will start up as Trial license... @throws MojoExecutionException when any problem appears copying the Alfresco license
[ "Copy", "the", "Alfresco", "Enterprise", "license", "to", "its", "correct", "place", "in", "the", "Platform", "WAR", "if", "it", "exists", ".", "It", "is", "not", "enough", "to", "have", "it", "on", "the", "test", "classpath", "then", "it", "will", "star...
7f861a96726edb776293e2363ee85ef05643368b
https://github.com/Alfresco/alfresco-sdk/blob/7f861a96726edb776293e2363ee85ef05643368b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java#L383-L411
119,881
Alfresco/alfresco-sdk
plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java
AbstractRunMojo.copyShareConfigCustom
protected void copyShareConfigCustom() throws MojoExecutionException { final String warOutputDir = getWarOutputDir(SHARE_WAR_PREFIX_NAME); final String distDir = warOutputDir + "/WEB-INF/classes/alfresco/web-extension/"; String repoUrl = project.getProperties().getProperty("alfresco.repo.url"); ...
java
protected void copyShareConfigCustom() throws MojoExecutionException { final String warOutputDir = getWarOutputDir(SHARE_WAR_PREFIX_NAME); final String distDir = warOutputDir + "/WEB-INF/classes/alfresco/web-extension/"; String repoUrl = project.getProperties().getProperty("alfresco.repo.url"); ...
[ "protected", "void", "copyShareConfigCustom", "(", ")", "throws", "MojoExecutionException", "{", "final", "String", "warOutputDir", "=", "getWarOutputDir", "(", "SHARE_WAR_PREFIX_NAME", ")", ";", "final", "String", "distDir", "=", "warOutputDir", "+", "\"/WEB-INF/classe...
Copy Share Config Custom in order to have global overrides for development and dynamic port @throws MojoExecutionException when any problem appears copying share config custom file
[ "Copy", "Share", "Config", "Custom", "in", "order", "to", "have", "global", "overrides", "for", "development", "and", "dynamic", "port" ]
7f861a96726edb776293e2363ee85ef05643368b
https://github.com/Alfresco/alfresco-sdk/blob/7f861a96726edb776293e2363ee85ef05643368b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java#L420-L451
119,882
Alfresco/alfresco-sdk
plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java
AbstractRunMojo.copyHotswapAgentProperties
protected void copyHotswapAgentProperties(String warPrefix) throws MojoExecutionException { if ( copyHotswapAgentConfig == false ) { return; } final String warOutputDir = getWarOutputDir(warPrefix) + "/WEB-INF/classes/"; getLog().info("Copying " + warPrefix + "-hotswap-age...
java
protected void copyHotswapAgentProperties(String warPrefix) throws MojoExecutionException { if ( copyHotswapAgentConfig == false ) { return; } final String warOutputDir = getWarOutputDir(warPrefix) + "/WEB-INF/classes/"; getLog().info("Copying " + warPrefix + "-hotswap-age...
[ "protected", "void", "copyHotswapAgentProperties", "(", "String", "warPrefix", ")", "throws", "MojoExecutionException", "{", "if", "(", "copyHotswapAgentConfig", "==", "false", ")", "{", "return", ";", "}", "final", "String", "warOutputDir", "=", "getWarOutputDir", ...
Copy and Build hotswap-agent.properties @param warPrefix path to the war root directory @throws MojoExecutionException when any problem appears copying hotswap agent properties
[ "Copy", "and", "Build", "hotswap", "-", "agent", ".", "properties" ]
7f861a96726edb776293e2363ee85ef05643368b
https://github.com/Alfresco/alfresco-sdk/blob/7f861a96726edb776293e2363ee85ef05643368b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java#L503-L529
119,883
Alfresco/alfresco-sdk
plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java
AbstractRunMojo.packageAndInstallCustomWar
protected String packageAndInstallCustomWar(String warName) throws MojoExecutionException { final String warArtifactId = "${project.artifactId}-" + warName; final String warSourceDir = getWarOutputDir(warName); // Package the customized war file // Note. don't use the maven-war-plugin h...
java
protected String packageAndInstallCustomWar(String warName) throws MojoExecutionException { final String warArtifactId = "${project.artifactId}-" + warName; final String warSourceDir = getWarOutputDir(warName); // Package the customized war file // Note. don't use the maven-war-plugin h...
[ "protected", "String", "packageAndInstallCustomWar", "(", "String", "warName", ")", "throws", "MojoExecutionException", "{", "final", "String", "warArtifactId", "=", "\"${project.artifactId}-\"", "+", "warName", ";", "final", "String", "warSourceDir", "=", "getWarOutputDi...
Package customized war file and install it in local maven repo. @param warName the name of the custom war @return the customized war file artifactId, to be used by the tomcat7 plugin @throws MojoExecutionException when any problem appears packaging or installing the custom war
[ "Package", "customized", "war", "file", "and", "install", "it", "in", "local", "maven", "repo", "." ]
7f861a96726edb776293e2363ee85ef05643368b
https://github.com/Alfresco/alfresco-sdk/blob/7f861a96726edb776293e2363ee85ef05643368b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java#L716-L745
119,884
kite-sdk/kite
kite-data/kite-data-crunch/src/main/java/org/kitesdk/data/crunch/DatasetTarget.java
DatasetTarget.outputBundle
private static FormatBundle<DatasetKeyOutputFormat> outputBundle(Configuration conf) { FormatBundle<DatasetKeyOutputFormat> bundle = FormatBundle .forOutput(DatasetKeyOutputFormat.class); for (Map.Entry<String, String> entry : conf) { bundle.set(entry.getKey(), entry.getValue()); } return ...
java
private static FormatBundle<DatasetKeyOutputFormat> outputBundle(Configuration conf) { FormatBundle<DatasetKeyOutputFormat> bundle = FormatBundle .forOutput(DatasetKeyOutputFormat.class); for (Map.Entry<String, String> entry : conf) { bundle.set(entry.getKey(), entry.getValue()); } return ...
[ "private", "static", "FormatBundle", "<", "DatasetKeyOutputFormat", ">", "outputBundle", "(", "Configuration", "conf", ")", "{", "FormatBundle", "<", "DatasetKeyOutputFormat", ">", "bundle", "=", "FormatBundle", ".", "forOutput", "(", "DatasetKeyOutputFormat", ".", "c...
Builds a FormatBundle for DatasetKeyOutputFormat by copying a temp config. All properties will be copied from the temporary configuration @param conf A Configuration that will be copied @return a FormatBundle with the contents of conf
[ "Builds", "a", "FormatBundle", "for", "DatasetKeyOutputFormat", "by", "copying", "a", "temp", "config", "." ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-crunch/src/main/java/org/kitesdk/data/crunch/DatasetTarget.java#L223-L230
119,885
kite-sdk/kite
kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/SchemaValidationUtil.java
SchemaValidationUtil.hasErrors
private static boolean hasErrors(Symbol symbol) { switch(symbol.kind) { case ALTERNATIVE: return hasErrors(symbol, ((Symbol.Alternative) symbol).symbols); case EXPLICIT_ACTION: return false; case IMPLICIT_ACTION: return symbol instanceof Symbol.ErrorAction; case REPEA...
java
private static boolean hasErrors(Symbol symbol) { switch(symbol.kind) { case ALTERNATIVE: return hasErrors(symbol, ((Symbol.Alternative) symbol).symbols); case EXPLICIT_ACTION: return false; case IMPLICIT_ACTION: return symbol instanceof Symbol.ErrorAction; case REPEA...
[ "private", "static", "boolean", "hasErrors", "(", "Symbol", "symbol", ")", "{", "switch", "(", "symbol", ".", "kind", ")", "{", "case", "ALTERNATIVE", ":", "return", "hasErrors", "(", "symbol", ",", "(", "(", "Symbol", ".", "Alternative", ")", "symbol", ...
Returns true if the Parser contains any Error symbol, indicating that it may fail for some inputs.
[ "Returns", "true", "if", "the", "Parser", "contains", "any", "Error", "symbol", "indicating", "that", "it", "may", "fail", "for", "some", "inputs", "." ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/SchemaValidationUtil.java#L39-L58
119,886
kite-sdk/kite
kite-tools-parent/kite-tools/src/main/java/org/kitesdk/cli/commands/JSONSchemaCommand.java
JSONSchemaCommand.run
@Override public int run() throws IOException { Preconditions.checkArgument(samplePaths != null && !samplePaths.isEmpty(), "Sample JSON path is required"); Preconditions.checkArgument(samplePaths.size() == 1, "Only one JSON sample can be given"); // assume fields are nullable by default, ...
java
@Override public int run() throws IOException { Preconditions.checkArgument(samplePaths != null && !samplePaths.isEmpty(), "Sample JSON path is required"); Preconditions.checkArgument(samplePaths.size() == 1, "Only one JSON sample can be given"); // assume fields are nullable by default, ...
[ "@", "Override", "public", "int", "run", "(", ")", "throws", "IOException", "{", "Preconditions", ".", "checkArgument", "(", "samplePaths", "!=", "null", "&&", "!", "samplePaths", ".", "isEmpty", "(", ")", ",", "\"Sample JSON path is required\"", ")", ";", "Pr...
By default we look at first 10 records
[ "By", "default", "we", "look", "at", "first", "10", "records" ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-tools-parent/kite-tools/src/main/java/org/kitesdk/cli/commands/JSONSchemaCommand.java#L70-L88
119,887
kite-sdk/kite
kite-data/kite-data-oozie/src/main/java/org/kitesdk/data/oozie/KiteConfigurationService.java
KiteConfigurationService.loadKiteConf
private void loadKiteConf(Services services) throws IOException { String[] paths = services.getConf().getStrings(KITE_CONFIGURATION); if (paths != null && paths.length != 0) { kiteConf = new Configuration(false); for(String path : paths) { if (path.startsWith("hdfs")) { Path p = ...
java
private void loadKiteConf(Services services) throws IOException { String[] paths = services.getConf().getStrings(KITE_CONFIGURATION); if (paths != null && paths.length != 0) { kiteConf = new Configuration(false); for(String path : paths) { if (path.startsWith("hdfs")) { Path p = ...
[ "private", "void", "loadKiteConf", "(", "Services", "services", ")", "throws", "IOException", "{", "String", "[", "]", "paths", "=", "services", ".", "getConf", "(", ")", ".", "getStrings", "(", "KITE_CONFIGURATION", ")", ";", "if", "(", "paths", "!=", "nu...
ability to specify multiple paths to configurations
[ "ability", "to", "specify", "multiple", "paths", "to", "configurations" ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-oozie/src/main/java/org/kitesdk/data/oozie/KiteConfigurationService.java#L61-L113
119,888
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.get
public Result get(Get get) { HTableInterface table = pool.getTable(tableName); try { for (GetModifier getModifier : getModifiers) { get = getModifier.modifyGet(get); } try { return table.get(get); } catch (IOException e) { throw new DatasetIOException("Error perfo...
java
public Result get(Get get) { HTableInterface table = pool.getTable(tableName); try { for (GetModifier getModifier : getModifiers) { get = getModifier.modifyGet(get); } try { return table.get(get); } catch (IOException e) { throw new DatasetIOException("Error perfo...
[ "public", "Result", "get", "(", "Get", "get", ")", "{", "HTableInterface", "table", "=", "pool", ".", "getTable", "(", "tableName", ")", ";", "try", "{", "for", "(", "GetModifier", "getModifier", ":", "getModifiers", ")", "{", "get", "=", "getModifier", ...
Execute a Get on HBase. Any GetModifers registered with registerGetModifier will be invoked before the Get is executed. @param get The Get to execute @return Result returned from the Get.
[ "Execute", "a", "Get", "on", "HBase", "." ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L263-L283
119,889
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.get
public Result get(Get get, GetModifier getModifier) { if (getModifier != null) { get = getModifier.modifyGet(get); } return get(get); }
java
public Result get(Get get, GetModifier getModifier) { if (getModifier != null) { get = getModifier.modifyGet(get); } return get(get); }
[ "public", "Result", "get", "(", "Get", "get", ",", "GetModifier", "getModifier", ")", "{", "if", "(", "getModifier", "!=", "null", ")", "{", "get", "=", "getModifier", ".", "modifyGet", "(", "get", ")", ";", "}", "return", "get", "(", "get", ")", ";"...
Execute the get on HBase, invoking the getModifier before executing the get if getModifier is not null. Any GetModifers registered with registerGetModifier will be invoked before the Get is executed, and after the getModifier passed to this function are called. @param get The Get to execute. @param getModifier Invoke...
[ "Execute", "the", "get", "on", "HBase", "invoking", "the", "getModifier", "before", "executing", "the", "get", "if", "getModifier", "is", "not", "null", "." ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L300-L305
119,890
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.put
public boolean put(PutAction putAction) { HTableInterface table = pool.getTable(tableName); try { return put(putAction, table); } finally { if (table != null) { try { table.close(); } catch (IOException e) { throw new DatasetIOException("Error putting table ba...
java
public boolean put(PutAction putAction) { HTableInterface table = pool.getTable(tableName); try { return put(putAction, table); } finally { if (table != null) { try { table.close(); } catch (IOException e) { throw new DatasetIOException("Error putting table ba...
[ "public", "boolean", "put", "(", "PutAction", "putAction", ")", "{", "HTableInterface", "table", "=", "pool", ".", "getTable", "(", "tableName", ")", ";", "try", "{", "return", "put", "(", "putAction", ",", "table", ")", ";", "}", "finally", "{", "if", ...
Execute a Put on HBase. Any PutModifers registered with registerPutModifier will be invoked before the Put is executed. @param putAction The put to execute on HBase. @return True if the put succeeded, False if the put failed due to update conflict
[ "Execute", "a", "Put", "on", "HBase", "." ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L370-L383
119,891
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.put
public boolean put(PutAction putAction, HTableInterface table) { for (PutActionModifier putActionModifier : putActionModifiers) { putAction = putActionModifier.modifyPutAction(putAction); } Put put = putAction.getPut(); if (putAction.getVersionCheckAction() != null) { byte[] versionBytes = n...
java
public boolean put(PutAction putAction, HTableInterface table) { for (PutActionModifier putActionModifier : putActionModifiers) { putAction = putActionModifier.modifyPutAction(putAction); } Put put = putAction.getPut(); if (putAction.getVersionCheckAction() != null) { byte[] versionBytes = n...
[ "public", "boolean", "put", "(", "PutAction", "putAction", ",", "HTableInterface", "table", ")", "{", "for", "(", "PutActionModifier", "putActionModifier", ":", "putActionModifiers", ")", "{", "putAction", "=", "putActionModifier", ".", "modifyPutAction", "(", "putA...
Execute a Put on HBase using a pre-define HTableInterface Any PutModifers registered with registerPutModifier will be invoked before the Put is executed. @param putAction The put to execute on HBase. @param table The HTableInterface object to interface with @return True if the put succeeded, False if the put failed d...
[ "Execute", "a", "Put", "on", "HBase", "using", "a", "pre", "-", "define", "HTableInterface" ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L398-L424
119,892
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.put
public boolean put(PutAction putAction, PutActionModifier putActionModifier) { if (putActionModifier != null) { putAction = putActionModifier.modifyPutAction(putAction); } return put(putAction); }
java
public boolean put(PutAction putAction, PutActionModifier putActionModifier) { if (putActionModifier != null) { putAction = putActionModifier.modifyPutAction(putAction); } return put(putAction); }
[ "public", "boolean", "put", "(", "PutAction", "putAction", ",", "PutActionModifier", "putActionModifier", ")", "{", "if", "(", "putActionModifier", "!=", "null", ")", "{", "putAction", "=", "putActionModifier", ".", "modifyPutAction", "(", "putAction", ")", ";", ...
Execute the put on HBase, invoking the putModifier before executing the put if putModifier is not null. Any PutModifers registered with registerPutModifier will be invoked after the putModifier passed to this method is invoked, and before the Put is executed. @param putAction The PutAction to execute on HBase. @param...
[ "Execute", "the", "put", "on", "HBase", "invoking", "the", "putModifier", "before", "executing", "the", "put", "if", "putModifier", "is", "not", "null", "." ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L442-L447
119,893
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.put
public <E> boolean put(E entity, EntityMapper<E> entityMapper) { return put(entity, null, entityMapper); }
java
public <E> boolean put(E entity, EntityMapper<E> entityMapper) { return put(entity, null, entityMapper); }
[ "public", "<", "E", ">", "boolean", "put", "(", "E", "entity", ",", "EntityMapper", "<", "E", ">", "entityMapper", ")", "{", "return", "put", "(", "entity", ",", "null", ",", "entityMapper", ")", ";", "}" ]
Execute a Put on HBase, creating the Put by mapping the key and entity to a Put with the entityMapper. Any PutModifers registered with registerPutModifier will be invoked before the Put is executed. @param entity The entity to map to a Put with the entityMapper. @param entityMapper The EntityMapper to map the key and...
[ "Execute", "a", "Put", "on", "HBase", "creating", "the", "Put", "by", "mapping", "the", "key", "and", "entity", "to", "a", "Put", "with", "the", "entityMapper", "." ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L463-L465
119,894
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.put
public <E> boolean put(E entity, PutActionModifier putActionModifier, EntityMapper<E> entityMapper) { PutAction putAction = entityMapper.mapFromEntity(entity); return put(putAction, putActionModifier); }
java
public <E> boolean put(E entity, PutActionModifier putActionModifier, EntityMapper<E> entityMapper) { PutAction putAction = entityMapper.mapFromEntity(entity); return put(putAction, putActionModifier); }
[ "public", "<", "E", ">", "boolean", "put", "(", "E", "entity", ",", "PutActionModifier", "putActionModifier", ",", "EntityMapper", "<", "E", ">", "entityMapper", ")", "{", "PutAction", "putAction", "=", "entityMapper", ".", "mapFromEntity", "(", "entity", ")",...
Execute a Put on HBase, creating the Put by mapping the key and entity to a Put with the entityMapper. putModifier will be invoked on this created Put before the Put is executed. Any PutModifers registered with registerPutModifier will be invoked after the putModifier passed to this method is invoked, and before the P...
[ "Execute", "a", "Put", "on", "HBase", "creating", "the", "Put", "by", "mapping", "the", "key", "and", "entity", "to", "a", "Put", "with", "the", "entityMapper", ".", "putModifier", "will", "be", "invoked", "on", "this", "created", "Put", "before", "the", ...
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L486-L490
119,895
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.increment
public <E> long increment(PartitionKey key, String fieldName, long amount, EntityMapper<E> entityMapper) { Increment increment = entityMapper.mapToIncrement(key, fieldName, amount); HTableInterface table = pool.getTable(tableName); Result result; try { result = table.increment(increment); ...
java
public <E> long increment(PartitionKey key, String fieldName, long amount, EntityMapper<E> entityMapper) { Increment increment = entityMapper.mapToIncrement(key, fieldName, amount); HTableInterface table = pool.getTable(tableName); Result result; try { result = table.increment(increment); ...
[ "public", "<", "E", ">", "long", "increment", "(", "PartitionKey", "key", ",", "String", "fieldName", ",", "long", "amount", ",", "EntityMapper", "<", "E", ">", "entityMapper", ")", "{", "Increment", "increment", "=", "entityMapper", ".", "mapToIncrement", "...
Execute an increment on an entity field. This field must be a type that supports increments. Returns the new increment value of type long. @param key The key to map to an Increment @param fieldName The name of the field we are incrementing @param amount The amount to increment by @param entityMapper The EntityMapper t...
[ "Execute", "an", "increment", "on", "an", "entity", "field", ".", "This", "field", "must", "be", "a", "type", "that", "supports", "increments", ".", "Returns", "the", "new", "increment", "value", "of", "type", "long", "." ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L507-L519
119,896
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.delete
public boolean delete(DeleteAction deleteAction) { HTableInterface table = pool.getTable(tableName); try { for (DeleteActionModifier deleteActionModifier : deleteActionModifiers) { deleteAction = deleteActionModifier.modifyDeleteAction(deleteAction); } Delete delete = deleteAction.getD...
java
public boolean delete(DeleteAction deleteAction) { HTableInterface table = pool.getTable(tableName); try { for (DeleteActionModifier deleteActionModifier : deleteActionModifiers) { deleteAction = deleteActionModifier.modifyDeleteAction(deleteAction); } Delete delete = deleteAction.getD...
[ "public", "boolean", "delete", "(", "DeleteAction", "deleteAction", ")", "{", "HTableInterface", "table", "=", "pool", ".", "getTable", "(", "tableName", ")", ";", "try", "{", "for", "(", "DeleteActionModifier", "deleteActionModifier", ":", "deleteActionModifiers", ...
Execute a Delete on HBase. Any DeleteActionModifers registered with registerDeleteModifier will be invoked before the Delete is executed. @param deleteAction The delete to execute on HBase. @return True if the delete succeeded, False if the put failed due to update conflict
[ "Execute", "a", "Delete", "on", "HBase", "." ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L532-L567
119,897
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.delete
public boolean delete(DeleteAction deleteAction, DeleteActionModifier deleteActionModifier) { if (deleteActionModifier != null) { deleteAction = deleteActionModifier.modifyDeleteAction(deleteAction); } return delete(deleteAction); }
java
public boolean delete(DeleteAction deleteAction, DeleteActionModifier deleteActionModifier) { if (deleteActionModifier != null) { deleteAction = deleteActionModifier.modifyDeleteAction(deleteAction); } return delete(deleteAction); }
[ "public", "boolean", "delete", "(", "DeleteAction", "deleteAction", ",", "DeleteActionModifier", "deleteActionModifier", ")", "{", "if", "(", "deleteActionModifier", "!=", "null", ")", "{", "deleteAction", "=", "deleteActionModifier", ".", "modifyDeleteAction", "(", "...
Execute the delete on HBase, invoking the deleteModifier before executing the delete if deleteModifier is not null. Any DeleteActionModifers registered with registerDeleteModifier will be invoked after the deleteActionModifier passed to this method is invoked, and before the Delete is executed. @param deleteAction Th...
[ "Execute", "the", "delete", "on", "HBase", "invoking", "the", "deleteModifier", "before", "executing", "the", "delete", "if", "deleteModifier", "is", "not", "null", "." ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L585-L591
119,898
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.delete
public boolean delete(PartitionKey key, Set<String> columns, VersionCheckAction checkAction, KeySerDe keySerDe) { return delete(key, columns, checkAction, null, keySerDe); }
java
public boolean delete(PartitionKey key, Set<String> columns, VersionCheckAction checkAction, KeySerDe keySerDe) { return delete(key, columns, checkAction, null, keySerDe); }
[ "public", "boolean", "delete", "(", "PartitionKey", "key", ",", "Set", "<", "String", ">", "columns", ",", "VersionCheckAction", "checkAction", ",", "KeySerDe", "keySerDe", ")", "{", "return", "delete", "(", "key", ",", "columns", ",", "checkAction", ",", "n...
Execute a Delete on HBase, creating the Delete from the key, and the set of columns. Only the columns specified in this set will be deleted in the row. Any DeleteActionModifers registered with registerDeleteModifier will be invoked before the Delete is executed. @param key The StorageKey to map to a Put with the enti...
[ "Execute", "a", "Delete", "on", "HBase", "creating", "the", "Delete", "from", "the", "key", "and", "the", "set", "of", "columns", ".", "Only", "the", "columns", "specified", "in", "this", "set", "will", "be", "deleted", "in", "the", "row", "." ]
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L610-L613
119,899
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java
HBaseClientTemplate.delete
public boolean delete(PartitionKey key, Set<String> columns, VersionCheckAction checkAction, DeleteActionModifier deleteActionModifier, KeySerDe keySerDe) { byte[] keyBytes = keySerDe.serialize(key); Delete delete = new Delete(keyBytes); for (String requiredColumn : columns) { String[] fam...
java
public boolean delete(PartitionKey key, Set<String> columns, VersionCheckAction checkAction, DeleteActionModifier deleteActionModifier, KeySerDe keySerDe) { byte[] keyBytes = keySerDe.serialize(key); Delete delete = new Delete(keyBytes); for (String requiredColumn : columns) { String[] fam...
[ "public", "boolean", "delete", "(", "PartitionKey", "key", ",", "Set", "<", "String", ">", "columns", ",", "VersionCheckAction", "checkAction", ",", "DeleteActionModifier", "deleteActionModifier", ",", "KeySerDe", "keySerDe", ")", "{", "byte", "[", "]", "keyBytes"...
Execute a Delete on HBase, creating the Delete from the key, and the set of columns. Only the columns specified in this set will be deleted in the row. deleteModifier will be invoked on this created Delete before the Delete is executed. Any DeleteActionModifers registered with registerDeleteActionModifier will be invo...
[ "Execute", "a", "Delete", "on", "HBase", "creating", "the", "Delete", "from", "the", "key", "and", "the", "set", "of", "columns", ".", "Only", "the", "columns", "specified", "in", "this", "set", "will", "be", "deleted", "in", "the", "row", ".", "deleteMo...
72bfb4b1a881af85808cd7f14bc3e15160a1e811
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L638-L653