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
115,300
jbake-org/jbake
jbake-core/src/main/java/org/jbake/parser/MarkupEngine.java
MarkupEngine.processDefaultBody
private void processDefaultBody(ParserContext context) { StringBuilder body = new StringBuilder(); boolean inBody = false; for (String line : context.getFileLines()) { if (inBody) { body.append(line).append("\n"); } if (line.equals(configuratio...
java
private void processDefaultBody(ParserContext context) { StringBuilder body = new StringBuilder(); boolean inBody = false; for (String line : context.getFileLines()) { if (inBody) { body.append(line).append("\n"); } if (line.equals(configuratio...
[ "private", "void", "processDefaultBody", "(", "ParserContext", "context", ")", "{", "StringBuilder", "body", "=", "new", "StringBuilder", "(", ")", ";", "boolean", "inBody", "=", "false", ";", "for", "(", "String", "line", ":", "context", ".", "getFileLines", ...
Process the body of the file. @param context the parser context
[ "Process", "the", "body", "of", "the", "file", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/parser/MarkupEngine.java#L318-L336
115,301
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/ZipUtil.java
ZipUtil.extract
public static void extract(InputStream is, File outputFolder) throws IOException { ZipInputStream zis = new ZipInputStream(is); ZipEntry entry; byte[] buffer = new byte[1024]; while ((entry = zis.getNextEntry()) != null) { File outputFile = new File(outputFolder.getCanonical...
java
public static void extract(InputStream is, File outputFolder) throws IOException { ZipInputStream zis = new ZipInputStream(is); ZipEntry entry; byte[] buffer = new byte[1024]; while ((entry = zis.getNextEntry()) != null) { File outputFile = new File(outputFolder.getCanonical...
[ "public", "static", "void", "extract", "(", "InputStream", "is", ",", "File", "outputFolder", ")", "throws", "IOException", "{", "ZipInputStream", "zis", "=", "new", "ZipInputStream", "(", "is", ")", ";", "ZipEntry", "entry", ";", "byte", "[", "]", "buffer",...
Extracts content of Zip file to specified output path. @param is {@link InputStream} InputStream of Zip file @param outputFolder folder where Zip file should be extracted to @throws IOException if IOException occurs
[ "Extracts", "content", "of", "Zip", "file", "to", "specified", "output", "path", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/ZipUtil.java#L25-L48
115,302
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/Asset.java
Asset.copy
public void copy(File path) { FileFilter filter = new FileFilter() { @Override public boolean accept(File file) { return (!config.getAssetIgnoreHidden() || !file.isHidden()) && (file.isFile() || FileUtil.directoryOnlyIfNotIgnored(file)); } }; c...
java
public void copy(File path) { FileFilter filter = new FileFilter() { @Override public boolean accept(File file) { return (!config.getAssetIgnoreHidden() || !file.isHidden()) && (file.isFile() || FileUtil.directoryOnlyIfNotIgnored(file)); } }; c...
[ "public", "void", "copy", "(", "File", "path", ")", "{", "FileFilter", "filter", "=", "new", "FileFilter", "(", ")", "{", "@", "Override", "public", "boolean", "accept", "(", "File", "file", ")", "{", "return", "(", "!", "config", ".", "getAssetIgnoreHid...
Copy all files from supplied path. @param path The starting path
[ "Copy", "all", "files", "from", "supplied", "path", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/Asset.java#L64-L72
115,303
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/Asset.java
Asset.copySingleFile
public void copySingleFile(File asset) { try { if ( !asset.isDirectory() ) { String targetPath = config.getDestinationFolder().getCanonicalPath() + File.separatorChar + assetSubPath(asset); LOGGER.info("Copying single asset file to [{}]", targetPath); ...
java
public void copySingleFile(File asset) { try { if ( !asset.isDirectory() ) { String targetPath = config.getDestinationFolder().getCanonicalPath() + File.separatorChar + assetSubPath(asset); LOGGER.info("Copying single asset file to [{}]", targetPath); ...
[ "public", "void", "copySingleFile", "(", "File", "asset", ")", "{", "try", "{", "if", "(", "!", "asset", ".", "isDirectory", "(", ")", ")", "{", "String", "targetPath", "=", "config", ".", "getDestinationFolder", "(", ")", ".", "getCanonicalPath", "(", "...
Copy one asset file at a time. @param asset The asset file to copy
[ "Copy", "one", "asset", "file", "at", "a", "time", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/Asset.java#L79-L91
115,304
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/Asset.java
Asset.isAssetFile
public boolean isAssetFile(File path) { boolean isAsset = false; try { if(FileUtil.directoryOnlyIfNotIgnored(path.getParentFile())) { if (FileUtil.isFileInDirectory(path, config.getAssetFolder())) { isAsset = true; } else if (FileUtil.isFi...
java
public boolean isAssetFile(File path) { boolean isAsset = false; try { if(FileUtil.directoryOnlyIfNotIgnored(path.getParentFile())) { if (FileUtil.isFileInDirectory(path, config.getAssetFolder())) { isAsset = true; } else if (FileUtil.isFi...
[ "public", "boolean", "isAssetFile", "(", "File", "path", ")", "{", "boolean", "isAsset", "=", "false", ";", "try", "{", "if", "(", "FileUtil", ".", "directoryOnlyIfNotIgnored", "(", "path", ".", "getParentFile", "(", ")", ")", ")", "{", "if", "(", "FileU...
Determine if a given file is an asset file. @param path to the file to validate. @return true if the path provided points to a file in the asset folder.
[ "Determine", "if", "a", "given", "file", "is", "an", "asset", "file", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/Asset.java#L98-L114
115,305
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/Oven.java
Oven.bake
public void bake(File fileToBake) { Asset asset = utensils.getAsset(); if(asset.isAssetFile(fileToBake)) { LOGGER.info("Baking a change to an asset [" + fileToBake.getPath() + "]"); asset.copySingleFile(fileToBake); } else { LOGGER.info("Playing it safe and ru...
java
public void bake(File fileToBake) { Asset asset = utensils.getAsset(); if(asset.isAssetFile(fileToBake)) { LOGGER.info("Baking a change to an asset [" + fileToBake.getPath() + "]"); asset.copySingleFile(fileToBake); } else { LOGGER.info("Playing it safe and ru...
[ "public", "void", "bake", "(", "File", "fileToBake", ")", "{", "Asset", "asset", "=", "utensils", ".", "getAsset", "(", ")", ";", "if", "(", "asset", ".", "isAssetFile", "(", "fileToBake", ")", ")", "{", "LOGGER", ".", "info", "(", "\"Baking a change to ...
Responsible for incremental baking, typically a single file at a time. @param fileToBake The file to bake
[ "Responsible", "for", "incremental", "baking", "typically", "a", "single", "file", "at", "a", "time", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/Oven.java#L122-L131
115,306
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/Oven.java
Oven.bake
public void bake() { ContentStore contentStore = utensils.getContentStore(); JBakeConfiguration config = utensils.getConfiguration(); Crawler crawler = utensils.getCrawler(); Asset asset = utensils.getAsset(); try { final long start = new Date().getTime(); ...
java
public void bake() { ContentStore contentStore = utensils.getContentStore(); JBakeConfiguration config = utensils.getConfiguration(); Crawler crawler = utensils.getCrawler(); Asset asset = utensils.getAsset(); try { final long start = new Date().getTime(); ...
[ "public", "void", "bake", "(", ")", "{", "ContentStore", "contentStore", "=", "utensils", ".", "getContentStore", "(", ")", ";", "JBakeConfiguration", "config", "=", "utensils", ".", "getConfiguration", "(", ")", ";", "Crawler", "crawler", "=", "utensils", "."...
All the good stuff happens in here...
[ "All", "the", "good", "stuff", "happens", "in", "here", "..." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/Oven.java#L136-L174
115,307
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/Oven.java
Oven.updateDocTypesFromConfiguration
private void updateDocTypesFromConfiguration() { resetDocumentTypesAndExtractors(); JBakeConfiguration config = utensils.getConfiguration(); ModelExtractorsDocumentTypeListener listener = new ModelExtractorsDocumentTypeListener(); DocumentTypes.addListener(listener); for (Strin...
java
private void updateDocTypesFromConfiguration() { resetDocumentTypesAndExtractors(); JBakeConfiguration config = utensils.getConfiguration(); ModelExtractorsDocumentTypeListener listener = new ModelExtractorsDocumentTypeListener(); DocumentTypes.addListener(listener); for (Strin...
[ "private", "void", "updateDocTypesFromConfiguration", "(", ")", "{", "resetDocumentTypesAndExtractors", "(", ")", ";", "JBakeConfiguration", "config", "=", "utensils", ".", "getConfiguration", "(", ")", ";", "ModelExtractorsDocumentTypeListener", "listener", "=", "new", ...
Iterates over the configuration, searching for keys like "template.index.file=..." in order to register new document types.
[ "Iterates", "over", "the", "configuration", "searching", "for", "keys", "like", "template", ".", "index", ".", "file", "=", "...", "in", "order", "to", "register", "new", "document", "types", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/Oven.java#L180-L190
115,308
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/DBUtil.java
DBUtil.toStringArray
@SuppressWarnings("unchecked") public static String[] toStringArray(Object entry) { if (entry instanceof String[]) { return (String[]) entry; } else if (entry instanceof OTrackedList) { OTrackedList<String> list = (OTrackedList<String>) entry; return list.toArray(...
java
@SuppressWarnings("unchecked") public static String[] toStringArray(Object entry) { if (entry instanceof String[]) { return (String[]) entry; } else if (entry instanceof OTrackedList) { OTrackedList<String> list = (OTrackedList<String>) entry; return list.toArray(...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "String", "[", "]", "toStringArray", "(", "Object", "entry", ")", "{", "if", "(", "entry", "instanceof", "String", "[", "]", ")", "{", "return", "(", "String", "[", "]", ")", "entry"...
Converts a DB list into a String array @param entry Entry input to be converted @return input entry as String[]
[ "Converts", "a", "DB", "list", "into", "a", "String", "array" ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/DBUtil.java#L56-L65
115,309
jbake-org/jbake
jbake-core/src/main/java/org/jbake/render/DocumentsRenderer.java
DocumentsRenderer.getContentForNav
private Map<String, Object> getContentForNav(Map<String, Object> document) { Map<String, Object> navDocument = new HashMap<>(); navDocument.put(Attributes.NO_EXTENSION_URI, document.get(Attributes.NO_EXTENSION_URI)); navDocument.put(Attributes.URI, document.get(Attributes.URI)); navDocum...
java
private Map<String, Object> getContentForNav(Map<String, Object> document) { Map<String, Object> navDocument = new HashMap<>(); navDocument.put(Attributes.NO_EXTENSION_URI, document.get(Attributes.NO_EXTENSION_URI)); navDocument.put(Attributes.URI, document.get(Attributes.URI)); navDocum...
[ "private", "Map", "<", "String", ",", "Object", ">", "getContentForNav", "(", "Map", "<", "String", ",", "Object", ">", "document", ")", "{", "Map", "<", "String", ",", "Object", ">", "navDocument", "=", "new", "HashMap", "<>", "(", ")", ";", "navDocum...
Creates a simple content model to use in individual post navigations. @param document @return
[ "Creates", "a", "simple", "content", "model", "to", "use", "in", "individual", "post", "navigations", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/render/DocumentsRenderer.java#L80-L86
115,310
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/ContentStore.java
ContentStore.mergeDocument
public ODocument mergeDocument(Map<String, ? extends Object> incomingDocMap) { String sourceUri = (String) incomingDocMap.get(DocumentAttributes.SOURCE_URI.toString()); if (null == sourceUri) throw new IllegalArgumentException("Document sourceUri is null."); String docType = (Str...
java
public ODocument mergeDocument(Map<String, ? extends Object> incomingDocMap) { String sourceUri = (String) incomingDocMap.get(DocumentAttributes.SOURCE_URI.toString()); if (null == sourceUri) throw new IllegalArgumentException("Document sourceUri is null."); String docType = (Str...
[ "public", "ODocument", "mergeDocument", "(", "Map", "<", "String", ",", "?", "extends", "Object", ">", "incomingDocMap", ")", "{", "String", "sourceUri", "=", "(", "String", ")", "incomingDocMap", ".", "get", "(", "DocumentAttributes", ".", "SOURCE_URI", ".", ...
Get a document by sourceUri and update it from the given map. @param incomingDocMap The document's db columns. @return The saved document. @throws IllegalArgumentException if sourceUri or docType are null, or if the document doesn't exist.
[ "Get", "a", "document", "by", "sourceUri", "and", "update", "it", "from", "the", "given", "map", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/ContentStore.java#L194-L215
115,311
jbake-org/jbake
jbake-core/src/main/java/org/jbake/launcher/Init.java
Init.run
public void run(File outputFolder, File templateLocationFolder, String templateType) throws Exception { if (!outputFolder.canWrite()) { throw new Exception("Output folder is not writeable!"); } File[] contents = outputFolder.listFiles(); boolean safe = true; if (cont...
java
public void run(File outputFolder, File templateLocationFolder, String templateType) throws Exception { if (!outputFolder.canWrite()) { throw new Exception("Output folder is not writeable!"); } File[] contents = outputFolder.listFiles(); boolean safe = true; if (cont...
[ "public", "void", "run", "(", "File", "outputFolder", ",", "File", "templateLocationFolder", ",", "String", "templateType", ")", "throws", "Exception", "{", "if", "(", "!", "outputFolder", ".", "canWrite", "(", ")", ")", "{", "throw", "new", "Exception", "("...
Performs checks on output folder before extracting template file @param outputFolder Target directory for extracting template file @param templateLocationFolder Source location for template file @param templateType Type of the template to be used @throws Exception ...
[ "Performs", "checks", "on", "output", "folder", "before", "extracting", "template", "file" ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/launcher/Init.java#L42-L78
115,312
jbake-org/jbake
jbake-core/src/main/java/org/jbake/launcher/JettyServer.java
JettyServer.run
public void run(String path, String port) { Server server = new Server(); ServerConnector connector = new ServerConnector(server); connector.setHost("localhost"); connector.setPort(Integer.parseInt(port)); server.addConnector(connector); ResourceHandler resource_handler ...
java
public void run(String path, String port) { Server server = new Server(); ServerConnector connector = new ServerConnector(server); connector.setHost("localhost"); connector.setPort(Integer.parseInt(port)); server.addConnector(connector); ResourceHandler resource_handler ...
[ "public", "void", "run", "(", "String", "path", ",", "String", "port", ")", "{", "Server", "server", "=", "new", "Server", "(", ")", ";", "ServerConnector", "connector", "=", "new", "ServerConnector", "(", "server", ")", ";", "connector", ".", "setHost", ...
Run Jetty web server serving out supplied path on supplied port @param path Base directory for resourced to be served @param port Required server port
[ "Run", "Jetty", "web", "server", "serving", "out", "supplied", "path", "on", "supplied", "port" ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/launcher/JettyServer.java#L27-L53
115,313
jbake-org/jbake
jbake-core/src/main/java/org/jbake/launcher/Main.java
Main.main
public static void main(final String[] args) { try { new Main().run(args); } catch (final JBakeException e) { System.err.println(e.getMessage()); e.printStackTrace(); System.exit(1); } catch (final Throwable e) { System.err.println("An ...
java
public static void main(final String[] args) { try { new Main().run(args); } catch (final JBakeException e) { System.err.println(e.getMessage()); e.printStackTrace(); System.exit(1); } catch (final Throwable e) { System.err.println("An ...
[ "public", "static", "void", "main", "(", "final", "String", "[", "]", "args", ")", "{", "try", "{", "new", "Main", "(", ")", ".", "run", "(", "args", ")", ";", "}", "catch", "(", "final", "JBakeException", "e", ")", "{", "System", ".", "err", "."...
Runs the app with the given arguments. @param args Application arguments
[ "Runs", "the", "app", "with", "the", "given", "arguments", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/launcher/Main.java#L54-L66
115,314
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/Renderer.java
Renderer.render
public void render(Map<String, Object> content) throws Exception { String docType = (String) content.get(Crawler.Attributes.TYPE); String outputFilename = config.getDestinationFolder().getPath() + File.separatorChar + content.get(Attributes.URI); if (outputFilename.lastIndexOf('.') > outputFilen...
java
public void render(Map<String, Object> content) throws Exception { String docType = (String) content.get(Crawler.Attributes.TYPE); String outputFilename = config.getDestinationFolder().getPath() + File.separatorChar + content.get(Attributes.URI); if (outputFilename.lastIndexOf('.') > outputFilen...
[ "public", "void", "render", "(", "Map", "<", "String", ",", "Object", ">", "content", ")", "throws", "Exception", "{", "String", "docType", "=", "(", "String", ")", "content", ".", "get", "(", "Crawler", ".", "Attributes", ".", "TYPE", ")", ";", "Strin...
Render the supplied content to a file. @param content The content to renderDocument @throws Exception if IOException or SecurityException are raised
[ "Render", "the", "supplied", "content", "to", "a", "file", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/Renderer.java#L109-L146
115,315
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/Renderer.java
Renderer.renderTags
public int renderTags(String tagPath) throws Exception { int renderedCount = 0; final List<Throwable> errors = new LinkedList<>(); for (String tag : db.getAllTags()) { try { Map<String, Object> model = new HashMap<>(); model.put("renderer", renderingE...
java
public int renderTags(String tagPath) throws Exception { int renderedCount = 0; final List<Throwable> errors = new LinkedList<>(); for (String tag : db.getAllTags()) { try { Map<String, Object> model = new HashMap<>(); model.put("renderer", renderingE...
[ "public", "int", "renderTags", "(", "String", "tagPath", ")", "throws", "Exception", "{", "int", "renderedCount", "=", "0", ";", "final", "List", "<", "Throwable", ">", "errors", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "String", "tag",...
Render tag files using the supplied content. @param tagPath The output path @return Number of rendered tags @throws Exception if cannot render tags correctly
[ "Render", "tag", "files", "using", "the", "supplied", "content", "." ]
beb9042a54bf0eb168821d524c88b9ea0bee88dc
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/Renderer.java#L265-L317
115,316
jaredrummler/MaterialSpinner
library/src/main/java/com/jaredrummler/materialspinner/Utils.java
Utils.darker
static int darker(int color, float factor) { return Color.argb(Color.alpha(color), Math.max((int) (Color.red(color) * factor), 0), Math.max((int) (Color.green(color) * factor), 0), Math.max((int) (Color.blue(color) * factor), 0)); }
java
static int darker(int color, float factor) { return Color.argb(Color.alpha(color), Math.max((int) (Color.red(color) * factor), 0), Math.max((int) (Color.green(color) * factor), 0), Math.max((int) (Color.blue(color) * factor), 0)); }
[ "static", "int", "darker", "(", "int", "color", ",", "float", "factor", ")", "{", "return", "Color", ".", "argb", "(", "Color", ".", "alpha", "(", "color", ")", ",", "Math", ".", "max", "(", "(", "int", ")", "(", "Color", ".", "red", "(", "color"...
Darkens a color by a given factor. @param color the color to darken @param factor The factor to darken the color. @return darker version of specified color.
[ "Darkens", "a", "color", "by", "a", "given", "factor", "." ]
3dc38b50ab9a64971801e350b40a23a5c8fb98d1
https://github.com/jaredrummler/MaterialSpinner/blob/3dc38b50ab9a64971801e350b40a23a5c8fb98d1/library/src/main/java/com/jaredrummler/materialspinner/Utils.java#L35-L38
115,317
jaredrummler/MaterialSpinner
library/src/main/java/com/jaredrummler/materialspinner/Utils.java
Utils.isRtl
static boolean isRtl(Context context) { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && context.getResources().getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL; }
java
static boolean isRtl(Context context) { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && context.getResources().getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL; }
[ "static", "boolean", "isRtl", "(", "Context", "context", ")", "{", "return", "Build", ".", "VERSION", ".", "SDK_INT", ">=", "Build", ".", "VERSION_CODES", ".", "JELLY_BEAN_MR1", "&&", "context", ".", "getResources", "(", ")", ".", "getConfiguration", "(", ")...
Check if layout direction is RTL @param context the current context @return {@code true} if the layout direction is right-to-left
[ "Check", "if", "layout", "direction", "is", "RTL" ]
3dc38b50ab9a64971801e350b40a23a5c8fb98d1
https://github.com/jaredrummler/MaterialSpinner/blob/3dc38b50ab9a64971801e350b40a23a5c8fb98d1/library/src/main/java/com/jaredrummler/materialspinner/Utils.java#L61-L64
115,318
jaredrummler/MaterialSpinner
library/src/main/java/com/jaredrummler/materialspinner/MaterialSpinner.java
MaterialSpinner.setSelectedIndex
public void setSelectedIndex(int position) { if (adapter != null) { if (position >= 0 && position <= adapter.getCount()) { adapter.notifyItemSelected(position); selectedIndex = position; setText(adapter.get(position).toString()); } else { throw new IllegalArgumentExceptio...
java
public void setSelectedIndex(int position) { if (adapter != null) { if (position >= 0 && position <= adapter.getCount()) { adapter.notifyItemSelected(position); selectedIndex = position; setText(adapter.get(position).toString()); } else { throw new IllegalArgumentExceptio...
[ "public", "void", "setSelectedIndex", "(", "int", "position", ")", "{", "if", "(", "adapter", "!=", "null", ")", "{", "if", "(", "position", ">=", "0", "&&", "position", "<=", "adapter", ".", "getCount", "(", ")", ")", "{", "adapter", ".", "notifyItemS...
Set the default spinner item using its index @param position the item's position
[ "Set", "the", "default", "spinner", "item", "using", "its", "index" ]
3dc38b50ab9a64971801e350b40a23a5c8fb98d1
https://github.com/jaredrummler/MaterialSpinner/blob/3dc38b50ab9a64971801e350b40a23a5c8fb98d1/library/src/main/java/com/jaredrummler/materialspinner/MaterialSpinner.java#L363-L373
115,319
jaredrummler/MaterialSpinner
library/src/main/java/com/jaredrummler/materialspinner/MaterialSpinner.java
MaterialSpinner.setAdapter
public <T> void setAdapter(MaterialSpinnerAdapter<T> adapter) { this.adapter = adapter; this.adapter.setTextColor(textColor); this.adapter.setBackgroundSelector(backgroundSelector); this.adapter.setPopupPadding(popupPaddingLeft, popupPaddingTop, popupPaddingRight, popupPaddingBottom); setAdapterInte...
java
public <T> void setAdapter(MaterialSpinnerAdapter<T> adapter) { this.adapter = adapter; this.adapter.setTextColor(textColor); this.adapter.setBackgroundSelector(backgroundSelector); this.adapter.setPopupPadding(popupPaddingLeft, popupPaddingTop, popupPaddingRight, popupPaddingBottom); setAdapterInte...
[ "public", "<", "T", ">", "void", "setAdapter", "(", "MaterialSpinnerAdapter", "<", "T", ">", "adapter", ")", "{", "this", ".", "adapter", "=", "adapter", ";", "this", ".", "adapter", ".", "setTextColor", "(", "textColor", ")", ";", "this", ".", "adapter"...
Set the custom adapter for the dropdown items @param adapter The adapter @param <T> The type
[ "Set", "the", "custom", "adapter", "for", "the", "dropdown", "items" ]
3dc38b50ab9a64971801e350b40a23a5c8fb98d1
https://github.com/jaredrummler/MaterialSpinner/blob/3dc38b50ab9a64971801e350b40a23a5c8fb98d1/library/src/main/java/com/jaredrummler/materialspinner/MaterialSpinner.java#L436-L442
115,320
chennaione/sugar
library/src/main/java/com/orm/util/ThreadUtil.java
ThreadUtil.doInBackground
public static Future doInBackground(Callable callable) { final ExecutorService executor = Executors.newSingleThreadExecutor(); Future future = executor.submit(callable); if(executor.isTerminated()) { executor.shutdown(); } return future; }
java
public static Future doInBackground(Callable callable) { final ExecutorService executor = Executors.newSingleThreadExecutor(); Future future = executor.submit(callable); if(executor.isTerminated()) { executor.shutdown(); } return future; }
[ "public", "static", "Future", "doInBackground", "(", "Callable", "callable", ")", "{", "final", "ExecutorService", "executor", "=", "Executors", ".", "newSingleThreadExecutor", "(", ")", ";", "Future", "future", "=", "executor", ".", "submit", "(", "callable", "...
Submits a Callable object and returns a Future ready to use. @param callable the callable you want to submit @return a Future object
[ "Submits", "a", "Callable", "object", "and", "returns", "a", "Future", "ready", "to", "use", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/util/ThreadUtil.java#L24-L33
115,321
chennaione/sugar
library/src/main/java/com/orm/helper/NamingHelper.java
NamingHelper.toSQLNameDefault
public static String toSQLNameDefault(String camelCased) { if (camelCased.equalsIgnoreCase("_id")) { return "_id"; } StringBuilder sb = new StringBuilder(); char[] buf = camelCased.toCharArray(); for (int i = 0; i < buf.length; i++) { char prevChar = (i ...
java
public static String toSQLNameDefault(String camelCased) { if (camelCased.equalsIgnoreCase("_id")) { return "_id"; } StringBuilder sb = new StringBuilder(); char[] buf = camelCased.toCharArray(); for (int i = 0; i < buf.length; i++) { char prevChar = (i ...
[ "public", "static", "String", "toSQLNameDefault", "(", "String", "camelCased", ")", "{", "if", "(", "camelCased", ".", "equalsIgnoreCase", "(", "\"_id\"", ")", ")", "{", "return", "\"_id\"", ";", "}", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ...
Converts a given CamelCasedString to UPPER_CASE_UNDER_SCORE. @param camelCased a non empty camelCased string @return the equivalent string converted to UPPER_CASE_UNDER_SCORE unless camelCased equals "_id" (not case sensitive) in which case "_id" is returned
[ "Converts", "a", "given", "CamelCasedString", "to", "UPPER_CASE_UNDER_SCORE", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/helper/NamingHelper.java#L20-L52
115,322
chennaione/sugar
library/src/main/java/com/orm/helper/NamingHelper.java
NamingHelper.toColumnName
public static String toColumnName(Field field) { if (field.isAnnotationPresent(Column.class)) { Column annotation = field.getAnnotation(Column.class); return annotation.name(); } return toSQLNameDefault(field.getName()); }
java
public static String toColumnName(Field field) { if (field.isAnnotationPresent(Column.class)) { Column annotation = field.getAnnotation(Column.class); return annotation.name(); } return toSQLNameDefault(field.getName()); }
[ "public", "static", "String", "toColumnName", "(", "Field", "field", ")", "{", "if", "(", "field", ".", "isAnnotationPresent", "(", "Column", ".", "class", ")", ")", "{", "Column", "annotation", "=", "field", ".", "getAnnotation", "(", "Column", ".", "clas...
Maps a Java Field object to the database's column name. @param field the {@link java.lang.reflect.Field} that will be mapped @return the name of the given Field as represented in the database. If the Field is annotated with {@link com.orm.annotation.Column} then the {@link com.orm.annotation.Column#name()} will be re...
[ "Maps", "a", "Java", "Field", "object", "to", "the", "database", "s", "column", "name", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/helper/NamingHelper.java#L63-L70
115,323
chennaione/sugar
library/src/main/java/com/orm/helper/NamingHelper.java
NamingHelper.toTableName
public static String toTableName(Class<?> table) { if (table.isAnnotationPresent(Table.class)) { Table annotation = table.getAnnotation(Table.class); if ("".equals(annotation.name())) { return NamingHelper.toSQLNameDefault(table.getSimpleName()); } ...
java
public static String toTableName(Class<?> table) { if (table.isAnnotationPresent(Table.class)) { Table annotation = table.getAnnotation(Table.class); if ("".equals(annotation.name())) { return NamingHelper.toSQLNameDefault(table.getSimpleName()); } ...
[ "public", "static", "String", "toTableName", "(", "Class", "<", "?", ">", "table", ")", "{", "if", "(", "table", ".", "isAnnotationPresent", "(", "Table", ".", "class", ")", ")", "{", "Table", "annotation", "=", "table", ".", "getAnnotation", "(", "Table...
Maps a Java Class to the name of the class. @param table the generic {@link java.lang.Class} that defines a database table @return if the given class is annotated with {@link com.orm.annotation.Table} then the value for {@link com.orm.annotation.Table#name()} will be returned. Else, the class' simple name will be con...
[ "Maps", "a", "Java", "Class", "to", "the", "name", "of", "the", "class", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/helper/NamingHelper.java#L80-L90
115,324
chennaione/sugar
library/src/main/java/com/orm/helper/ManifestHelper.java
ManifestHelper.getDatabaseVersion
public static int getDatabaseVersion() { Integer databaseVersion = getMetaDataInteger(METADATA_VERSION); if ((databaseVersion == null) || (databaseVersion == 0)) { databaseVersion = 1; } return databaseVersion; }
java
public static int getDatabaseVersion() { Integer databaseVersion = getMetaDataInteger(METADATA_VERSION); if ((databaseVersion == null) || (databaseVersion == 0)) { databaseVersion = 1; } return databaseVersion; }
[ "public", "static", "int", "getDatabaseVersion", "(", ")", "{", "Integer", "databaseVersion", "=", "getMetaDataInteger", "(", "METADATA_VERSION", ")", ";", "if", "(", "(", "databaseVersion", "==", "null", ")", "||", "(", "databaseVersion", "==", "0", ")", ")",...
Grabs the database version from the manifest. @return the database version as specified by the {@link #METADATA_VERSION} version or 1 of not present
[ "Grabs", "the", "database", "version", "from", "the", "manifest", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/helper/ManifestHelper.java#L42-L50
115,325
chennaione/sugar
library/src/main/java/com/orm/helper/ManifestHelper.java
ManifestHelper.getDomainPackageName
public static String getDomainPackageName() { String domainPackageName = getMetaDataString(METADATA_DOMAIN_PACKAGE_NAME); if (domainPackageName == null) { domainPackageName = ""; } return domainPackageName; }
java
public static String getDomainPackageName() { String domainPackageName = getMetaDataString(METADATA_DOMAIN_PACKAGE_NAME); if (domainPackageName == null) { domainPackageName = ""; } return domainPackageName; }
[ "public", "static", "String", "getDomainPackageName", "(", ")", "{", "String", "domainPackageName", "=", "getMetaDataString", "(", "METADATA_DOMAIN_PACKAGE_NAME", ")", ";", "if", "(", "domainPackageName", "==", "null", ")", "{", "domainPackageName", "=", "\"\"", ";"...
Grabs the domain name of the model classes from the manifest. @return the package String that Sugar uses to search for model classes
[ "Grabs", "the", "domain", "name", "of", "the", "model", "classes", "from", "the", "manifest", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/helper/ManifestHelper.java#L57-L65
115,326
chennaione/sugar
library/src/main/java/com/orm/helper/ManifestHelper.java
ManifestHelper.getDatabaseName
public static String getDatabaseName() { String databaseName = getMetaDataString(METADATA_DATABASE); if (databaseName == null) { databaseName = DATABASE_DEFAULT_NAME; } return databaseName; }
java
public static String getDatabaseName() { String databaseName = getMetaDataString(METADATA_DATABASE); if (databaseName == null) { databaseName = DATABASE_DEFAULT_NAME; } return databaseName; }
[ "public", "static", "String", "getDatabaseName", "(", ")", "{", "String", "databaseName", "=", "getMetaDataString", "(", "METADATA_DATABASE", ")", ";", "if", "(", "databaseName", "==", "null", ")", "{", "databaseName", "=", "DATABASE_DEFAULT_NAME", ";", "}", "re...
Grabs the name of the database file specified in the manifest. @return the value for the {@value #METADATA_DATABASE} meta data in the AndroidManifest or {@link #DATABASE_DEFAULT_NAME} if not present
[ "Grabs", "the", "name", "of", "the", "database", "file", "specified", "in", "the", "manifest", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/helper/ManifestHelper.java#L73-L81
115,327
chennaione/sugar
library/src/main/java/com/orm/SugarDataSource.java
SugarDataSource.bulkInsert
public void bulkInsert(final List<T> objects, final SuccessCallback<List<Long>> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); checkNotNull(objects); final Callable<List<Long>> call = new Callable<List<Long>>() { ...
java
public void bulkInsert(final List<T> objects, final SuccessCallback<List<Long>> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); checkNotNull(objects); final Callable<List<Long>> call = new Callable<List<Long>>() { ...
[ "public", "void", "bulkInsert", "(", "final", "List", "<", "T", ">", "objects", ",", "final", "SuccessCallback", "<", "List", "<", "Long", ">", ">", "successCallback", ",", "final", "ErrorCallback", "errorCallback", ")", "{", "checkNotNull", "(", "successCallb...
Method that performs a bulk insert. It works on top of SugarRecord class, and executes the query asynchronously using Futures. @param objects the list of objects that you want to insert. They must be SugarRecord extended objects or @Table annotatd objects. @param successCallback the callback for successful bulk insert...
[ "Method", "that", "performs", "a", "bulk", "insert", ".", "It", "works", "on", "top", "of", "SugarRecord", "class", "and", "executes", "the", "query", "asynchronously", "using", "Futures", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/SugarDataSource.java#L91-L125
115,328
chennaione/sugar
library/src/main/java/com/orm/SugarDataSource.java
SugarDataSource.query
public void query(final String whereClause, final String[] whereArgs, final String groupBy, final String orderBy, final String limit, final SuccessCallback<Cursor> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); final Callable<Cu...
java
public void query(final String whereClause, final String[] whereArgs, final String groupBy, final String orderBy, final String limit, final SuccessCallback<Cursor> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); final Callable<Cu...
[ "public", "void", "query", "(", "final", "String", "whereClause", ",", "final", "String", "[", "]", "whereArgs", ",", "final", "String", "groupBy", ",", "final", "String", "orderBy", ",", "final", "String", "limit", ",", "final", "SuccessCallback", "<", "Cur...
Method that provides you the ability of perform a custom query and retrieve a cursor. It works on top of SugarRecord class, All the code is executed asynchronously with the usage of Futures and callbacks. @param whereClause the clause of the search @param whereArgs the arguments for the search @param groupBy the form ...
[ "Method", "that", "provides", "you", "the", "ability", "of", "perform", "a", "custom", "query", "and", "retrieve", "a", "cursor", ".", "It", "works", "on", "top", "of", "SugarRecord", "class", "All", "the", "code", "is", "executed", "asynchronously", "with",...
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/SugarDataSource.java#L176-L202
115,329
chennaione/sugar
library/src/main/java/com/orm/SugarDataSource.java
SugarDataSource.listAll
public void listAll(final String orderBy, final SuccessCallback<List<T>> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); final Callable<List<T>> call = new Callable<List<T>>() { @Override public List<T> ca...
java
public void listAll(final String orderBy, final SuccessCallback<List<T>> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); final Callable<List<T>> call = new Callable<List<T>>() { @Override public List<T> ca...
[ "public", "void", "listAll", "(", "final", "String", "orderBy", ",", "final", "SuccessCallback", "<", "List", "<", "T", ">", ">", "successCallback", ",", "final", "ErrorCallback", "errorCallback", ")", "{", "checkNotNull", "(", "successCallback", ")", ";", "ch...
Method that list all elements. It run a SugarRecord.listAll but it's code is performed asynchronously with the usage of Futures and callbacks. @param orderBy the way you want to order the objects you get @param successCallback the callback that is performed if the operation is successful @param errorCallback the callb...
[ "Method", "that", "list", "all", "elements", ".", "It", "run", "a", "SugarRecord", ".", "listAll", "but", "it", "s", "code", "is", "performed", "asynchronously", "with", "the", "usage", "of", "Futures", "and", "callbacks", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/SugarDataSource.java#L212-L238
115,330
chennaione/sugar
library/src/main/java/com/orm/SugarDataSource.java
SugarDataSource.update
public void update(final T object, final SuccessCallback<Long> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); checkNotNull(object); final Callable<Long> call = new Callable<Long>() { @Override pub...
java
public void update(final T object, final SuccessCallback<Long> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); checkNotNull(object); final Callable<Long> call = new Callable<Long>() { @Override pub...
[ "public", "void", "update", "(", "final", "T", "object", ",", "final", "SuccessCallback", "<", "Long", ">", "successCallback", ",", "final", "ErrorCallback", "errorCallback", ")", "{", "checkNotNull", "(", "successCallback", ")", ";", "checkNotNull", "(", "error...
Method that works on top of SugarRecord.update and runs the code asynchronously via Futures and callbacks. @param object the object you want to update @param successCallback the callback that will be performed if the update is successful @param errorCallback the callback that will be performed if the update has an err...
[ "Method", "that", "works", "on", "top", "of", "SugarRecord", ".", "update", "and", "runs", "the", "code", "asynchronously", "via", "Futures", "and", "callbacks", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/SugarDataSource.java#L249-L276
115,331
chennaione/sugar
library/src/main/java/com/orm/SugarDataSource.java
SugarDataSource.delete
public void delete(final T object, final SuccessCallback<Boolean> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); checkNotNull(object); final Callable<Boolean> call = new Callable<Boolean>() { @Override ...
java
public void delete(final T object, final SuccessCallback<Boolean> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); checkNotNull(object); final Callable<Boolean> call = new Callable<Boolean>() { @Override ...
[ "public", "void", "delete", "(", "final", "T", "object", ",", "final", "SuccessCallback", "<", "Boolean", ">", "successCallback", ",", "final", "ErrorCallback", "errorCallback", ")", "{", "checkNotNull", "(", "successCallback", ")", ";", "checkNotNull", "(", "er...
This method works on top of SugarRecord and provides asynchronous code execution via the usage of Futures and callbacks to handle success result and error. @param object the object you want to delete @param successCallback the callback to be performed when the operation is successful @param errorCallback the callback ...
[ "This", "method", "works", "on", "top", "of", "SugarRecord", "and", "provides", "asynchronous", "code", "execution", "via", "the", "usage", "of", "Futures", "and", "callbacks", "to", "handle", "success", "result", "and", "error", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/SugarDataSource.java#L286-L313
115,332
chennaione/sugar
library/src/main/java/com/orm/SugarDataSource.java
SugarDataSource.delete
public void delete(final String whereClause, final String[] whereArgs, final SuccessCallback<Integer> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); final Callable<Integer> call = new Callable<Integer>() { @Override ...
java
public void delete(final String whereClause, final String[] whereArgs, final SuccessCallback<Integer> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); final Callable<Integer> call = new Callable<Integer>() { @Override ...
[ "public", "void", "delete", "(", "final", "String", "whereClause", ",", "final", "String", "[", "]", "whereArgs", ",", "final", "SuccessCallback", "<", "Integer", ">", "successCallback", ",", "final", "ErrorCallback", "errorCallback", ")", "{", "checkNotNull", "...
Method that performs a selective delete. The code is executed asynchronously via the usage of Futures and result callbacks @param whereClause the clause for the search @param whereArgs the values @param successCallback the callback to be executed if there is no trouble @param errorCallback the callback to be executed ...
[ "Method", "that", "performs", "a", "selective", "delete", ".", "The", "code", "is", "executed", "asynchronously", "via", "the", "usage", "of", "Futures", "and", "result", "callbacks" ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/SugarDataSource.java#L324-L350
115,333
chennaione/sugar
library/src/main/java/com/orm/SugarDataSource.java
SugarDataSource.deleteAll
public void deleteAll(final SuccessCallback<Integer> successCallback, final ErrorCallback errorCallback) { delete(null, null, successCallback, errorCallback); }
java
public void deleteAll(final SuccessCallback<Integer> successCallback, final ErrorCallback errorCallback) { delete(null, null, successCallback, errorCallback); }
[ "public", "void", "deleteAll", "(", "final", "SuccessCallback", "<", "Integer", ">", "successCallback", ",", "final", "ErrorCallback", "errorCallback", ")", "{", "delete", "(", "null", ",", "null", ",", "successCallback", ",", "errorCallback", ")", ";", "}" ]
Method that deletes all data in a SQLite table. @param successCallback the callback that is executed if the operation is succesful @param errorCallback the callback that is executed if there is an error
[ "Method", "that", "deletes", "all", "data", "in", "a", "SQLite", "table", "." ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/SugarDataSource.java#L358-L360
115,334
chennaione/sugar
library/src/main/java/com/orm/SugarDataSource.java
SugarDataSource.count
public void count(final SuccessCallback<Long> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); final Callable<Long> call = new Callable<Long>() { @Override public Long call() throws Exception { ...
java
public void count(final SuccessCallback<Long> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); final Callable<Long> call = new Callable<Long>() { @Override public Long call() throws Exception { ...
[ "public", "void", "count", "(", "final", "SuccessCallback", "<", "Long", ">", "successCallback", ",", "final", "ErrorCallback", "errorCallback", ")", "{", "checkNotNull", "(", "successCallback", ")", ";", "checkNotNull", "(", "errorCallback", ")", ";", "final", ...
Method that performs a count @param successCallback the callback that is executed if this is successful @param errorCallback the callback that is executed if there is an error
[ "Method", "that", "performs", "a", "count" ]
2ff1b9d5b11563346b69b4e97324107ff680a61a
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/SugarDataSource.java#L368-L394
115,335
red6/pdfcompare
src/main/java/de/redsix/pdfcompare/DiffImage.java
DiffImage.calcCombinedIntensity
private static int calcCombinedIntensity(final int element) { final Color color = new Color(element); return Math.min(255, (color.getRed() + color.getGreen() + color.getRed()) / 3); }
java
private static int calcCombinedIntensity(final int element) { final Color color = new Color(element); return Math.min(255, (color.getRed() + color.getGreen() + color.getRed()) / 3); }
[ "private", "static", "int", "calcCombinedIntensity", "(", "final", "int", "element", ")", "{", "final", "Color", "color", "=", "new", "Color", "(", "element", ")", ";", "return", "Math", ".", "min", "(", "255", ",", "(", "color", ".", "getRed", "(", ")...
Calculate the combined intensity of a pixel and normalizes it to a value of at most 255. @param element @return
[ "Calculate", "the", "combined", "intensity", "of", "a", "pixel", "and", "normalizes", "it", "to", "a", "value", "of", "at", "most", "255", "." ]
167b74ea4000eff455fbdba265c040bdc0aa6367
https://github.com/red6/pdfcompare/blob/167b74ea4000eff455fbdba265c040bdc0aa6367/src/main/java/de/redsix/pdfcompare/DiffImage.java#L161-L164
115,336
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterAdapter.java
FilterAdapter.buildAdapter
public static FilterAdapter buildAdapter() { FilterAdapter adapter = new FilterAdapter(); adapter.addFilterAdapter( ColumnPrefixFilter.class, new ColumnPrefixFilterAdapter()); adapter.addFilterAdapter( ColumnRangeFilter.class, new ColumnRangeFilterAdapter()); adapter.addFilterAdapter( ...
java
public static FilterAdapter buildAdapter() { FilterAdapter adapter = new FilterAdapter(); adapter.addFilterAdapter( ColumnPrefixFilter.class, new ColumnPrefixFilterAdapter()); adapter.addFilterAdapter( ColumnRangeFilter.class, new ColumnRangeFilterAdapter()); adapter.addFilterAdapter( ...
[ "public", "static", "FilterAdapter", "buildAdapter", "(", ")", "{", "FilterAdapter", "adapter", "=", "new", "FilterAdapter", "(", ")", ";", "adapter", ".", "addFilterAdapter", "(", "ColumnPrefixFilter", ".", "class", ",", "new", "ColumnPrefixFilterAdapter", "(", "...
Create a new FilterAdapter @return a {@link com.google.cloud.bigtable.hbase.adapters.filters.FilterAdapter} object.
[ "Create", "a", "new", "FilterAdapter" ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterAdapter.java#L67-L131
115,337
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterAdapter.java
FilterAdapter.adaptFilter
public Optional<Filters.Filter> adaptFilter(FilterAdapterContext context, Filter filter) throws IOException { SingleFilterAdapter<?> adapter = getAdapterForFilterOrThrow(filter); return Optional.fromNullable(adapter.adapt(context, filter)); }
java
public Optional<Filters.Filter> adaptFilter(FilterAdapterContext context, Filter filter) throws IOException { SingleFilterAdapter<?> adapter = getAdapterForFilterOrThrow(filter); return Optional.fromNullable(adapter.adapt(context, filter)); }
[ "public", "Optional", "<", "Filters", ".", "Filter", ">", "adaptFilter", "(", "FilterAdapterContext", "context", ",", "Filter", "filter", ")", "throws", "IOException", "{", "SingleFilterAdapter", "<", "?", ">", "adapter", "=", "getAdapterForFilterOrThrow", "(", "f...
Adapt an HBase filter into a Cloud Bigtable Rowfilter. @param context a {@link com.google.cloud.bigtable.hbase.adapters.filters.FilterAdapterContext} object. @param filter a {@link org.apache.hadoop.hbase.filter.Filter} object. @return a {@link com.google.common.base.Optional} object. @throws java.io.IOException if an...
[ "Adapt", "an", "HBase", "filter", "into", "a", "Cloud", "Bigtable", "Rowfilter", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterAdapter.java#L168-L172
115,338
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterAdapter.java
FilterAdapter.throwIfUnsupportedFilter
public void throwIfUnsupportedFilter(Scan scan, Filter filter) { List<FilterSupportStatus> filterSupportStatuses = new ArrayList<>(); FilterAdapterContext context = new FilterAdapterContext(scan, null); collectUnsupportedStatuses(context, filter, filterSupportStatuses); if (!filterSupportStatuses.isEmpt...
java
public void throwIfUnsupportedFilter(Scan scan, Filter filter) { List<FilterSupportStatus> filterSupportStatuses = new ArrayList<>(); FilterAdapterContext context = new FilterAdapterContext(scan, null); collectUnsupportedStatuses(context, filter, filterSupportStatuses); if (!filterSupportStatuses.isEmpt...
[ "public", "void", "throwIfUnsupportedFilter", "(", "Scan", "scan", ",", "Filter", "filter", ")", "{", "List", "<", "FilterSupportStatus", ">", "filterSupportStatuses", "=", "new", "ArrayList", "<>", "(", ")", ";", "FilterAdapterContext", "context", "=", "new", "...
Throw a new UnsupportedFilterException if the given filter cannot be adapted to bigtable reader expressions. @param scan a {@link org.apache.hadoop.hbase.client.Scan} object. @param filter a {@link org.apache.hadoop.hbase.filter.Filter} object.
[ "Throw", "a", "new", "UnsupportedFilterException", "if", "the", "given", "filter", "cannot", "be", "adapted", "to", "bigtable", "reader", "expressions", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterAdapter.java#L181-L188
115,339
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterAdapter.java
FilterAdapter.getAdapterForFilterOrThrow
protected SingleFilterAdapter<?> getAdapterForFilterOrThrow(Filter filter) { if (adapterMap.containsKey(filter.getClass())) { return adapterMap.get(filter.getClass()); } else { throw new UnsupportedFilterException( ImmutableList.of(FilterSupportStatus.newUnknownFilterType(filter))); } ...
java
protected SingleFilterAdapter<?> getAdapterForFilterOrThrow(Filter filter) { if (adapterMap.containsKey(filter.getClass())) { return adapterMap.get(filter.getClass()); } else { throw new UnsupportedFilterException( ImmutableList.of(FilterSupportStatus.newUnknownFilterType(filter))); } ...
[ "protected", "SingleFilterAdapter", "<", "?", ">", "getAdapterForFilterOrThrow", "(", "Filter", "filter", ")", "{", "if", "(", "adapterMap", ".", "containsKey", "(", "filter", ".", "getClass", "(", ")", ")", ")", "{", "return", "adapterMap", ".", "get", "(",...
Get the adapter for the given Filter or throw an UnsupportedFilterException if one is not available. @param filter a {@link org.apache.hadoop.hbase.filter.Filter} object. @return a {@link com.google.cloud.bigtable.hbase.adapters.filters.SingleFilterAdapter} object.
[ "Get", "the", "adapter", "for", "the", "given", "Filter", "or", "throw", "an", "UnsupportedFilterException", "if", "one", "is", "not", "available", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterAdapter.java#L219-L226
115,340
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/ColumnPaginationFilterAdapter.java
ColumnPaginationFilterAdapter.createChain
private Filter createChain( ColumnPaginationFilter filter, Filter intermediate) { ChainFilter chain = FILTERS.chain(); chain.filter(FILTERS.limit().cellsPerColumn(1)); if (intermediate != null) { chain.filter(intermediate); } chain.filter(FILTERS.limit().cellsPerRow(filter.getLimit())); ...
java
private Filter createChain( ColumnPaginationFilter filter, Filter intermediate) { ChainFilter chain = FILTERS.chain(); chain.filter(FILTERS.limit().cellsPerColumn(1)); if (intermediate != null) { chain.filter(intermediate); } chain.filter(FILTERS.limit().cellsPerRow(filter.getLimit())); ...
[ "private", "Filter", "createChain", "(", "ColumnPaginationFilter", "filter", ",", "Filter", "intermediate", ")", "{", "ChainFilter", "chain", "=", "FILTERS", ".", "chain", "(", ")", ";", "chain", ".", "filter", "(", "FILTERS", ".", "limit", "(", ")", ".", ...
Create a filter chain that allows the latest values for each qualifier, those cells that pass an option intermediate filter and are less than the limit per row.
[ "Create", "a", "filter", "chain", "that", "allows", "the", "latest", "values", "for", "each", "qualifier", "those", "cells", "that", "pass", "an", "option", "intermediate", "filter", "and", "are", "less", "than", "the", "limit", "per", "row", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/ColumnPaginationFilterAdapter.java#L71-L80
115,341
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/TimestampFilterUtil.java
TimestampFilterUtil.hbaseToTimestampRangeFilter
public static Filter hbaseToTimestampRangeFilter(long hbaseStartTimestamp, long hbaseEndTimestamp) { return toTimestampRangeFilter( TimestampConverter.hbase2bigtable(hbaseStartTimestamp), TimestampConverter.hbase2bigtable(hbaseEndTimestamp)); }
java
public static Filter hbaseToTimestampRangeFilter(long hbaseStartTimestamp, long hbaseEndTimestamp) { return toTimestampRangeFilter( TimestampConverter.hbase2bigtable(hbaseStartTimestamp), TimestampConverter.hbase2bigtable(hbaseEndTimestamp)); }
[ "public", "static", "Filter", "hbaseToTimestampRangeFilter", "(", "long", "hbaseStartTimestamp", ",", "long", "hbaseEndTimestamp", ")", "{", "return", "toTimestampRangeFilter", "(", "TimestampConverter", ".", "hbase2bigtable", "(", "hbaseStartTimestamp", ")", ",", "Timest...
Converts a [startMs, endMs) timestamps to a Cloud Bigtable [startMicros, endMicros) filter. @param hbaseStartTimestamp a long value. @param hbaseEndTimestamp a long value. @return a {@link Filter} object.
[ "Converts", "a", "[", "startMs", "endMs", ")", "timestamps", "to", "a", "Cloud", "Bigtable", "[", "startMicros", "endMicros", ")", "filter", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/TimestampFilterUtil.java#L35-L40
115,342
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/TimestampFilterUtil.java
TimestampFilterUtil.toTimestampRangeFilter
public static Filter toTimestampRangeFilter(long bigtableStartTimestamp, long bigtableEndTimestamp) { return FILTERS.timestamp().range().of(bigtableStartTimestamp, bigtableEndTimestamp); }
java
public static Filter toTimestampRangeFilter(long bigtableStartTimestamp, long bigtableEndTimestamp) { return FILTERS.timestamp().range().of(bigtableStartTimestamp, bigtableEndTimestamp); }
[ "public", "static", "Filter", "toTimestampRangeFilter", "(", "long", "bigtableStartTimestamp", ",", "long", "bigtableEndTimestamp", ")", "{", "return", "FILTERS", ".", "timestamp", "(", ")", ".", "range", "(", ")", ".", "of", "(", "bigtableStartTimestamp", ",", ...
Converts a [startMicros, endNons) timestamps to a Cloud Bigtable [startMicros, endMicros) filter. @param bigtableStartTimestamp a long value. @param bigtableEndTimestamp a long value. @return a {@link Filter} object.
[ "Converts", "a", "[", "startMicros", "endNons", ")", "timestamps", "to", "a", "Cloud", "Bigtable", "[", "startMicros", "endMicros", ")", "filter", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/TimestampFilterUtil.java#L50-L53
115,343
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterSupportStatus.java
FilterSupportStatus.newUnknownFilterType
public static FilterSupportStatus newUnknownFilterType(Filter unknownFilterType) { return new FilterSupportStatus( false, String.format( "Don't know how to adapt Filter class '%s'", unknownFilterType.getClass())); }
java
public static FilterSupportStatus newUnknownFilterType(Filter unknownFilterType) { return new FilterSupportStatus( false, String.format( "Don't know how to adapt Filter class '%s'", unknownFilterType.getClass())); }
[ "public", "static", "FilterSupportStatus", "newUnknownFilterType", "(", "Filter", "unknownFilterType", ")", "{", "return", "new", "FilterSupportStatus", "(", "false", ",", "String", ".", "format", "(", "\"Don't know how to adapt Filter class '%s'\"", ",", "unknownFilterType...
Static helper to construct not support adaptations due to no adapter being available for the given Filter type. @param unknownFilterType The unknown filter instance. @return A new FilterSupportStatus.
[ "Static", "helper", "to", "construct", "not", "support", "adaptations", "due", "to", "no", "adapter", "being", "available", "for", "the", "given", "Filter", "type", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterSupportStatus.java#L52-L57
115,344
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterSupportStatus.java
FilterSupportStatus.newCompositeNotSupported
public static FilterSupportStatus newCompositeNotSupported( List<FilterSupportStatus> unsupportedSubfilters) { StringBuilder builder = new StringBuilder(); for (FilterSupportStatus subStatus: unsupportedSubfilters) { builder.append(subStatus.getReason()); builder.append("\n"); } return...
java
public static FilterSupportStatus newCompositeNotSupported( List<FilterSupportStatus> unsupportedSubfilters) { StringBuilder builder = new StringBuilder(); for (FilterSupportStatus subStatus: unsupportedSubfilters) { builder.append(subStatus.getReason()); builder.append("\n"); } return...
[ "public", "static", "FilterSupportStatus", "newCompositeNotSupported", "(", "List", "<", "FilterSupportStatus", ">", "unsupportedSubfilters", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "FilterSupportStatus", "subStatus"...
Static constructor for a not supported status caused by sub-filters not being supported. @param unsupportedSubfilters a {@link java.util.List} object. @return a {@link com.google.cloud.bigtable.hbase.adapters.filters.FilterSupportStatus} object.
[ "Static", "constructor", "for", "a", "not", "supported", "status", "caused", "by", "sub", "-", "filters", "not", "being", "supported", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterSupportStatus.java#L75-L83
115,345
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/BigtableVersionInfo.java
BigtableVersionInfo.getVersion
private static String getVersion() { final String defaultVersion = "dev-" + System.currentTimeMillis(); final String fileName = "bigtable-version.properties"; final String versionProperty = "bigtable.version"; try (InputStream stream = BigtableVersionInfo.class.getResourceAsStream(fileName)) { ...
java
private static String getVersion() { final String defaultVersion = "dev-" + System.currentTimeMillis(); final String fileName = "bigtable-version.properties"; final String versionProperty = "bigtable.version"; try (InputStream stream = BigtableVersionInfo.class.getResourceAsStream(fileName)) { ...
[ "private", "static", "String", "getVersion", "(", ")", "{", "final", "String", "defaultVersion", "=", "\"dev-\"", "+", "System", ".", "currentTimeMillis", "(", ")", ";", "final", "String", "fileName", "=", "\"bigtable-version.properties\"", ";", "final", "String",...
Gets user agent from bigtable-version.properties. Returns a default dev user agent with current timestamp if not found.
[ "Gets", "user", "agent", "from", "bigtable", "-", "version", ".", "properties", ".", "Returns", "a", "default", "dev", "user", "agent", "with", "current", "timestamp", "if", "not", "found", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/BigtableVersionInfo.java#L20-L45
115,346
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableConnection.java
AbstractBigtableConnection.getTable
@Deprecated public Table getTable(String tableName) throws IOException { return getTable(TableName.valueOf(tableName)); }
java
@Deprecated public Table getTable(String tableName) throws IOException { return getTable(TableName.valueOf(tableName)); }
[ "@", "Deprecated", "public", "Table", "getTable", "(", "String", "tableName", ")", "throws", "IOException", "{", "return", "getTable", "(", "TableName", ".", "valueOf", "(", "tableName", ")", ")", ";", "}" ]
This should not be used. The hbase shell needs this in hbase 0.99.2. Remove this once 1.0.0 comes out. @param tableName a {@link java.lang.String} object. @return a {@link org.apache.hadoop.hbase.client.Table} object. @throws java.io.IOException if any.
[ "This", "should", "not", "be", "used", ".", "The", "hbase", "shell", "needs", "this", "in", "hbase", "0", ".", "99", ".", "2", ".", "Remove", "this", "once", "1", ".", "0", ".", "0", "comes", "out", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableConnection.java#L217-L220
115,347
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/admin/ColumnDescriptorAdapter.java
ColumnDescriptorAdapter.getUnknownFeatures
public static List<String> getUnknownFeatures(HColumnDescriptor columnDescriptor) { List<String> unknownFeatures = new ArrayList<String>(); for (Map.Entry<String, String> entry : columnDescriptor.getConfiguration().entrySet()) { String key = entry.getKey(); if (!SUPPORTED_OPTION_KEYS.contains(key) ...
java
public static List<String> getUnknownFeatures(HColumnDescriptor columnDescriptor) { List<String> unknownFeatures = new ArrayList<String>(); for (Map.Entry<String, String> entry : columnDescriptor.getConfiguration().entrySet()) { String key = entry.getKey(); if (!SUPPORTED_OPTION_KEYS.contains(key) ...
[ "public", "static", "List", "<", "String", ">", "getUnknownFeatures", "(", "HColumnDescriptor", "columnDescriptor", ")", "{", "List", "<", "String", ">", "unknownFeatures", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "Map", ".", ...
Build a list of configuration keys that we don't know how to handle @param columnDescriptor a {@link org.apache.hadoop.hbase.HColumnDescriptor} object. @return a {@link java.util.List} object.
[ "Build", "a", "list", "of", "configuration", "keys", "that", "we", "don", "t", "know", "how", "to", "handle" ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/admin/ColumnDescriptorAdapter.java#L95-L106
115,348
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/admin/ColumnDescriptorAdapter.java
ColumnDescriptorAdapter.getUnsupportedFeatures
public static Map<String, String> getUnsupportedFeatures(HColumnDescriptor columnDescriptor) { Map<String, String> unsupportedConfiguration = new HashMap<String, String>(); Map<String, String> configuration = columnDescriptor.getConfiguration(); for (Map.Entry<String, String> entry : SUPPORTED_OPTION_VALUE...
java
public static Map<String, String> getUnsupportedFeatures(HColumnDescriptor columnDescriptor) { Map<String, String> unsupportedConfiguration = new HashMap<String, String>(); Map<String, String> configuration = columnDescriptor.getConfiguration(); for (Map.Entry<String, String> entry : SUPPORTED_OPTION_VALUE...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "getUnsupportedFeatures", "(", "HColumnDescriptor", "columnDescriptor", ")", "{", "Map", "<", "String", ",", "String", ">", "unsupportedConfiguration", "=", "new", "HashMap", "<", "String", ",", "Stri...
Build a Map of configuration keys and values describing configuration values we don't support. @param columnDescriptor a {@link org.apache.hadoop.hbase.HColumnDescriptor} object. @return a {@link java.util.Map} object.
[ "Build", "a", "Map", "of", "configuration", "keys", "and", "values", "describing", "configuration", "values", "we", "don", "t", "support", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/admin/ColumnDescriptorAdapter.java#L114-L126
115,349
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/io/OAuthCredentialsCache.java
OAuthCredentialsCache.syncRefresh
private HeaderCacheElement syncRefresh(long timeout, TimeUnit timeUnit) { Span span = TRACER.spanBuilder("Bigtable.CredentialsRefresh").startSpan(); try (Scope scope = TRACER.withSpan(span)) { return asyncRefresh().get(timeout, timeUnit); } catch (InterruptedException e) { LOG.warn("Interrupted ...
java
private HeaderCacheElement syncRefresh(long timeout, TimeUnit timeUnit) { Span span = TRACER.spanBuilder("Bigtable.CredentialsRefresh").startSpan(); try (Scope scope = TRACER.withSpan(span)) { return asyncRefresh().get(timeout, timeUnit); } catch (InterruptedException e) { LOG.warn("Interrupted ...
[ "private", "HeaderCacheElement", "syncRefresh", "(", "long", "timeout", ",", "TimeUnit", "timeUnit", ")", "{", "Span", "span", "=", "TRACER", ".", "spanBuilder", "(", "\"Bigtable.CredentialsRefresh\"", ")", ".", "startSpan", "(", ")", ";", "try", "(", "Scope", ...
Refresh the credentials and block. Will return an error if the credentials haven't been refreshed. This method should not be called while holding the refresh lock
[ "Refresh", "the", "credentials", "and", "block", ".", "Will", "return", "an", "error", "if", "the", "credentials", "haven", "t", "been", "refreshed", ".", "This", "method", "should", "not", "be", "called", "while", "holding", "the", "refresh", "lock" ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/io/OAuthCredentialsCache.java#L233-L269
115,350
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/io/OAuthCredentialsCache.java
OAuthCredentialsCache.asyncRefresh
Future<HeaderCacheElement> asyncRefresh() { LOG.trace("asyncRefresh"); synchronized (lock) { try { if (futureToken != null) { return futureToken; } if (headerCache.getCacheState() == CacheState.Good) { return Futures.immediateFuture(headerCache); } ...
java
Future<HeaderCacheElement> asyncRefresh() { LOG.trace("asyncRefresh"); synchronized (lock) { try { if (futureToken != null) { return futureToken; } if (headerCache.getCacheState() == CacheState.Good) { return Futures.immediateFuture(headerCache); } ...
[ "Future", "<", "HeaderCacheElement", ">", "asyncRefresh", "(", ")", "{", "LOG", ".", "trace", "(", "\"asyncRefresh\"", ")", ";", "synchronized", "(", "lock", ")", "{", "try", "{", "if", "(", "futureToken", "!=", "null", ")", "{", "return", "futureToken", ...
Refreshes the OAuth2 token asynchronously. This method will only start an async refresh if there isn't a currently running asynchronous refresh and the current token is not "Good".
[ "Refreshes", "the", "OAuth2", "token", "asynchronously", ".", "This", "method", "will", "only", "start", "an", "async", "refresh", "if", "there", "isn", "t", "a", "currently", "running", "asynchronous", "refresh", "and", "the", "current", "token", "is", "not",...
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/io/OAuthCredentialsCache.java#L275-L307
115,351
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/io/OAuthCredentialsCache.java
OAuthCredentialsCache.revokeUnauthToken
void revokeUnauthToken(HeaderToken oldToken) { synchronized (lock) { if (headerCache.getToken() == oldToken) { LOG.warn("Got unauthenticated response from server, revoking the current token"); headerCache = EMPTY_HEADER; } else { LOG.info("Skipping revoke, since the revoked token...
java
void revokeUnauthToken(HeaderToken oldToken) { synchronized (lock) { if (headerCache.getToken() == oldToken) { LOG.warn("Got unauthenticated response from server, revoking the current token"); headerCache = EMPTY_HEADER; } else { LOG.info("Skipping revoke, since the revoked token...
[ "void", "revokeUnauthToken", "(", "HeaderToken", "oldToken", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "headerCache", ".", "getToken", "(", ")", "==", "oldToken", ")", "{", "LOG", ".", "warn", "(", "\"Got unauthenticated response from server, r...
Clear the cache. @param oldToken for a comparison. Only revoke the cache if the oldToken matches the current one.
[ "Clear", "the", "cache", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/io/OAuthCredentialsCache.java#L345-L354
115,352
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/scanner/ResultQueueEntry.java
ResultQueueEntry.toResultQueueEntryForEquals
@SuppressWarnings("unchecked") protected ResultQueueEntry<T> toResultQueueEntryForEquals(Object obj) { if (!(obj instanceof ResultQueueEntry) || obj == null) { return null; } ResultQueueEntry<T> other = (ResultQueueEntry<T>) obj; return type == other.type && getClass() == other.getClass() ? othe...
java
@SuppressWarnings("unchecked") protected ResultQueueEntry<T> toResultQueueEntryForEquals(Object obj) { if (!(obj instanceof ResultQueueEntry) || obj == null) { return null; } ResultQueueEntry<T> other = (ResultQueueEntry<T>) obj; return type == other.type && getClass() == other.getClass() ? othe...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "ResultQueueEntry", "<", "T", ">", "toResultQueueEntryForEquals", "(", "Object", "obj", ")", "{", "if", "(", "!", "(", "obj", "instanceof", "ResultQueueEntry", ")", "||", "obj", "==", "null", ")"...
This is a utility function for checking equality between this and another ResultQueueEntry. @param obj the object to compare to @return a reference to ResultQueueEntry if obj is: 1) not null, 2) a ResultQueueEntry, 3) has the same type as this.
[ "This", "is", "a", "utility", "function", "for", "checking", "equality", "between", "this", "and", "another", "ResultQueueEntry", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/scanner/ResultQueueEntry.java#L193-L200
115,353
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterAdapterHelper.java
FilterAdapterHelper.getSingleFamilyName
public static String getSingleFamilyName(FilterAdapterContext context) { Preconditions.checkState( context.getScan().numFamilies() == 1, "Cannot getSingleFamilyName() unless there is exactly 1 family."); return Bytes.toString(context.getScan().getFamilies()[0]); }
java
public static String getSingleFamilyName(FilterAdapterContext context) { Preconditions.checkState( context.getScan().numFamilies() == 1, "Cannot getSingleFamilyName() unless there is exactly 1 family."); return Bytes.toString(context.getScan().getFamilies()[0]); }
[ "public", "static", "String", "getSingleFamilyName", "(", "FilterAdapterContext", "context", ")", "{", "Preconditions", ".", "checkState", "(", "context", ".", "getScan", "(", ")", ".", "numFamilies", "(", ")", "==", "1", ",", "\"Cannot getSingleFamilyName() unless ...
Extract a single family name from a FilterAdapterContext. Throws if there is not exactly 1 family present in the scan. @param context a {@link com.google.cloud.bigtable.hbase.adapters.filters.FilterAdapterContext} object. @return a {@link java.lang.String} object.
[ "Extract", "a", "single", "family", "name", "from", "a", "FilterAdapterContext", ".", "Throws", "if", "there", "is", "not", "exactly", "1", "family", "present", "in", "the", "scan", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterAdapterHelper.java#L46-L51
115,354
googleapis/cloud-bigtable-client
bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/HBaseResultToMutationFn.java
HBaseResultToMutationFn.checkEmptyRow
private List<Cell> checkEmptyRow(KV<ImmutableBytesWritable, Result> kv) { List<Cell> cells = kv.getValue().listCells(); if (cells == null) { cells = Collections.emptyList(); } if (!isEmptyRowWarned && cells.isEmpty()) { logger.warn("Encountered empty row. Was input file serialized by HBase 0...
java
private List<Cell> checkEmptyRow(KV<ImmutableBytesWritable, Result> kv) { List<Cell> cells = kv.getValue().listCells(); if (cells == null) { cells = Collections.emptyList(); } if (!isEmptyRowWarned && cells.isEmpty()) { logger.warn("Encountered empty row. Was input file serialized by HBase 0...
[ "private", "List", "<", "Cell", ">", "checkEmptyRow", "(", "KV", "<", "ImmutableBytesWritable", ",", "Result", ">", "kv", ")", "{", "List", "<", "Cell", ">", "cells", "=", "kv", ".", "getValue", "(", ")", ".", "listCells", "(", ")", ";", "if", "(", ...
Warns about empty row on first occurrence only and replaces a null array with 0-length one.
[ "Warns", "about", "empty", "row", "on", "first", "occurrence", "only", "and", "replaces", "a", "null", "array", "with", "0", "-", "length", "one", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/HBaseResultToMutationFn.java#L153-L163
115,355
googleapis/cloud-bigtable-client
bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/TemplateUtils.java
TemplateUtils.BuildImportConfig
public static CloudBigtableTableConfiguration BuildImportConfig(ImportOptions opts) { CloudBigtableTableConfiguration.Builder builder = new CloudBigtableTableConfiguration.Builder() .withProjectId(opts.getBigtableProject()) .withInstanceId(opts.getBigtableInstanceId()) .w...
java
public static CloudBigtableTableConfiguration BuildImportConfig(ImportOptions opts) { CloudBigtableTableConfiguration.Builder builder = new CloudBigtableTableConfiguration.Builder() .withProjectId(opts.getBigtableProject()) .withInstanceId(opts.getBigtableInstanceId()) .w...
[ "public", "static", "CloudBigtableTableConfiguration", "BuildImportConfig", "(", "ImportOptions", "opts", ")", "{", "CloudBigtableTableConfiguration", ".", "Builder", "builder", "=", "new", "CloudBigtableTableConfiguration", ".", "Builder", "(", ")", ".", "withProjectId", ...
Builds CloudBigtableTableConfiguration from input runtime parameters for import job.
[ "Builds", "CloudBigtableTableConfiguration", "from", "input", "runtime", "parameters", "for", "import", "job", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/TemplateUtils.java#L47-L65
115,356
googleapis/cloud-bigtable-client
bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/TemplateUtils.java
TemplateUtils.BuildExportConfig
public static CloudBigtableScanConfiguration BuildExportConfig(ExportOptions options) { ValueProvider<ReadRowsRequest> request = new RequestValueProvider(options); CloudBigtableScanConfiguration.Builder configBuilder = new CloudBigtableScanConfiguration.Builder() .withProjectId(options.getBi...
java
public static CloudBigtableScanConfiguration BuildExportConfig(ExportOptions options) { ValueProvider<ReadRowsRequest> request = new RequestValueProvider(options); CloudBigtableScanConfiguration.Builder configBuilder = new CloudBigtableScanConfiguration.Builder() .withProjectId(options.getBi...
[ "public", "static", "CloudBigtableScanConfiguration", "BuildExportConfig", "(", "ExportOptions", "options", ")", "{", "ValueProvider", "<", "ReadRowsRequest", ">", "request", "=", "new", "RequestValueProvider", "(", "options", ")", ";", "CloudBigtableScanConfiguration", "...
Builds CloudBigtableScanConfiguration from input runtime parameters for export job.
[ "Builds", "CloudBigtableScanConfiguration", "from", "input", "runtime", "parameters", "for", "export", "job", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/TemplateUtils.java#L135-L146
115,357
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/util/HBaseTracingUtilities.java
HBaseTracingUtilities.setupTracingConfig
public static void setupTracingConfig() { TracingUtilities.setupTracingConfig(); List<String> descriptors = Arrays.asList( "BigtableTable.getTableDescriptor", "BigtableTable.exists", "BigtableTable.existsAll", "BigtableTable.batch", "BigtableTable.batchCallback", "BigtableTab...
java
public static void setupTracingConfig() { TracingUtilities.setupTracingConfig(); List<String> descriptors = Arrays.asList( "BigtableTable.getTableDescriptor", "BigtableTable.exists", "BigtableTable.existsAll", "BigtableTable.batch", "BigtableTable.batchCallback", "BigtableTab...
[ "public", "static", "void", "setupTracingConfig", "(", ")", "{", "TracingUtilities", ".", "setupTracingConfig", "(", ")", ";", "List", "<", "String", ">", "descriptors", "=", "Arrays", ".", "asList", "(", "\"BigtableTable.getTableDescriptor\"", ",", "\"BigtableTable...
This is a one time setup for grpcz pages. This adds all of the methods to the Tracing environment required to show a consistent set of methods relating to Cloud Bigtable and HBase methods on the grpcz page.
[ "This", "is", "a", "one", "time", "setup", "for", "grpcz", "pages", ".", "This", "adds", "all", "of", "the", "methods", "to", "the", "Tracing", "environment", "required", "to", "show", "a", "consistent", "set", "of", "methods", "relating", "to", "Cloud", ...
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/util/HBaseTracingUtilities.java#L57-L78
115,358
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/ResourceLimiter.java
ResourceLimiter.waitForCompletions
private void waitForCompletions(long timeoutMs) throws InterruptedException { Long completedOperation = this.completedOperationIds.pollFirst(timeoutMs, TimeUnit.MILLISECONDS); if (completedOperation != null) { markOperationComplete(completedOperation); } }
java
private void waitForCompletions(long timeoutMs) throws InterruptedException { Long completedOperation = this.completedOperationIds.pollFirst(timeoutMs, TimeUnit.MILLISECONDS); if (completedOperation != null) { markOperationComplete(completedOperation); } }
[ "private", "void", "waitForCompletions", "(", "long", "timeoutMs", ")", "throws", "InterruptedException", "{", "Long", "completedOperation", "=", "this", ".", "completedOperationIds", ".", "pollFirst", "(", "timeoutMs", ",", "TimeUnit", ".", "MILLISECONDS", ")", ";"...
Waits for a completion and then marks it as complete. @throws InterruptedException
[ "Waits", "for", "a", "completion", "and", "then", "marks", "it", "as", "complete", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/ResourceLimiter.java#L192-L198
115,359
googleapis/cloud-bigtable-client
bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncAdmin.java
BigtableAsyncAdmin.restoreSnapshot
@Override public CompletableFuture<Void> restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot) { CompletableFuture<Void> future = new CompletableFuture<>(); listSnapshots(Pattern.compile(snapshotName)).whenComplete( (snapshotDescriptions, err) -> { if (err != null) { futur...
java
@Override public CompletableFuture<Void> restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot) { CompletableFuture<Void> future = new CompletableFuture<>(); listSnapshots(Pattern.compile(snapshotName)).whenComplete( (snapshotDescriptions, err) -> { if (err != null) { futur...
[ "@", "Override", "public", "CompletableFuture", "<", "Void", ">", "restoreSnapshot", "(", "String", "snapshotName", ",", "boolean", "takeFailSafeSnapshot", ")", "{", "CompletableFuture", "<", "Void", ">", "future", "=", "new", "CompletableFuture", "<>", "(", ")", ...
Restore the specified snapshot on the original table. {@inheritDoc}
[ "Restore", "the", "specified", "snapshot", "on", "the", "original", "table", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncAdmin.java#L360-L397
115,360
googleapis/cloud-bigtable-client
bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncAdmin.java
BigtableAsyncAdmin.snapshotExists
private TableName snapshotExists(String snapshotName, List<SnapshotDescription> snapshotDescriptions) { if (snapshotDescriptions != null) { Optional<SnapshotDescription> descriptor = snapshotDescriptions.stream() .filter(desc -> desc.getName().equals(snapshotName)) ...
java
private TableName snapshotExists(String snapshotName, List<SnapshotDescription> snapshotDescriptions) { if (snapshotDescriptions != null) { Optional<SnapshotDescription> descriptor = snapshotDescriptions.stream() .filter(desc -> desc.getName().equals(snapshotName)) ...
[ "private", "TableName", "snapshotExists", "(", "String", "snapshotName", ",", "List", "<", "SnapshotDescription", ">", "snapshotDescriptions", ")", "{", "if", "(", "snapshotDescriptions", "!=", "null", ")", "{", "Optional", "<", "SnapshotDescription", ">", "descript...
To check Snapshot exists or not. @param snapshotName @param snapshotDescriptions @return
[ "To", "check", "Snapshot", "exists", "or", "not", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncAdmin.java#L406-L416
115,361
googleapis/cloud-bigtable-client
bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/ShuffledSource.java
ShuffledSource.split
@Override public List<? extends BoundedSource<T>> split(long desiredBundleSizeBytes, PipelineOptions options) throws Exception { List<? extends BoundedSource<T>> splits = delegate.split(desiredBundleSizeBytes, options); Collections.shuffle(splits); return splits; }
java
@Override public List<? extends BoundedSource<T>> split(long desiredBundleSizeBytes, PipelineOptions options) throws Exception { List<? extends BoundedSource<T>> splits = delegate.split(desiredBundleSizeBytes, options); Collections.shuffle(splits); return splits; }
[ "@", "Override", "public", "List", "<", "?", "extends", "BoundedSource", "<", "T", ">", ">", "split", "(", "long", "desiredBundleSizeBytes", ",", "PipelineOptions", "options", ")", "throws", "Exception", "{", "List", "<", "?", "extends", "BoundedSource", "<", ...
Shuffles the delegate source's splits.
[ "Shuffles", "the", "delegate", "source", "s", "splits", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/ShuffledSource.java#L47-L54
115,362
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/SingleFilterAdapter.java
SingleFilterAdapter.adapt
public Filters.Filter adapt(FilterAdapterContext context, Filter hbaseFilter) throws IOException { T typedFilter = getTypedFilter(hbaseFilter); return adapter.adapt(context, typedFilter); }
java
public Filters.Filter adapt(FilterAdapterContext context, Filter hbaseFilter) throws IOException { T typedFilter = getTypedFilter(hbaseFilter); return adapter.adapt(context, typedFilter); }
[ "public", "Filters", ".", "Filter", "adapt", "(", "FilterAdapterContext", "context", ",", "Filter", "hbaseFilter", ")", "throws", "IOException", "{", "T", "typedFilter", "=", "getTypedFilter", "(", "hbaseFilter", ")", ";", "return", "adapter", ".", "adapt", "(",...
Adapt the untyped hbaseFilter instance into a RowFilter. @param context a {@link com.google.cloud.bigtable.hbase.adapters.filters.FilterAdapterContext} object. @param hbaseFilter a {@link org.apache.hadoop.hbase.filter.Filter} object. @return a {@link com.google.bigtable.v2.RowFilter} object. @throws java.io.IOExcepti...
[ "Adapt", "the", "untyped", "hbaseFilter", "instance", "into", "a", "RowFilter", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/SingleFilterAdapter.java#L75-L79
115,363
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/SingleFilterAdapter.java
SingleFilterAdapter.isSupported
public FilterSupportStatus isSupported(FilterAdapterContext context, Filter hbaseFilter) { Preconditions.checkArgument(isFilterAProperSublcass(hbaseFilter)); return adapter.isFilterSupported(context, getTypedFilter(hbaseFilter)); }
java
public FilterSupportStatus isSupported(FilterAdapterContext context, Filter hbaseFilter) { Preconditions.checkArgument(isFilterAProperSublcass(hbaseFilter)); return adapter.isFilterSupported(context, getTypedFilter(hbaseFilter)); }
[ "public", "FilterSupportStatus", "isSupported", "(", "FilterAdapterContext", "context", ",", "Filter", "hbaseFilter", ")", "{", "Preconditions", ".", "checkArgument", "(", "isFilterAProperSublcass", "(", "hbaseFilter", ")", ")", ";", "return", "adapter", ".", "isFilte...
Determine if the untyped filter is supported. @param context a {@link com.google.cloud.bigtable.hbase.adapters.filters.FilterAdapterContext} object. @param hbaseFilter a {@link org.apache.hadoop.hbase.filter.Filter} object. @return a {@link com.google.cloud.bigtable.hbase.adapters.filters.FilterSupportStatus} object.
[ "Determine", "if", "the", "untyped", "filter", "is", "supported", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/SingleFilterAdapter.java#L88-L91
115,364
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/SingleFilterAdapter.java
SingleFilterAdapter.collectUnsupportedStatuses
public void collectUnsupportedStatuses( FilterAdapterContext context, Filter filter, List<FilterSupportStatus> statuses) { Preconditions.checkArgument(isFilterAProperSublcass(filter)); unsupportedStatusCollector.collectUnsupportedStatuses( context, unchecked(filter), st...
java
public void collectUnsupportedStatuses( FilterAdapterContext context, Filter filter, List<FilterSupportStatus> statuses) { Preconditions.checkArgument(isFilterAProperSublcass(filter)); unsupportedStatusCollector.collectUnsupportedStatuses( context, unchecked(filter), st...
[ "public", "void", "collectUnsupportedStatuses", "(", "FilterAdapterContext", "context", ",", "Filter", "filter", ",", "List", "<", "FilterSupportStatus", ">", "statuses", ")", "{", "Preconditions", ".", "checkArgument", "(", "isFilterAProperSublcass", "(", "filter", "...
Collect unsupported status objects into the given list. @param context a {@link com.google.cloud.bigtable.hbase.adapters.filters.FilterAdapterContext} object. @param filter a {@link org.apache.hadoop.hbase.filter.Filter} object. @param statuses a {@link java.util.List} object.
[ "Collect", "unsupported", "status", "objects", "into", "the", "given", "list", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/SingleFilterAdapter.java#L100-L109
115,365
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/util/TracingUtilities.java
TracingUtilities.setupTracingConfig
public static void setupTracingConfig() { List<String> descriptors = new ArrayList<>(); addDescriptor(descriptors, BigtableTableAdminGrpc.getServiceDescriptor()); addDescriptor(descriptors, BigtableGrpc.getServiceDescriptor()); Tracing.getExportComponent().getSampledSpanStore().registerSpanNamesForColl...
java
public static void setupTracingConfig() { List<String> descriptors = new ArrayList<>(); addDescriptor(descriptors, BigtableTableAdminGrpc.getServiceDescriptor()); addDescriptor(descriptors, BigtableGrpc.getServiceDescriptor()); Tracing.getExportComponent().getSampledSpanStore().registerSpanNamesForColl...
[ "public", "static", "void", "setupTracingConfig", "(", ")", "{", "List", "<", "String", ">", "descriptors", "=", "new", "ArrayList", "<>", "(", ")", ";", "addDescriptor", "(", "descriptors", ",", "BigtableTableAdminGrpc", ".", "getServiceDescriptor", "(", ")", ...
This is a one time setup for grpcz pages. This adds all of the methods to the Tracing environment required to show a consistent set of methods relating to Cloud Bigtable on the grpcz page. If HBase artifacts are present, this will add tracing metadata for HBase methods.
[ "This", "is", "a", "one", "time", "setup", "for", "grpcz", "pages", ".", "This", "adds", "all", "of", "the", "methods", "to", "the", "Tracing", "environment", "required", "to", "show", "a", "consistent", "set", "of", "methods", "relating", "to", "Cloud", ...
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/util/TracingUtilities.java#L65-L71
115,366
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkRead.java
BulkRead.add
public synchronized ApiFuture<FlatRow> add(Query query) { Preconditions.checkNotNull(query); ReadRowsRequest request = query.toProto(requestContext); Preconditions.checkArgument(request.getRows().getRowKeysCount() == 1); ByteString rowKey = request.getRows().getRowKeysList().get(0); Preconditions.c...
java
public synchronized ApiFuture<FlatRow> add(Query query) { Preconditions.checkNotNull(query); ReadRowsRequest request = query.toProto(requestContext); Preconditions.checkArgument(request.getRows().getRowKeysCount() == 1); ByteString rowKey = request.getRows().getRowKeysList().get(0); Preconditions.c...
[ "public", "synchronized", "ApiFuture", "<", "FlatRow", ">", "add", "(", "Query", "query", ")", "{", "Preconditions", ".", "checkNotNull", "(", "query", ")", ";", "ReadRowsRequest", "request", "=", "query", ".", "toProto", "(", "requestContext", ")", ";", "Pr...
Adds the key in the request to a batch read. The future will be resolved when the batch response is received. @param query a {@link Query} with a single row key. @return a {@link ApiFuture} that will be populated with the {@link FlatRow} that corresponds to the request
[ "Adds", "the", "key", "in", "the", "request", "to", "a", "batch", "read", ".", "The", "future", "will", "be", "resolved", "when", "the", "batch", "response", "is", "received", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkRead.java#L105-L120
115,367
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkRead.java
BulkRead.flush
public void flush() { for (Batch batch : batches.values()) { Collection<Batch> subbatches = batch.split(); for (Batch miniBatch : subbatches) { threadPool.submit(miniBatch); } } batches.clear(); }
java
public void flush() { for (Batch batch : batches.values()) { Collection<Batch> subbatches = batch.split(); for (Batch miniBatch : subbatches) { threadPool.submit(miniBatch); } } batches.clear(); }
[ "public", "void", "flush", "(", ")", "{", "for", "(", "Batch", "batch", ":", "batches", ".", "values", "(", ")", ")", "{", "Collection", "<", "Batch", ">", "subbatches", "=", "batch", ".", "split", "(", ")", ";", "for", "(", "Batch", "miniBatch", "...
Sends all remaining requests to the server. This method does not wait for the method to complete.
[ "Sends", "all", "remaining", "requests", "to", "the", "server", ".", "This", "method", "does", "not", "wait", "for", "the", "method", "to", "complete", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/BulkRead.java#L126-L134
115,368
googleapis/cloud-bigtable-client
bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/HadoopSerializationCoder.java
HadoopSerializationCoder.readObject
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); try { serialization = serializationClass.newInstance(); } catch (IllegalAccessException | InstantiationException e) { throw new RuntimeException( "Failed to deser...
java
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); try { serialization = serializationClass.newInstance(); } catch (IllegalAccessException | InstantiationException e) { throw new RuntimeException( "Failed to deser...
[ "private", "void", "readObject", "(", "java", ".", "io", ".", "ObjectInputStream", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "in", ".", "defaultReadObject", "(", ")", ";", "try", "{", "serialization", "=", "serializationClass", ".",...
Populate a possibly unserializable serialization instance.
[ "Populate", "a", "possibly", "unserializable", "serialization", "instance", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/HadoopSerializationCoder.java#L62-L71
115,369
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableClusterUtilities.java
BigtableClusterUtilities.getClusterSize
@Deprecated public int getClusterSize(String clusterId, String zoneId) { Cluster cluster = getCluster(clusterId, zoneId); String message = String.format("Cluster %s/%s was not found.", clusterId, zoneId); Preconditions.checkNotNull(cluster, message); return cluster.getServeNodes(); }
java
@Deprecated public int getClusterSize(String clusterId, String zoneId) { Cluster cluster = getCluster(clusterId, zoneId); String message = String.format("Cluster %s/%s was not found.", clusterId, zoneId); Preconditions.checkNotNull(cluster, message); return cluster.getServeNodes(); }
[ "@", "Deprecated", "public", "int", "getClusterSize", "(", "String", "clusterId", ",", "String", "zoneId", ")", "{", "Cluster", "cluster", "=", "getCluster", "(", "clusterId", ",", "zoneId", ")", ";", "String", "message", "=", "String", ".", "format", "(", ...
Gets the serve node count of the cluster. @param clusterId @param zoneId @return the {@link Cluster#getServeNodes()} of the clusterId. @deprecated Use {@link #getCluster(String, String)} or {@link #getSingleCluster()} and then call {@link Cluster#getServeNodes()}.
[ "Gets", "the", "serve", "node", "count", "of", "the", "cluster", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableClusterUtilities.java#L167-L173
115,370
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableClusterUtilities.java
BigtableClusterUtilities.setClusterSize
public void setClusterSize(String clusterId, String zoneId, int newSize) throws InterruptedException { setClusterSize(instanceName.toClusterName(clusterId).getClusterName(), newSize); }
java
public void setClusterSize(String clusterId, String zoneId, int newSize) throws InterruptedException { setClusterSize(instanceName.toClusterName(clusterId).getClusterName(), newSize); }
[ "public", "void", "setClusterSize", "(", "String", "clusterId", ",", "String", "zoneId", ",", "int", "newSize", ")", "throws", "InterruptedException", "{", "setClusterSize", "(", "instanceName", ".", "toClusterName", "(", "clusterId", ")", ".", "getClusterName", "...
Sets a cluster size to a specific size. @param clusterId @param zoneId @param newSize @throws InterruptedException if the cluster is in the middle of updating, and an interrupt was received
[ "Sets", "a", "cluster", "size", "to", "a", "specific", "size", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableClusterUtilities.java#L203-L206
115,371
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableClusterUtilities.java
BigtableClusterUtilities.setClusterSize
private void setClusterSize(String clusterName, int newSize) throws InterruptedException { Preconditions.checkArgument(newSize > 0, "Cluster size must be > 0"); logger.info("Updating cluster %s to size %d", clusterName, newSize); Operation operation = client.updateCluster(Cluster.newBuilder() ...
java
private void setClusterSize(String clusterName, int newSize) throws InterruptedException { Preconditions.checkArgument(newSize > 0, "Cluster size must be > 0"); logger.info("Updating cluster %s to size %d", clusterName, newSize); Operation operation = client.updateCluster(Cluster.newBuilder() ...
[ "private", "void", "setClusterSize", "(", "String", "clusterName", ",", "int", "newSize", ")", "throws", "InterruptedException", "{", "Preconditions", ".", "checkArgument", "(", "newSize", ">", "0", ",", "\"Cluster size must be > 0\"", ")", ";", "logger", ".", "in...
Update a specific cluster's server node count to the number specified
[ "Update", "a", "specific", "cluster", "s", "server", "node", "count", "to", "the", "number", "specified" ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableClusterUtilities.java#L220-L230
115,372
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableClusterUtilities.java
BigtableClusterUtilities.waitForOperation
public void waitForOperation(String operationName, int maxSeconds) throws InterruptedException { long endTimeMillis = TimeUnit.SECONDS.toMillis(maxSeconds) + System.currentTimeMillis(); GetOperationRequest request = GetOperationRequest.newBuilder().setName(operationName).build(); do { Thread.sleep(50...
java
public void waitForOperation(String operationName, int maxSeconds) throws InterruptedException { long endTimeMillis = TimeUnit.SECONDS.toMillis(maxSeconds) + System.currentTimeMillis(); GetOperationRequest request = GetOperationRequest.newBuilder().setName(operationName).build(); do { Thread.sleep(50...
[ "public", "void", "waitForOperation", "(", "String", "operationName", ",", "int", "maxSeconds", ")", "throws", "InterruptedException", "{", "long", "endTimeMillis", "=", "TimeUnit", ".", "SECONDS", ".", "toMillis", "(", "maxSeconds", ")", "+", "System", ".", "cu...
Waits for an operation like cluster resizing to complete. @param operationName The fully qualified name of the operation @param maxSeconds The maximum amount of seconds to wait for the operation to complete. @throws InterruptedException if a user interrupts the process, usually with a ^C.
[ "Waits", "for", "an", "operation", "like", "cluster", "resizing", "to", "complete", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableClusterUtilities.java#L251-L273
115,373
googleapis/cloud-bigtable-client
bigtable-hbase-1.x-parent/bigtable-hbase-1.x-mapreduce/src/main/java/com/google/cloud/bigtable/mapreduce/Import.java
Import.filterKv
public static Cell filterKv(Filter filter, Cell kv) throws IOException { // apply the filter and skip this kv if the filter doesn't apply if (filter != null) { Filter.ReturnCode code = filter.filterKeyValue(kv); if (LOG.isTraceEnabled()) { LOG.trace("Filter returned:" + code + " for the key ...
java
public static Cell filterKv(Filter filter, Cell kv) throws IOException { // apply the filter and skip this kv if the filter doesn't apply if (filter != null) { Filter.ReturnCode code = filter.filterKeyValue(kv); if (LOG.isTraceEnabled()) { LOG.trace("Filter returned:" + code + " for the key ...
[ "public", "static", "Cell", "filterKv", "(", "Filter", "filter", ",", "Cell", "kv", ")", "throws", "IOException", "{", "// apply the filter and skip this kv if the filter doesn't apply", "if", "(", "filter", "!=", "null", ")", "{", "Filter", ".", "ReturnCode", "code...
Attempt to filter out the keyvalue @param kv {@link org.apache.hadoop.hbase.KeyValue} on which to apply the filter @return <tt>null</tt> if the key should not be written, otherwise returns the original {@link org.apache.hadoop.hbase.KeyValue} @param filter a {@link org.apache.hadoop.hbase.filter.Filter} object. @throw...
[ "Attempt", "to", "filter", "out", "the", "keyvalue" ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-mapreduce/src/main/java/com/google/cloud/bigtable/mapreduce/Import.java#L289-L303
115,374
googleapis/cloud-bigtable-client
bigtable-hbase-1.x-parent/bigtable-hbase-1.x-mapreduce/src/main/java/com/google/cloud/bigtable/mapreduce/Import.java
Import.addFilterAndArguments
public static void addFilterAndArguments(Configuration conf, Class<? extends Filter> clazz, List<String> filterArgs) { conf.set(Import.FILTER_CLASS_CONF_KEY, clazz.getName()); conf.setStrings(Import.FILTER_ARGS_CONF_KEY, filterArgs.toArray(new String[filterArgs.size()])); }
java
public static void addFilterAndArguments(Configuration conf, Class<? extends Filter> clazz, List<String> filterArgs) { conf.set(Import.FILTER_CLASS_CONF_KEY, clazz.getName()); conf.setStrings(Import.FILTER_ARGS_CONF_KEY, filterArgs.toArray(new String[filterArgs.size()])); }
[ "public", "static", "void", "addFilterAndArguments", "(", "Configuration", "conf", ",", "Class", "<", "?", "extends", "Filter", ">", "clazz", ",", "List", "<", "String", ">", "filterArgs", ")", "{", "conf", ".", "set", "(", "Import", ".", "FILTER_CLASS_CONF_...
Add a Filter to be instantiated on import @param conf Configuration to update (will be passed to the job) @param clazz {@link org.apache.hadoop.hbase.filter.Filter} subclass to instantiate on the server. @param filterArgs List of arguments to pass to the filter on instantiation
[ "Add", "a", "Filter", "to", "be", "instantiated", "on", "import" ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-hbase-1.x-parent/bigtable-hbase-1.x-mapreduce/src/main/java/com/google/cloud/bigtable/mapreduce/Import.java#L392-L396
115,375
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/CredentialFactory.java
CredentialFactory.getInputStreamCredential
public static Credentials getInputStreamCredential(InputStream inputStream) throws IOException { GoogleCredentials credentials = GoogleCredentials.fromStream(inputStream, getHttpTransportFactory()); if (credentials instanceof ServiceAccountCredentials) { return getJwtToken((ServiceAccountCredentials)cred...
java
public static Credentials getInputStreamCredential(InputStream inputStream) throws IOException { GoogleCredentials credentials = GoogleCredentials.fromStream(inputStream, getHttpTransportFactory()); if (credentials instanceof ServiceAccountCredentials) { return getJwtToken((ServiceAccountCredentials)cred...
[ "public", "static", "Credentials", "getInputStreamCredential", "(", "InputStream", "inputStream", ")", "throws", "IOException", "{", "GoogleCredentials", "credentials", "=", "GoogleCredentials", ".", "fromStream", "(", "inputStream", ",", "getHttpTransportFactory", "(", "...
Initializes OAuth2 application default credentials based on an inputStream. @param inputStream a {@link java.io.InputStream} object. @return a {@link com.google.auth.Credentials} object. @throws java.io.IOException if any.
[ "Initializes", "OAuth2", "application", "default", "credentials", "based", "on", "an", "inputStream", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/CredentialFactory.java#L240-L247
115,376
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java
AbstractBigtableAdmin.createTable
protected void createTable(TableName tableName, CreateTableRequest request) throws IOException { try { tableAdminClientWrapper.createTable(request); } catch (Throwable throwable) { throw convertToTableExistsException(tableName, throwable); } }
java
protected void createTable(TableName tableName, CreateTableRequest request) throws IOException { try { tableAdminClientWrapper.createTable(request); } catch (Throwable throwable) { throw convertToTableExistsException(tableName, throwable); } }
[ "protected", "void", "createTable", "(", "TableName", "tableName", ",", "CreateTableRequest", "request", ")", "throws", "IOException", "{", "try", "{", "tableAdminClientWrapper", ".", "createTable", "(", "request", ")", ";", "}", "catch", "(", "Throwable", "throwa...
Creates a Table. @param tableName a {@link TableName} object. @param request a {@link CreateTableRequest} object to send. @throws java.io.IOException if any.
[ "Creates", "a", "Table", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java#L332-L339
115,377
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java
AbstractBigtableAdmin.addColumn
@Deprecated public void addColumn(String tableName, HColumnDescriptor column) throws IOException { addColumn(TableName.valueOf(tableName), column); }
java
@Deprecated public void addColumn(String tableName, HColumnDescriptor column) throws IOException { addColumn(TableName.valueOf(tableName), column); }
[ "@", "Deprecated", "public", "void", "addColumn", "(", "String", "tableName", ",", "HColumnDescriptor", "column", ")", "throws", "IOException", "{", "addColumn", "(", "TableName", ".", "valueOf", "(", "tableName", ")", ",", "column", ")", ";", "}" ]
shell is switch to use the methods defined in the interface.
[ "shell", "is", "switch", "to", "use", "the", "methods", "defined", "in", "the", "interface", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java#L618-L621
115,378
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java
AbstractBigtableAdmin.snapshot
public void snapshot(byte[] snapshotName, byte[] tableName) throws IOException, IllegalArgumentException { snapshot(snapshotName, TableName.valueOf(tableName)); }
java
public void snapshot(byte[] snapshotName, byte[] tableName) throws IOException, IllegalArgumentException { snapshot(snapshotName, TableName.valueOf(tableName)); }
[ "public", "void", "snapshot", "(", "byte", "[", "]", "snapshotName", ",", "byte", "[", "]", "tableName", ")", "throws", "IOException", ",", "IllegalArgumentException", "{", "snapshot", "(", "snapshotName", ",", "TableName", ".", "valueOf", "(", "tableName", ")...
This is needed for the hbase shell. @param snapshotName a byte array object. @param tableName a byte array object. @throws IOException if any.
[ "This", "is", "needed", "for", "the", "hbase", "shell", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java#L866-L869
115,379
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/AbstractRetryingOperation.java
AbstractRetryingOperation.getAsyncResult
public ListenableFuture<ResultT> getAsyncResult() { Preconditions.checkState(operationTimerContext == null); operationTimerContext = rpc.getRpcMetrics().timeOperation(); run(); return completionFuture; }
java
public ListenableFuture<ResultT> getAsyncResult() { Preconditions.checkState(operationTimerContext == null); operationTimerContext = rpc.getRpcMetrics().timeOperation(); run(); return completionFuture; }
[ "public", "ListenableFuture", "<", "ResultT", ">", "getAsyncResult", "(", ")", "{", "Preconditions", ".", "checkState", "(", "operationTimerContext", "==", "null", ")", ";", "operationTimerContext", "=", "rpc", ".", "getRpcMetrics", "(", ")", ".", "timeOperation",...
Initial execution of the RPC.
[ "Initial", "execution", "of", "the", "RPC", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/AbstractRetryingOperation.java#L423-L428
115,380
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/OperationAccountant.java
OperationAccountant.awaitCompletion
public void awaitCompletion() throws InterruptedException { boolean performedWarning = false; while (hasInflightOperations()) { synchronized (signal) { if (hasInflightOperations()) { signal.wait(finishWaitMillis); } } long now = clock.nanoTime(); if (now >= no...
java
public void awaitCompletion() throws InterruptedException { boolean performedWarning = false; while (hasInflightOperations()) { synchronized (signal) { if (hasInflightOperations()) { signal.wait(finishWaitMillis); } } long now = clock.nanoTime(); if (now >= no...
[ "public", "void", "awaitCompletion", "(", ")", "throws", "InterruptedException", "{", "boolean", "performedWarning", "=", "false", ";", "while", "(", "hasInflightOperations", "(", ")", ")", "{", "synchronized", "(", "signal", ")", "{", "if", "(", "hasInflightOpe...
Blocks until all outstanding RPCs and retries have completed @throws java.lang.InterruptedException if any.
[ "Blocks", "until", "all", "outstanding", "RPCs", "and", "retries", "have", "completed" ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/OperationAccountant.java#L96-L116
115,381
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/BigtableVeneerSettingsFactory.java
BigtableVeneerSettingsFactory.buildReadRowSettings
private static void buildReadRowSettings(Builder builder, BigtableOptions options) { RetrySettings retrySettings = buildIdempotentRetrySettings(builder.readRowSettings().getRetrySettings(), options); builder.readRowSettings() .setRetrySettings(retrySettings) .setRetryableCodes(buildRetr...
java
private static void buildReadRowSettings(Builder builder, BigtableOptions options) { RetrySettings retrySettings = buildIdempotentRetrySettings(builder.readRowSettings().getRetrySettings(), options); builder.readRowSettings() .setRetrySettings(retrySettings) .setRetryableCodes(buildRetr...
[ "private", "static", "void", "buildReadRowSettings", "(", "Builder", "builder", ",", "BigtableOptions", "options", ")", "{", "RetrySettings", "retrySettings", "=", "buildIdempotentRetrySettings", "(", "builder", ".", "readRowSettings", "(", ")", ".", "getRetrySettings",...
To build default Retry settings for Point Read.
[ "To", "build", "default", "Retry", "settings", "for", "Point", "Read", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/config/BigtableVeneerSettingsFactory.java#L224-L231
115,382
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/SingleColumnValueFilterAdapter.java
SingleColumnValueFilterAdapter.createValueMatchFilter
private Filter createValueMatchFilter( FilterAdapterContext context, SingleColumnValueFilter filter) throws IOException { ValueFilter valueFilter = new ValueFilter(filter.getOperator(), filter.getComparator()); return delegateAdapter.toFilter(context, valueFilter); }
java
private Filter createValueMatchFilter( FilterAdapterContext context, SingleColumnValueFilter filter) throws IOException { ValueFilter valueFilter = new ValueFilter(filter.getOperator(), filter.getComparator()); return delegateAdapter.toFilter(context, valueFilter); }
[ "private", "Filter", "createValueMatchFilter", "(", "FilterAdapterContext", "context", ",", "SingleColumnValueFilter", "filter", ")", "throws", "IOException", "{", "ValueFilter", "valueFilter", "=", "new", "ValueFilter", "(", "filter", ".", "getOperator", "(", ")", ",...
Emit a filter that will match against a single value.
[ "Emit", "a", "filter", "that", "will", "match", "against", "a", "single", "value", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/SingleColumnValueFilterAdapter.java#L197-L201
115,383
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/scanner/RetryingReadRowsOperation.java
RetryingReadRowsOperation.handleTimeoutError
private void handleTimeoutError(Status status) { Preconditions.checkArgument(status.getCause() instanceof StreamWaitTimeoutException, "status is not caused by a StreamWaitTimeoutException"); StreamWaitTimeoutException e = ((StreamWaitTimeoutException) status.getCause()); // Cancel the existing rpc....
java
private void handleTimeoutError(Status status) { Preconditions.checkArgument(status.getCause() instanceof StreamWaitTimeoutException, "status is not caused by a StreamWaitTimeoutException"); StreamWaitTimeoutException e = ((StreamWaitTimeoutException) status.getCause()); // Cancel the existing rpc....
[ "private", "void", "handleTimeoutError", "(", "Status", "status", ")", "{", "Preconditions", ".", "checkArgument", "(", "status", ".", "getCause", "(", ")", "instanceof", "StreamWaitTimeoutException", ",", "\"status is not caused by a StreamWaitTimeoutException\"", ")", "...
Special retry handling for watchdog timeouts, which uses its own fail counter. @return true if a retry has been scheduled
[ "Special", "retry", "handling", "for", "watchdog", "timeouts", "which", "uses", "its", "own", "fail", "counter", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/scanner/RetryingReadRowsOperation.java#L242-L266
115,384
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/ResourceLimiterStats.java
ResourceLimiterStats.markThrottling
void markThrottling(long throttlingDurationInNanos) { throttlingTimer.update(throttlingDurationInNanos, TimeUnit.NANOSECONDS); cumulativeThrottlingTimeNanos.addAndGet(throttlingDurationInNanos); }
java
void markThrottling(long throttlingDurationInNanos) { throttlingTimer.update(throttlingDurationInNanos, TimeUnit.NANOSECONDS); cumulativeThrottlingTimeNanos.addAndGet(throttlingDurationInNanos); }
[ "void", "markThrottling", "(", "long", "throttlingDurationInNanos", ")", "{", "throttlingTimer", ".", "update", "(", "throttlingDurationInNanos", ",", "TimeUnit", ".", "NANOSECONDS", ")", ";", "cumulativeThrottlingTimeNanos", ".", "addAndGet", "(", "throttlingDurationInNa...
This method updates throttling statistics. @param throttlingDurationInNanos
[ "This", "method", "updates", "throttling", "statistics", "." ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/async/ResourceLimiterStats.java#L69-L72
115,385
elvishew/xLog
library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java
PatternFlattener.parsePattern
static List<String> parsePattern(String pattern) { List<String> parameters = new ArrayList<>(4); Matcher matcher = PARAM_REGEX.matcher(pattern); while (matcher.find()) { parameters.add(matcher.group(1)); } return parameters; }
java
static List<String> parsePattern(String pattern) { List<String> parameters = new ArrayList<>(4); Matcher matcher = PARAM_REGEX.matcher(pattern); while (matcher.find()) { parameters.add(matcher.group(1)); } return parameters; }
[ "static", "List", "<", "String", ">", "parsePattern", "(", "String", "pattern", ")", "{", "List", "<", "String", ">", "parameters", "=", "new", "ArrayList", "<>", "(", "4", ")", ";", "Matcher", "matcher", "=", "PARAM_REGEX", ".", "matcher", "(", "pattern...
Get the list of parameters from the given pattern. @param pattern the given pattern @return the parameters list, or empty if no parameter found from the given pattern
[ "Get", "the", "list", "of", "parameters", "from", "the", "given", "pattern", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java#L128-L135
115,386
elvishew/xLog
library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java
PatternFlattener.parseParameters
private static List<ParameterFiller> parseParameters(List<String> parameters) { List<ParameterFiller> parameterFillers = new ArrayList<>(parameters.size()); for (String parameter : parameters) { ParameterFiller parameterFiller = parseParameter(parameter); if (parameterFiller != null) { param...
java
private static List<ParameterFiller> parseParameters(List<String> parameters) { List<ParameterFiller> parameterFillers = new ArrayList<>(parameters.size()); for (String parameter : parameters) { ParameterFiller parameterFiller = parseParameter(parameter); if (parameterFiller != null) { param...
[ "private", "static", "List", "<", "ParameterFiller", ">", "parseParameters", "(", "List", "<", "String", ">", "parameters", ")", "{", "List", "<", "ParameterFiller", ">", "parameterFillers", "=", "new", "ArrayList", "<>", "(", "parameters", ".", "size", "(", ...
Get the list of parameter fillers from the given parameters. @param parameters the given parameters @return the parameter fillers, or empty if none of the parameters is recognizable
[ "Get", "the", "list", "of", "parameter", "fillers", "from", "the", "given", "parameters", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java#L143-L152
115,387
elvishew/xLog
library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java
PatternFlattener.parseParameter
private static ParameterFiller parseParameter(String parameter) { String wrappedParameter = "{" + parameter + "}"; String trimmedParameter = parameter.trim(); ParameterFiller parameterFiller = parseDateParameter(wrappedParameter, trimmedParameter); if (parameterFiller != null) { return parameterFi...
java
private static ParameterFiller parseParameter(String parameter) { String wrappedParameter = "{" + parameter + "}"; String trimmedParameter = parameter.trim(); ParameterFiller parameterFiller = parseDateParameter(wrappedParameter, trimmedParameter); if (parameterFiller != null) { return parameterFi...
[ "private", "static", "ParameterFiller", "parseParameter", "(", "String", "parameter", ")", "{", "String", "wrappedParameter", "=", "\"{\"", "+", "parameter", "+", "\"}\"", ";", "String", "trimmedParameter", "=", "parameter", ".", "trim", "(", ")", ";", "Paramete...
Create a parameter filler if the given parameter is recognizable. @param parameter the given parameter @return the created parameter filler, or null if can not recognize the given parameter
[ "Create", "a", "parameter", "filler", "if", "the", "given", "parameter", "is", "recognizable", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java#L160-L184
115,388
elvishew/xLog
library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java
PatternFlattener.parseDateParameter
static DateFiller parseDateParameter(String wrappedParameter, String trimmedParameter) { if (trimmedParameter.startsWith(PARAMETER_DATE + " ") && trimmedParameter.length() > PARAMETER_DATE.length() + 1) { String dateFormat = trimmedParameter.substring(PARAMETER_DATE.length() + 1); return new Dat...
java
static DateFiller parseDateParameter(String wrappedParameter, String trimmedParameter) { if (trimmedParameter.startsWith(PARAMETER_DATE + " ") && trimmedParameter.length() > PARAMETER_DATE.length() + 1) { String dateFormat = trimmedParameter.substring(PARAMETER_DATE.length() + 1); return new Dat...
[ "static", "DateFiller", "parseDateParameter", "(", "String", "wrappedParameter", ",", "String", "trimmedParameter", ")", "{", "if", "(", "trimmedParameter", ".", "startsWith", "(", "PARAMETER_DATE", "+", "\" \"", ")", "&&", "trimmedParameter", ".", "length", "(", ...
Try to create a date filler if the given parameter is a date parameter. @return created date filler, or null if the given parameter is not a date parameter
[ "Try", "to", "create", "a", "date", "filler", "if", "the", "given", "parameter", "is", "a", "date", "parameter", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java#L191-L200
115,389
elvishew/xLog
library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java
PatternFlattener.parseLevelParameter
static LevelFiller parseLevelParameter(String wrappedParameter, String trimmedParameter) { if (trimmedParameter.equals(PARAMETER_LEVEL_SHORT)) { return new LevelFiller(wrappedParameter, trimmedParameter, false); } else if (trimmedParameter.equals(PARAMETER_LEVEL_LONG)) { return new LevelFiller(wrapp...
java
static LevelFiller parseLevelParameter(String wrappedParameter, String trimmedParameter) { if (trimmedParameter.equals(PARAMETER_LEVEL_SHORT)) { return new LevelFiller(wrappedParameter, trimmedParameter, false); } else if (trimmedParameter.equals(PARAMETER_LEVEL_LONG)) { return new LevelFiller(wrapp...
[ "static", "LevelFiller", "parseLevelParameter", "(", "String", "wrappedParameter", ",", "String", "trimmedParameter", ")", "{", "if", "(", "trimmedParameter", ".", "equals", "(", "PARAMETER_LEVEL_SHORT", ")", ")", "{", "return", "new", "LevelFiller", "(", "wrappedPa...
Try to create a level filler if the given parameter is a level parameter. @return created level filler, or null if the given parameter is not a level parameter
[ "Try", "to", "create", "a", "level", "filler", "if", "the", "given", "parameter", "is", "a", "level", "parameter", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java#L207-L214
115,390
elvishew/xLog
library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java
PatternFlattener.parseTagParameter
static TagFiller parseTagParameter(String wrappedParameter, String trimmedParameter) { if (trimmedParameter.equals(PARAMETER_TAG)) { return new TagFiller(wrappedParameter, trimmedParameter); } return null; }
java
static TagFiller parseTagParameter(String wrappedParameter, String trimmedParameter) { if (trimmedParameter.equals(PARAMETER_TAG)) { return new TagFiller(wrappedParameter, trimmedParameter); } return null; }
[ "static", "TagFiller", "parseTagParameter", "(", "String", "wrappedParameter", ",", "String", "trimmedParameter", ")", "{", "if", "(", "trimmedParameter", ".", "equals", "(", "PARAMETER_TAG", ")", ")", "{", "return", "new", "TagFiller", "(", "wrappedParameter", ",...
Try to create a tag filler if the given parameter is a tag parameter. @return created tag filler, or null if the given parameter is not a tag parameter
[ "Try", "to", "create", "a", "tag", "filler", "if", "the", "given", "parameter", "is", "a", "tag", "parameter", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java#L221-L226
115,391
elvishew/xLog
library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java
PatternFlattener.parseMessageParameter
static MessageFiller parseMessageParameter(String wrappedParameter, String trimmedParameter) { if (trimmedParameter.equals(PARAMETER_MESSAGE)) { return new MessageFiller(wrappedParameter, trimmedParameter); } return null; }
java
static MessageFiller parseMessageParameter(String wrappedParameter, String trimmedParameter) { if (trimmedParameter.equals(PARAMETER_MESSAGE)) { return new MessageFiller(wrappedParameter, trimmedParameter); } return null; }
[ "static", "MessageFiller", "parseMessageParameter", "(", "String", "wrappedParameter", ",", "String", "trimmedParameter", ")", "{", "if", "(", "trimmedParameter", ".", "equals", "(", "PARAMETER_MESSAGE", ")", ")", "{", "return", "new", "MessageFiller", "(", "wrapped...
Try to create a message filler if the given parameter is a message parameter. @return created message filler, or null if the given parameter is not a message parameter
[ "Try", "to", "create", "a", "message", "filler", "if", "the", "given", "parameter", "is", "a", "message", "parameter", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java#L233-L238
115,392
elvishew/xLog
sample/src/main/java/com/elvishew/xlogsample/XLogSampleApplication.java
XLogSampleApplication.initXlog
private void initXlog() { LogConfiguration config = new LogConfiguration.Builder() .logLevel(BuildConfig.DEBUG ? LogLevel.ALL // Specify log level, logs below this level won't be printed, default: LogLevel.ALL : LogLevel.NONE) .tag(getString(R.string.global_tag)) ...
java
private void initXlog() { LogConfiguration config = new LogConfiguration.Builder() .logLevel(BuildConfig.DEBUG ? LogLevel.ALL // Specify log level, logs below this level won't be printed, default: LogLevel.ALL : LogLevel.NONE) .tag(getString(R.string.global_tag)) ...
[ "private", "void", "initXlog", "(", ")", "{", "LogConfiguration", "config", "=", "new", "LogConfiguration", ".", "Builder", "(", ")", ".", "logLevel", "(", "BuildConfig", ".", "DEBUG", "?", "LogLevel", ".", "ALL", "// Specify log level, logs below this level won't b...
Initialize XLog.
[ "Initialize", "XLog", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/sample/src/main/java/com/elvishew/xlogsample/XLogSampleApplication.java#L50-L89
115,393
elvishew/xLog
library/src/main/java/com/elvishew/xlog/LogUtils.java
LogUtils.formatJson
public static String formatJson(String json) { assertInitialization(); return XLog.sLogConfiguration.jsonFormatter.format(json); }
java
public static String formatJson(String json) { assertInitialization(); return XLog.sLogConfiguration.jsonFormatter.format(json); }
[ "public", "static", "String", "formatJson", "(", "String", "json", ")", "{", "assertInitialization", "(", ")", ";", "return", "XLog", ".", "sLogConfiguration", ".", "jsonFormatter", ".", "format", "(", "json", ")", ";", "}" ]
Format a JSON string using default JSON formatter. @param json the JSON string to format @return the formatted string
[ "Format", "a", "JSON", "string", "using", "default", "JSON", "formatter", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/LogUtils.java#L43-L46
115,394
elvishew/xLog
library/src/main/java/com/elvishew/xlog/LogUtils.java
LogUtils.formatXml
public static String formatXml(String xml) { assertInitialization(); return XLog.sLogConfiguration.xmlFormatter.format(xml); }
java
public static String formatXml(String xml) { assertInitialization(); return XLog.sLogConfiguration.xmlFormatter.format(xml); }
[ "public", "static", "String", "formatXml", "(", "String", "xml", ")", "{", "assertInitialization", "(", ")", ";", "return", "XLog", ".", "sLogConfiguration", ".", "xmlFormatter", ".", "format", "(", "xml", ")", ";", "}" ]
Format an XML string using default XML formatter. @param xml the XML string to format @return the formatted string
[ "Format", "an", "XML", "string", "using", "default", "XML", "formatter", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/LogUtils.java#L54-L57
115,395
elvishew/xLog
library/src/main/java/com/elvishew/xlog/LogUtils.java
LogUtils.formatThrowable
public static String formatThrowable(Throwable throwable) { assertInitialization(); return XLog.sLogConfiguration.throwableFormatter.format(throwable); }
java
public static String formatThrowable(Throwable throwable) { assertInitialization(); return XLog.sLogConfiguration.throwableFormatter.format(throwable); }
[ "public", "static", "String", "formatThrowable", "(", "Throwable", "throwable", ")", "{", "assertInitialization", "(", ")", ";", "return", "XLog", ".", "sLogConfiguration", ".", "throwableFormatter", ".", "format", "(", "throwable", ")", ";", "}" ]
Format a throwable using default throwable formatter. @param throwable the throwable to format @return the formatted string
[ "Format", "a", "throwable", "using", "default", "throwable", "formatter", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/LogUtils.java#L65-L68
115,396
elvishew/xLog
library/src/main/java/com/elvishew/xlog/LogUtils.java
LogUtils.formatThread
public static String formatThread(Thread thread) { assertInitialization(); return XLog.sLogConfiguration.threadFormatter.format(thread); }
java
public static String formatThread(Thread thread) { assertInitialization(); return XLog.sLogConfiguration.threadFormatter.format(thread); }
[ "public", "static", "String", "formatThread", "(", "Thread", "thread", ")", "{", "assertInitialization", "(", ")", ";", "return", "XLog", ".", "sLogConfiguration", ".", "threadFormatter", ".", "format", "(", "thread", ")", ";", "}" ]
Format a thread using default thread formatter. @param thread the thread to format @return the formatted string
[ "Format", "a", "thread", "using", "default", "thread", "formatter", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/LogUtils.java#L76-L79
115,397
elvishew/xLog
library/src/main/java/com/elvishew/xlog/LogUtils.java
LogUtils.formatStackTrace
public static String formatStackTrace(StackTraceElement[] stackTrace) { assertInitialization(); return XLog.sLogConfiguration.stackTraceFormatter.format(stackTrace); }
java
public static String formatStackTrace(StackTraceElement[] stackTrace) { assertInitialization(); return XLog.sLogConfiguration.stackTraceFormatter.format(stackTrace); }
[ "public", "static", "String", "formatStackTrace", "(", "StackTraceElement", "[", "]", "stackTrace", ")", "{", "assertInitialization", "(", ")", ";", "return", "XLog", ".", "sLogConfiguration", ".", "stackTraceFormatter", ".", "format", "(", "stackTrace", ")", ";",...
Format a stack trace using default stack trace formatter. @param stackTrace the stack trace to format @return the formatted string
[ "Format", "a", "stack", "trace", "using", "default", "stack", "trace", "formatter", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/LogUtils.java#L87-L90
115,398
elvishew/xLog
library/src/main/java/com/elvishew/xlog/LogUtils.java
LogUtils.addBorder
public static String addBorder(String[] segments) { assertInitialization(); return XLog.sLogConfiguration.borderFormatter.format(segments); }
java
public static String addBorder(String[] segments) { assertInitialization(); return XLog.sLogConfiguration.borderFormatter.format(segments); }
[ "public", "static", "String", "addBorder", "(", "String", "[", "]", "segments", ")", "{", "assertInitialization", "(", ")", ";", "return", "XLog", ".", "sLogConfiguration", ".", "borderFormatter", ".", "format", "(", "segments", ")", ";", "}" ]
Add border to string segments using default border formatter. @param segments the string segments to add border to @return the bordered string segments
[ "Add", "border", "to", "string", "segments", "using", "default", "border", "formatter", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/LogUtils.java#L98-L101
115,399
elvishew/xLog
library/src/main/java/com/elvishew/xlog/printer/AndroidPrinter.java
AndroidPrinter.printChunk
void printChunk(int logLevel, String tag, String msg) { android.util.Log.println(logLevel, tag, msg); }
java
void printChunk(int logLevel, String tag, String msg) { android.util.Log.println(logLevel, tag, msg); }
[ "void", "printChunk", "(", "int", "logLevel", ",", "String", "tag", ",", "String", "msg", ")", "{", "android", ".", "util", ".", "Log", ".", "println", "(", "logLevel", ",", "tag", ",", "msg", ")", ";", "}" ]
Print single chunk of log in new line. @param logLevel the level of log @param tag the tag of log @param msg the msg of log
[ "Print", "single", "chunk", "of", "log", "in", "new", "line", "." ]
c6fb95555ce619d3e527f5ba6c45d4d247c5a838
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/printer/AndroidPrinter.java#L103-L105