id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
20473418_143 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/mapreduce/CsvBulkImportUtilTest.java",
"identifier": "CsvBulkImportUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testInitCsvImportJob() throws IOException {\n Configuration conf = new Configuration();\n\n char delimiter = '\\001';\n char quote = '\\002';\n char escape = '!';\n\n CsvBulkImportUtil.initCsvImportJob(conf, delimiter, quote, escape, null, null);\n\n // Serialize and deserialize the config to ensure that there aren't any issues\n // with non-printable characters as delimiters\n File tempFile = File.createTempFile(\"test-config\", \".xml\");\n FileOutputStream fileOutputStream = new FileOutputStream(tempFile);\n conf.writeXml(fileOutputStream);\n fileOutputStream.close();\n Configuration deserialized = new Configuration();\n deserialized.addResource(new FileInputStream(tempFile));\n\n assertEquals(Character.valueOf('\\001'),\n CsvBulkImportUtil.getCharacter(deserialized, CsvToKeyValueMapper.FIELD_DELIMITER_CONFKEY));\n assertEquals(Character.valueOf('\\002'),\n CsvBulkImportUtil.getCharacter(deserialized, CsvToKeyValueMapper.QUOTE_CHAR_CONFKEY));\n assertEquals(Character.valueOf('!'),\n CsvBulkImportUtil.getCharacter(deserialized, CsvToKeyValueMapper.ESCAPE_CHAR_CONFKEY));\n assertNull(deserialized.get(CsvToKeyValueMapper.ARRAY_DELIMITER_CONFKEY));\n\n tempFile.delete();\n }",
"class_method_signature": "CsvBulkImportUtilTest.testInitCsvImportJob()",
"constructor": false,
"full_signature": "@Test public void testInitCsvImportJob()",
"identifier": "testInitCsvImportJob",
"invocations": [
"initCsvImportJob",
"createTempFile",
"writeXml",
"close",
"addResource",
"assertEquals",
"valueOf",
"getCharacter",
"assertEquals",
"valueOf",
"getCharacter",
"assertEquals",
"valueOf",
"getCharacter",
"assertNull",
"get",
"delete"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testInitCsvImportJob()",
"testcase": true
} | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/mapreduce/CsvBulkImportUtil.java",
"identifier": "CsvBulkImportUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "CsvBulkImportUtil.initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"constructor": false,
"full_signature": "public static void initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"identifier": "initCsvImportJob",
"modifiers": "public static",
"parameters": "(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"return": "void",
"signature": "void initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"constructor": false,
"full_signature": "public static void configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"identifier": "configurePreUpsertProcessor",
"modifiers": "public static",
"parameters": "(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"return": "void",
"signature": "void configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.setChar(Configuration conf, String confKey, char charValue)",
"constructor": false,
"full_signature": "@VisibleForTesting static void setChar(Configuration conf, String confKey, char charValue)",
"identifier": "setChar",
"modifiers": "@VisibleForTesting static",
"parameters": "(Configuration conf, String confKey, char charValue)",
"return": "void",
"signature": "void setChar(Configuration conf, String confKey, char charValue)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.getCharacter(Configuration conf, String confKey)",
"constructor": false,
"full_signature": "@VisibleForTesting static Character getCharacter(Configuration conf, String confKey)",
"identifier": "getCharacter",
"modifiers": "@VisibleForTesting static",
"parameters": "(Configuration conf, String confKey)",
"return": "Character",
"signature": "Character getCharacter(Configuration conf, String confKey)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.getOutputPath(Path outputdir, String tableName)",
"constructor": false,
"full_signature": "public static Path getOutputPath(Path outputdir, String tableName)",
"identifier": "getOutputPath",
"modifiers": "public static",
"parameters": "(Path outputdir, String tableName)",
"return": "Path",
"signature": "Path getOutputPath(Path outputdir, String tableName)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static void initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding) {\n setChar(conf, CsvToKeyValueMapper.FIELD_DELIMITER_CONFKEY, fieldDelimiter);\n setChar(conf, CsvToKeyValueMapper.QUOTE_CHAR_CONFKEY, quoteChar);\n setChar(conf, CsvToKeyValueMapper.ESCAPE_CHAR_CONFKEY, escapeChar);\n if (arrayDelimiter != null) {\n conf.set(CsvToKeyValueMapper.ARRAY_DELIMITER_CONFKEY, arrayDelimiter);\n }\n if(binaryEncoding!=null){\n conf.set(QueryServices.UPLOAD_BINARY_DATA_TYPE_ENCODING, binaryEncoding);\n }\n }",
"class_method_signature": "CsvBulkImportUtil.initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"constructor": false,
"full_signature": "public static void initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"identifier": "initCsvImportJob",
"invocations": [
"setChar",
"setChar",
"setChar",
"set",
"set"
],
"modifiers": "public static",
"parameters": "(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"return": "void",
"signature": "void initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_56 | {
"fields": [
{
"declarator": "ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT)",
"modifier": "private static final",
"original_string": "private static final ColumnInfo ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT);",
"type": "ColumnInfo",
"var_name": "ID_COLUMN"
},
{
"declarator": "NAME_COLUMN = new ColumnInfo(\"NAME\", Types.VARCHAR)",
"modifier": "private static final",
"original_string": "private static final ColumnInfo NAME_COLUMN = new ColumnInfo(\"NAME\", Types.VARCHAR);",
"type": "ColumnInfo",
"var_name": "NAME_COLUMN"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/QueryUtilTest.java",
"identifier": "QueryUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected=IllegalArgumentException.class)\n public void testConstructUpsertStatement_ColumnInfos_NoColumns() {\n QueryUtil.constructUpsertStatement(\"MYTAB\", ImmutableList.<ColumnInfo>of());\n }",
"class_method_signature": "QueryUtilTest.testConstructUpsertStatement_ColumnInfos_NoColumns()",
"constructor": false,
"full_signature": "@Test(expected=IllegalArgumentException.class) public void testConstructUpsertStatement_ColumnInfos_NoColumns()",
"identifier": "testConstructUpsertStatement_ColumnInfos_NoColumns",
"invocations": [
"constructUpsertStatement",
"of"
],
"modifiers": "@Test(expected=IllegalArgumentException.class) public",
"parameters": "()",
"return": "void",
"signature": "void testConstructUpsertStatement_ColumnInfos_NoColumns()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(QueryUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryUtil.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "COLUMN_FAMILY_POSITION = 25",
"modifier": "public static final",
"original_string": "public static final int COLUMN_FAMILY_POSITION = 25;",
"type": "int",
"var_name": "COLUMN_FAMILY_POSITION"
},
{
"declarator": "COLUMN_NAME_POSITION = 4",
"modifier": "public static final",
"original_string": "public static final int COLUMN_NAME_POSITION = 4;",
"type": "int",
"var_name": "COLUMN_NAME_POSITION"
},
{
"declarator": "DATA_TYPE_POSITION = 5",
"modifier": "public static final",
"original_string": "public static final int DATA_TYPE_POSITION = 5;",
"type": "int",
"var_name": "DATA_TYPE_POSITION"
},
{
"declarator": "DATA_TYPE_NAME_POSITION = 6",
"modifier": "public static final",
"original_string": "public static final int DATA_TYPE_NAME_POSITION = 6;",
"type": "int",
"var_name": "DATA_TYPE_NAME_POSITION"
},
{
"declarator": "IS_SERVER_CONNECTION = \"IS_SERVER_CONNECTION\"",
"modifier": "public static final",
"original_string": "public static final String IS_SERVER_CONNECTION = \"IS_SERVER_CONNECTION\";",
"type": "String",
"var_name": "IS_SERVER_CONNECTION"
},
{
"declarator": "SELECT = \"SELECT\"",
"modifier": "private static final",
"original_string": "private static final String SELECT = \"SELECT\";",
"type": "String",
"var_name": "SELECT"
},
{
"declarator": "FROM = \"FROM\"",
"modifier": "private static final",
"original_string": "private static final String FROM = \"FROM\";",
"type": "String",
"var_name": "FROM"
},
{
"declarator": "WHERE = \"WHERE\"",
"modifier": "private static final",
"original_string": "private static final String WHERE = \"WHERE\";",
"type": "String",
"var_name": "WHERE"
},
{
"declarator": "AND = \"AND\"",
"modifier": "private static final",
"original_string": "private static final String AND = \"AND\";",
"type": "String",
"var_name": "AND"
},
{
"declarator": "CompareOpString = new String[CompareOp.values().length]",
"modifier": "private static final",
"original_string": "private static final String[] CompareOpString = new String[CompareOp.values().length];",
"type": "String[]",
"var_name": "CompareOpString"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java",
"identifier": "QueryUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "QueryUtil.toSQL(CompareOp op)",
"constructor": false,
"full_signature": "public static String toSQL(CompareOp op)",
"identifier": "toSQL",
"modifiers": "public static",
"parameters": "(CompareOp op)",
"return": "String",
"signature": "String toSQL(CompareOp op)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.QueryUtil()",
"constructor": true,
"full_signature": "private QueryUtil()",
"identifier": "QueryUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " QueryUtil()",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"constructor": false,
"full_signature": "public static String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"identifier": "constructUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, List<ColumnInfo> columnInfos)",
"return": "String",
"signature": "String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"constructor": false,
"full_signature": "public static String constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"identifier": "constructUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, List<String> columns, Hint hint)",
"return": "String",
"signature": "String constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructGenericUpsertStatement(String tableName, int numColumns)",
"constructor": false,
"full_signature": "public static String constructGenericUpsertStatement(String tableName, int numColumns)",
"identifier": "constructGenericUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, int numColumns)",
"return": "String",
"signature": "String constructGenericUpsertStatement(String tableName, int numColumns)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"constructor": false,
"full_signature": "public static String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"identifier": "constructSelectStatement",
"modifiers": "public static",
"parameters": "(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"return": "String",
"signature": "String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"constructor": false,
"full_signature": "public static String constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"identifier": "constructSelectStatement",
"modifiers": "public static",
"parameters": "(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"return": "String",
"signature": "String constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructParameterizedInClause(int numWhereCols, int numBatches)",
"constructor": false,
"full_signature": "public static String constructParameterizedInClause(int numWhereCols, int numBatches)",
"identifier": "constructParameterizedInClause",
"modifiers": "public static",
"parameters": "(int numWhereCols, int numBatches)",
"return": "String",
"signature": "String constructParameterizedInClause(int numWhereCols, int numBatches)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum)",
"return": "String",
"signature": "String getUrl(String zkQuorum)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int clientPort)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int clientPort)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int clientPort)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int clientPort)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int port, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int port, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int port, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int port, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, Integer port, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, Integer port, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, Integer port, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, Integer port, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, Integer port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "private static String getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"identifier": "getUrlInternal",
"modifiers": "private static",
"parameters": "(String zkQuorum, Integer port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getExplainPlan(ResultSet rs)",
"constructor": false,
"full_signature": "public static String getExplainPlan(ResultSet rs)",
"identifier": "getExplainPlan",
"modifiers": "public static",
"parameters": "(ResultSet rs)",
"return": "String",
"signature": "String getExplainPlan(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getExplainPlan(ResultIterator iterator)",
"constructor": false,
"full_signature": "public static String getExplainPlan(ResultIterator iterator)",
"identifier": "getExplainPlan",
"modifiers": "public static",
"parameters": "(ResultIterator iterator)",
"return": "String",
"signature": "String getExplainPlan(ResultIterator iterator)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServer(Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServer(Configuration conf)",
"identifier": "getConnectionOnServer",
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "Connection",
"signature": "Connection getConnectionOnServer(Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.setServerConnection(Properties props)",
"constructor": false,
"full_signature": "public static void setServerConnection(Properties props)",
"identifier": "setServerConnection",
"modifiers": "public static",
"parameters": "(Properties props)",
"return": "void",
"signature": "void setServerConnection(Properties props)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.isServerConnection(ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static boolean isServerConnection(ReadOnlyProps props)",
"identifier": "isServerConnection",
"modifiers": "public static",
"parameters": "(ReadOnlyProps props)",
"return": "boolean",
"signature": "boolean isServerConnection(ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServer(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServer(Properties props, Configuration conf)",
"identifier": "getConnectionOnServer",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf)",
"return": "Connection",
"signature": "Connection getConnectionOnServer(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"identifier": "getConnectionOnServerWithCustomUrl",
"modifiers": "public static",
"parameters": "(Properties props, String principal)",
"return": "Connection",
"signature": "Connection getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnection(Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnection(Configuration conf)",
"identifier": "getConnection",
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "Connection",
"signature": "Connection getConnection(Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnection(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static Connection getConnection(Properties props, Configuration conf)",
"identifier": "getConnection",
"modifiers": "private static",
"parameters": "(Properties props, Configuration conf)",
"return": "Connection",
"signature": "Connection getConnection(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionUrl(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "public static String getConnectionUrl(Properties props, Configuration conf)",
"identifier": "getConnectionUrl",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf)",
"return": "String",
"signature": "String getConnectionUrl(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionUrl(Properties props, Configuration conf, String principal)",
"constructor": false,
"full_signature": "public static String getConnectionUrl(Properties props, Configuration conf, String principal)",
"identifier": "getConnectionUrl",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf, String principal)",
"return": "String",
"signature": "String getConnectionUrl(Properties props, Configuration conf, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getInt(String key, int defaultValue, Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static int getInt(String key, int defaultValue, Properties props, Configuration conf)",
"identifier": "getInt",
"modifiers": "private static",
"parameters": "(String key, int defaultValue, Properties props, Configuration conf)",
"return": "int",
"signature": "int getInt(String key, int defaultValue, Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getString(String key, String defaultValue, Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static String getString(String key, String defaultValue, Properties props, Configuration conf)",
"identifier": "getString",
"modifiers": "private static",
"parameters": "(String key, String defaultValue, Properties props, Configuration conf)",
"return": "String",
"signature": "String getString(String key, String defaultValue, Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getViewStatement(String schemaName, String tableName, String where)",
"constructor": false,
"full_signature": "public static String getViewStatement(String schemaName, String tableName, String where)",
"identifier": "getViewStatement",
"modifiers": "public static",
"parameters": "(String schemaName, String tableName, String where)",
"return": "String",
"signature": "String getViewStatement(String schemaName, String tableName, String where)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getOffsetLimit(Integer limit, Integer offset)",
"constructor": false,
"full_signature": "public static Integer getOffsetLimit(Integer limit, Integer offset)",
"identifier": "getOffsetLimit",
"modifiers": "public static",
"parameters": "(Integer limit, Integer offset)",
"return": "Integer",
"signature": "Integer getOffsetLimit(Integer limit, Integer offset)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getRemainingOffset(Tuple offsetTuple)",
"constructor": false,
"full_signature": "public static Integer getRemainingOffset(Tuple offsetTuple)",
"identifier": "getRemainingOffset",
"modifiers": "public static",
"parameters": "(Tuple offsetTuple)",
"return": "Integer",
"signature": "Integer getRemainingOffset(Tuple offsetTuple)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"constructor": false,
"full_signature": "public static String getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"identifier": "getViewPartitionClause",
"modifiers": "public static",
"parameters": "(String partitionColumnName, long autoPartitionNum)",
"return": "String",
"signature": "String getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionForQueryLog(Configuration config)",
"constructor": false,
"full_signature": "public static Connection getConnectionForQueryLog(Configuration config)",
"identifier": "getConnectionForQueryLog",
"modifiers": "public static",
"parameters": "(Configuration config)",
"return": "Connection",
"signature": "Connection getConnectionForQueryLog(Configuration config)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getCatalogsStmt(PhoenixConnection connection)",
"constructor": false,
"full_signature": "public static PreparedStatement getCatalogsStmt(PhoenixConnection connection)",
"identifier": "getCatalogsStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection)",
"return": "PreparedStatement",
"signature": "PreparedStatement getCatalogsStmt(PhoenixConnection connection)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"constructor": false,
"full_signature": "public static PreparedStatement getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"identifier": "getSchemasStmt",
"modifiers": "public static",
"parameters": "(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"return": "PreparedStatement",
"signature": "PreparedStatement getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"constructor": false,
"full_signature": "public static PreparedStatement getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"identifier": "getSuperTablesStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"return": "PreparedStatement",
"signature": "PreparedStatement getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"constructor": false,
"full_signature": "public static PreparedStatement getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"identifier": "getIndexInfoStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"return": "PreparedStatement",
"signature": "PreparedStatement getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"constructor": false,
"full_signature": "public static PreparedStatement getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"identifier": "getTablesStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"return": "PreparedStatement",
"signature": "PreparedStatement getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"constructor": false,
"full_signature": "public static void addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"identifier": "addTenantIdFilter",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"return": "void",
"signature": "void addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.appendConjunction(StringBuilder buf)",
"constructor": false,
"full_signature": "private static void appendConjunction(StringBuilder buf)",
"identifier": "appendConjunction",
"modifiers": "private static",
"parameters": "(StringBuilder buf)",
"return": "void",
"signature": "void appendConjunction(StringBuilder buf)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos) {\n\n if (columnInfos.isEmpty()) {\n throw new IllegalArgumentException(\"At least one column must be provided for upserts\");\n }\n\n final List<String> columnNames = Lists.transform(columnInfos, new Function<ColumnInfo,String>() {\n @Override\n public String apply(ColumnInfo columnInfo) {\n return columnInfo.getColumnName();\n }\n });\n return constructUpsertStatement(tableName, columnNames, null);\n\n }",
"class_method_signature": "QueryUtil.constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"constructor": false,
"full_signature": "public static String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"identifier": "constructUpsertStatement",
"invocations": [
"isEmpty",
"transform",
"getColumnName",
"constructUpsertStatement"
],
"modifiers": "public static",
"parameters": "(String tableName, List<ColumnInfo> columnInfos)",
"return": "String",
"signature": "String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_40 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java",
"identifier": "JDBCUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRemoveProperty() {\n assertEquals(\"localhost;\", JDBCUtil.removeProperty(\"localhost;TenantId=abc;\", TENANT_ID_ATTRIB));\n assertEquals(\"localhost;foo=bar\", JDBCUtil.removeProperty(\"localhost;TenantId=abc;foo=bar\", TENANT_ID_ATTRIB));\n assertEquals(\"localhost;TenantId=abc\", JDBCUtil.removeProperty(\"localhost;TenantId=abc;foo=bar\", \"foo\"));\n assertEquals(\"localhost;TenantId=abc;foo=bar\", JDBCUtil.removeProperty(\"localhost;TenantId=abc;foo=bar\", \"bar\"));\n }",
"class_method_signature": "JDBCUtilTest.testRemoveProperty()",
"constructor": false,
"full_signature": "@Test public void testRemoveProperty()",
"identifier": "testRemoveProperty",
"invocations": [
"assertEquals",
"removeProperty",
"assertEquals",
"removeProperty",
"assertEquals",
"removeProperty",
"assertEquals",
"removeProperty"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testRemoveProperty()",
"testcase": true
} | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java",
"identifier": "JDBCUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "JDBCUtil.JDBCUtil()",
"constructor": true,
"full_signature": "private JDBCUtil()",
"identifier": "JDBCUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " JDBCUtil()",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.findProperty(String url, Properties info, String propName)",
"constructor": false,
"full_signature": "public static String findProperty(String url, Properties info, String propName)",
"identifier": "findProperty",
"modifiers": "public static",
"parameters": "(String url, Properties info, String propName)",
"return": "String",
"signature": "String findProperty(String url, Properties info, String propName)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.removeProperty(String url, String propName)",
"constructor": false,
"full_signature": "public static String removeProperty(String url, String propName)",
"identifier": "removeProperty",
"modifiers": "public static",
"parameters": "(String url, String propName)",
"return": "String",
"signature": "String removeProperty(String url, String propName)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getCombinedConnectionProperties(String url, Properties info)",
"constructor": false,
"full_signature": "private static Map<String, String> getCombinedConnectionProperties(String url, Properties info)",
"identifier": "getCombinedConnectionProperties",
"modifiers": "private static",
"parameters": "(String url, Properties info)",
"return": "Map<String, String>",
"signature": "Map<String, String> getCombinedConnectionProperties(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getAnnotations(@NonNull String url, @NonNull Properties info)",
"constructor": false,
"full_signature": "public static Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info)",
"identifier": "getAnnotations",
"modifiers": "public static",
"parameters": "(@NonNull String url, @NonNull Properties info)",
"return": "Map<String, String>",
"signature": "Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getCurrentSCN(String url, Properties info)",
"constructor": false,
"full_signature": "public static Long getCurrentSCN(String url, Properties info)",
"identifier": "getCurrentSCN",
"modifiers": "public static",
"parameters": "(String url, Properties info)",
"return": "Long",
"signature": "Long getCurrentSCN(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getBuildIndexSCN(String url, Properties info)",
"constructor": false,
"full_signature": "public static Long getBuildIndexSCN(String url, Properties info)",
"identifier": "getBuildIndexSCN",
"modifiers": "public static",
"parameters": "(String url, Properties info)",
"return": "Long",
"signature": "Long getBuildIndexSCN(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static int getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"identifier": "getMutateBatchSize",
"modifiers": "public static",
"parameters": "(String url, Properties info, ReadOnlyProps props)",
"return": "int",
"signature": "int getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"identifier": "getMutateBatchSizeBytes",
"modifiers": "public static",
"parameters": "(String url, Properties info, ReadOnlyProps props)",
"return": "long",
"signature": "long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getTenantId(String url, Properties info)",
"constructor": false,
"full_signature": "public static @Nullable PName getTenantId(String url, Properties info)",
"identifier": "getTenantId",
"modifiers": "public static @Nullable",
"parameters": "(String url, Properties info)",
"return": "PName",
"signature": "PName getTenantId(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getAutoCommit(String url, Properties info, boolean defaultValue)",
"constructor": false,
"full_signature": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"identifier": "getAutoCommit",
"modifiers": "public static",
"parameters": "(String url, Properties info, boolean defaultValue)",
"return": "boolean",
"signature": "boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getConsistencyLevel(String url, Properties info, String defaultValue)",
"constructor": false,
"full_signature": "public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"identifier": "getConsistencyLevel",
"modifiers": "public static",
"parameters": "(String url, Properties info, String defaultValue)",
"return": "Consistency",
"signature": "Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"constructor": false,
"full_signature": "public static boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"identifier": "isCollectingRequestLevelMetricsEnabled",
"modifiers": "public static",
"parameters": "(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"return": "boolean",
"signature": "boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getSchema(String url, Properties info, String defaultValue)",
"constructor": false,
"full_signature": "public static String getSchema(String url, Properties info, String defaultValue)",
"identifier": "getSchema",
"modifiers": "public static",
"parameters": "(String url, Properties info, String defaultValue)",
"return": "String",
"signature": "String getSchema(String url, Properties info, String defaultValue)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String removeProperty(String url, String propName) {\n String urlPropName = PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR + propName.toUpperCase() + \"=\";\n String upperCaseURL = url.toUpperCase();\n int begIndex = upperCaseURL.indexOf(urlPropName);\n if (begIndex >= 0) {\n int endIndex =\n upperCaseURL.indexOf(PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR, begIndex\n + urlPropName.length());\n if (endIndex < 0) {\n endIndex = url.length();\n }\n String prefix = url.substring(0, begIndex);\n String suffix = url.substring(endIndex, url.length());\n return prefix + suffix;\n } else {\n return url;\n }\n }",
"class_method_signature": "JDBCUtil.removeProperty(String url, String propName)",
"constructor": false,
"full_signature": "public static String removeProperty(String url, String propName)",
"identifier": "removeProperty",
"invocations": [
"toUpperCase",
"toUpperCase",
"indexOf",
"indexOf",
"length",
"length",
"substring",
"substring",
"length"
],
"modifiers": "public static",
"parameters": "(String url, String propName)",
"return": "String",
"signature": "String removeProperty(String url, String propName)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_155 | {
"fields": [
{
"declarator": "TABLE_NAME = TableName.create(null,\"TABLE1\")",
"modifier": "private static",
"original_string": "private static TableName TABLE_NAME = TableName.create(null,\"TABLE1\");",
"type": "TableName",
"var_name": "TABLE_NAME"
},
{
"declarator": "offsetCompiler",
"modifier": "",
"original_string": "RVCOffsetCompiler offsetCompiler;",
"type": "RVCOffsetCompiler",
"var_name": "offsetCompiler"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/compile/RVCOffsetCompilerTest.java",
"identifier": "RVCOffsetCompilerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void buildListOfColumnParseNodesTestIndex() throws Exception {\n List<ParseNode> children = new ArrayList<>();\n ColumnParseNode col1 = new ColumnParseNode(TABLE_NAME,\"col1\");\n ColumnParseNode col2 = new ColumnParseNode(TABLE_NAME,\"col2\");\n\n ParseNodeFactory factory = new ParseNodeFactory();\n\n children.add(factory.cast(col1, PDecimal.INSTANCE, null, null,false));\n children.add(factory.cast(col2, PDecimal.INSTANCE, null, null,false));\n\n RowValueConstructorParseNode rvc = new RowValueConstructorParseNode(children);\n\n List<ColumnParseNode>\n result =\n offsetCompiler.buildListOfColumnParseNodes(rvc, true);\n\n assertEquals(2,result.size());\n assertEquals(col1,result.get(0));\n assertEquals(col2,result.get(1));\n }",
"class_method_signature": "RVCOffsetCompilerTest.buildListOfColumnParseNodesTestIndex()",
"constructor": false,
"full_signature": "@Test public void buildListOfColumnParseNodesTestIndex()",
"identifier": "buildListOfColumnParseNodesTestIndex",
"invocations": [
"add",
"cast",
"add",
"cast",
"buildListOfColumnParseNodes",
"assertEquals",
"size",
"assertEquals",
"get",
"assertEquals",
"get"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void buildListOfColumnParseNodesTestIndex()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class)",
"modifier": "private final static",
"original_string": "private final static Logger LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "INSTANCE = new RVCOffsetCompiler()",
"modifier": "private final static",
"original_string": "private final static RVCOffsetCompiler INSTANCE = new RVCOffsetCompiler();",
"type": "RVCOffsetCompiler",
"var_name": "INSTANCE"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/compile/RVCOffsetCompiler.java",
"identifier": "RVCOffsetCompiler",
"interfaces": "",
"methods": [
{
"class_method_signature": "RVCOffsetCompiler.RVCOffsetCompiler()",
"constructor": true,
"full_signature": "private RVCOffsetCompiler()",
"identifier": "RVCOffsetCompiler",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " RVCOffsetCompiler()",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.getInstance()",
"constructor": false,
"full_signature": "public static RVCOffsetCompiler getInstance()",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "()",
"return": "RVCOffsetCompiler",
"signature": "RVCOffsetCompiler getInstance()",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"constructor": false,
"full_signature": "public CompiledOffset getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"identifier": "getRVCOffset",
"modifiers": "public",
"parameters": "(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"return": "CompiledOffset",
"signature": "CompiledOffset getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"identifier": "buildListOfRowKeyColumnExpressions",
"modifiers": "@VisibleForTesting",
"parameters": "(\n Expression whereExpression, boolean isIndex)",
"return": "RowKeyColumnExpressionOutput",
"signature": "RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"identifier": "buildListOfColumnParseNodes",
"modifiers": "@VisibleForTesting",
"parameters": "(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"return": "List<ColumnParseNode>",
"signature": "List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)\n throws RowValueConstructorOffsetNotCoercibleException {\n List<ColumnParseNode> nodes = new ArrayList<ColumnParseNode>();\n for (ParseNode node : rvcColumnsParseNode.getChildren()) {\n // Note that since we store indexes in variable length form there may be casts from fixed types to\n // variable length\n if (isIndex) {\n if (node instanceof CastParseNode) {\n // Cast today has 1 child\n node = node.getChildren().get(0);\n }\n }\n\n if (!(node instanceof ColumnParseNode)) {\n throw new RowValueConstructorOffsetNotCoercibleException(\n \"RVC Offset must specify the tables PKs.\");\n } else {\n nodes.add((ColumnParseNode) node);\n }\n }\n return nodes;\n }",
"class_method_signature": "RVCOffsetCompiler.buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"identifier": "buildListOfColumnParseNodes",
"invocations": [
"getChildren",
"get",
"getChildren",
"add"
],
"modifiers": "@VisibleForTesting",
"parameters": "(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"return": "List<ColumnParseNode>",
"signature": "List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_17 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/PhoenixRuntimeTest.java",
"identifier": "PhoenixRuntimeTest",
"interfaces": "",
"superclass": "extends BaseConnectionlessQueryTest"
} | {
"body": "@Test\n public void testGetWallClockTimeFromCellTimeStamp() {\n long ts = System.currentTimeMillis();\n assertEquals(ts, PhoenixRuntime.getWallClockTimeFromCellTimeStamp(ts));\n long nanoTs = TransactionUtil.convertToNanoseconds(ts);\n assertEquals(ts, PhoenixRuntime.getWallClockTimeFromCellTimeStamp(nanoTs));\n long skewedTs = ts + QueryConstants.MILLIS_IN_DAY; // skew of a day\n // Even with a day of skew, we won't consider the ts a nanos timestamp\n assertEquals(skewedTs, PhoenixRuntime.getWallClockTimeFromCellTimeStamp(skewedTs));\n }",
"class_method_signature": "PhoenixRuntimeTest.testGetWallClockTimeFromCellTimeStamp()",
"constructor": false,
"full_signature": "@Test public void testGetWallClockTimeFromCellTimeStamp()",
"identifier": "testGetWallClockTimeFromCellTimeStamp",
"invocations": [
"currentTimeMillis",
"assertEquals",
"getWallClockTimeFromCellTimeStamp",
"convertToNanoseconds",
"assertEquals",
"getWallClockTimeFromCellTimeStamp",
"assertEquals",
"getWallClockTimeFromCellTimeStamp"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetWallClockTimeFromCellTimeStamp()",
"testcase": true
} | {
"fields": [
{
"declarator": "JDBC_PROTOCOL = \"jdbc:phoenix\"",
"modifier": "public final static",
"original_string": "public final static String JDBC_PROTOCOL = \"jdbc:phoenix\";",
"type": "String",
"var_name": "JDBC_PROTOCOL"
},
{
"declarator": "JDBC_THIN_PROTOCOL = \"jdbc:phoenix:thin\"",
"modifier": "public final static",
"original_string": "public final static String JDBC_THIN_PROTOCOL = \"jdbc:phoenix:thin\";",
"type": "String",
"var_name": "JDBC_THIN_PROTOCOL"
},
{
"declarator": "JDBC_PROTOCOL_TERMINATOR = ';'",
"modifier": "public final static",
"original_string": "public final static char JDBC_PROTOCOL_TERMINATOR = ';';",
"type": "char",
"var_name": "JDBC_PROTOCOL_TERMINATOR"
},
{
"declarator": "JDBC_PROTOCOL_SEPARATOR = ':'",
"modifier": "public final static",
"original_string": "public final static char JDBC_PROTOCOL_SEPARATOR = ':';",
"type": "char",
"var_name": "JDBC_PROTOCOL_SEPARATOR"
},
{
"declarator": "EMBEDDED_JDBC_PROTOCOL = PhoenixRuntime.JDBC_PROTOCOL + PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR",
"modifier": "@Deprecated\n public final static",
"original_string": "@Deprecated\n public final static String EMBEDDED_JDBC_PROTOCOL = PhoenixRuntime.JDBC_PROTOCOL + PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR;",
"type": "String",
"var_name": "EMBEDDED_JDBC_PROTOCOL"
},
{
"declarator": "CURRENT_SCN_ATTRIB = \"CurrentSCN\"",
"modifier": "public static final",
"original_string": "public static final String CURRENT_SCN_ATTRIB = \"CurrentSCN\";",
"type": "String",
"var_name": "CURRENT_SCN_ATTRIB"
},
{
"declarator": "BUILD_INDEX_AT_ATTRIB = \"BuildIndexAt\"",
"modifier": "public static final",
"original_string": "public static final String BUILD_INDEX_AT_ATTRIB = \"BuildIndexAt\";",
"type": "String",
"var_name": "BUILD_INDEX_AT_ATTRIB"
},
{
"declarator": "TENANT_ID_ATTRIB = \"TenantId\"",
"modifier": "public static final",
"original_string": "public static final String TENANT_ID_ATTRIB = \"TenantId\";",
"type": "String",
"var_name": "TENANT_ID_ATTRIB"
},
{
"declarator": "NO_UPGRADE_ATTRIB = \"NoUpgrade\"",
"modifier": "public static final",
"original_string": "public static final String NO_UPGRADE_ATTRIB = \"NoUpgrade\";",
"type": "String",
"var_name": "NO_UPGRADE_ATTRIB"
},
{
"declarator": "UPSERT_BATCH_SIZE_ATTRIB = \"UpsertBatchSize\"",
"modifier": "public final static",
"original_string": "public final static String UPSERT_BATCH_SIZE_ATTRIB = \"UpsertBatchSize\";",
"type": "String",
"var_name": "UPSERT_BATCH_SIZE_ATTRIB"
},
{
"declarator": "UPSERT_BATCH_SIZE_BYTES_ATTRIB = \"UpsertBatchSizeBytes\"",
"modifier": "public final static",
"original_string": "public final static String UPSERT_BATCH_SIZE_BYTES_ATTRIB = \"UpsertBatchSizeBytes\";",
"type": "String",
"var_name": "UPSERT_BATCH_SIZE_BYTES_ATTRIB"
},
{
"declarator": "AUTO_COMMIT_ATTRIB = \"AutoCommit\"",
"modifier": "public static final",
"original_string": "public static final String AUTO_COMMIT_ATTRIB = \"AutoCommit\";",
"type": "String",
"var_name": "AUTO_COMMIT_ATTRIB"
},
{
"declarator": "CONSISTENCY_ATTRIB = \"Consistency\"",
"modifier": "public static final",
"original_string": "public static final String CONSISTENCY_ATTRIB = \"Consistency\";",
"type": "String",
"var_name": "CONSISTENCY_ATTRIB"
},
{
"declarator": "REQUEST_METRIC_ATTRIB = \"RequestMetric\"",
"modifier": "public static final",
"original_string": "public static final String REQUEST_METRIC_ATTRIB = \"RequestMetric\";",
"type": "String",
"var_name": "REQUEST_METRIC_ATTRIB"
},
{
"declarator": "EXPLAIN_PLAN_ESTIMATED_BYTES_READ_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_BYTES_ESTIMATE_COLUMN_ALIAS",
"modifier": "public static final",
"original_string": "public static final String EXPLAIN_PLAN_ESTIMATED_BYTES_READ_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_BYTES_ESTIMATE_COLUMN_ALIAS;",
"type": "String",
"var_name": "EXPLAIN_PLAN_ESTIMATED_BYTES_READ_COLUMN"
},
{
"declarator": "EXPLAIN_PLAN_ESTIMATED_ROWS_READ_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_ROWS_COLUMN_ALIAS",
"modifier": "public static final",
"original_string": "public static final String EXPLAIN_PLAN_ESTIMATED_ROWS_READ_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_ROWS_COLUMN_ALIAS;",
"type": "String",
"var_name": "EXPLAIN_PLAN_ESTIMATED_ROWS_READ_COLUMN"
},
{
"declarator": "EXPLAIN_PLAN_ESTIMATE_INFO_TS_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_ESTIMATE_INFO_TS_COLUMN_ALIAS",
"modifier": "public static final",
"original_string": "public static final String EXPLAIN_PLAN_ESTIMATE_INFO_TS_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_ESTIMATE_INFO_TS_COLUMN_ALIAS;",
"type": "String",
"var_name": "EXPLAIN_PLAN_ESTIMATE_INFO_TS_COLUMN"
},
{
"declarator": "CONNECTION_PROPERTIES = {\n CURRENT_SCN_ATTRIB,\n TENANT_ID_ATTRIB,\n UPSERT_BATCH_SIZE_ATTRIB,\n AUTO_COMMIT_ATTRIB,\n CONSISTENCY_ATTRIB,\n REQUEST_METRIC_ATTRIB,\n }",
"modifier": "public final static",
"original_string": "public final static String[] CONNECTION_PROPERTIES = {\n CURRENT_SCN_ATTRIB,\n TENANT_ID_ATTRIB,\n UPSERT_BATCH_SIZE_ATTRIB,\n AUTO_COMMIT_ATTRIB,\n CONSISTENCY_ATTRIB,\n REQUEST_METRIC_ATTRIB,\n };",
"type": "String[]",
"var_name": "CONNECTION_PROPERTIES"
},
{
"declarator": "CONNECTIONLESS = \"none\"",
"modifier": "public final static",
"original_string": "public final static String CONNECTIONLESS = \"none\";",
"type": "String",
"var_name": "CONNECTIONLESS"
},
{
"declarator": "ANNOTATION_ATTRIB_PREFIX = \"phoenix.annotation.\"",
"modifier": "public static final",
"original_string": "public static final String ANNOTATION_ATTRIB_PREFIX = \"phoenix.annotation.\";",
"type": "String",
"var_name": "ANNOTATION_ATTRIB_PREFIX"
},
{
"declarator": "HEADER_IN_LINE = \"in-line\"",
"modifier": "private static final",
"original_string": "private static final String HEADER_IN_LINE = \"in-line\";",
"type": "String",
"var_name": "HEADER_IN_LINE"
},
{
"declarator": "SQL_FILE_EXT = \".sql\"",
"modifier": "private static final",
"original_string": "private static final String SQL_FILE_EXT = \".sql\";",
"type": "String",
"var_name": "SQL_FILE_EXT"
},
{
"declarator": "CSV_FILE_EXT = \".csv\"",
"modifier": "private static final",
"original_string": "private static final String CSV_FILE_EXT = \".csv\";",
"type": "String",
"var_name": "CSV_FILE_EXT"
},
{
"declarator": "PHOENIX_TEST_DRIVER_URL_PARAM = \"test=true\"",
"modifier": "public static final",
"original_string": "public static final String PHOENIX_TEST_DRIVER_URL_PARAM = \"test=true\";",
"type": "String",
"var_name": "PHOENIX_TEST_DRIVER_URL_PARAM"
},
{
"declarator": "SCHEMA_ATTRIB = \"schema\"",
"modifier": "public static final",
"original_string": "public static final String SCHEMA_ATTRIB = \"schema\";",
"type": "String",
"var_name": "SCHEMA_ATTRIB"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixRuntime.java",
"identifier": "PhoenixRuntime",
"interfaces": "",
"methods": [
{
"class_method_signature": "PhoenixRuntime.main(String [] args)",
"constructor": false,
"full_signature": "public static void main(String [] args)",
"identifier": "main",
"modifiers": "public static",
"parameters": "(String [] args)",
"return": "void",
"signature": "void main(String [] args)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.PhoenixRuntime()",
"constructor": true,
"full_signature": "private PhoenixRuntime()",
"identifier": "PhoenixRuntime",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " PhoenixRuntime()",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.executeStatements(Connection conn, Reader reader, List<Object> binds)",
"constructor": false,
"full_signature": "public static int executeStatements(Connection conn, Reader reader, List<Object> binds)",
"identifier": "executeStatements",
"modifiers": "public static",
"parameters": "(Connection conn, Reader reader, List<Object> binds)",
"return": "int",
"signature": "int executeStatements(Connection conn, Reader reader, List<Object> binds)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getUncommittedData(Connection conn)",
"constructor": false,
"full_signature": "@Deprecated public static List<Cell> getUncommittedData(Connection conn)",
"identifier": "getUncommittedData",
"modifiers": "@Deprecated public static",
"parameters": "(Connection conn)",
"return": "List<Cell>",
"signature": "List<Cell> getUncommittedData(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getUncommittedDataIterator(Connection conn)",
"constructor": false,
"full_signature": "public static Iterator<Pair<byte[],List<Cell>>> getUncommittedDataIterator(Connection conn)",
"identifier": "getUncommittedDataIterator",
"modifiers": "public static",
"parameters": "(Connection conn)",
"return": "Iterator<Pair<byte[],List<Cell>>>",
"signature": "Iterator<Pair<byte[],List<Cell>>> getUncommittedDataIterator(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getUncommittedDataIterator(Connection conn, boolean includeMutableIndexes)",
"constructor": false,
"full_signature": "public static Iterator<Pair<byte[],List<Cell>>> getUncommittedDataIterator(Connection conn, boolean includeMutableIndexes)",
"identifier": "getUncommittedDataIterator",
"modifiers": "public static",
"parameters": "(Connection conn, boolean includeMutableIndexes)",
"return": "Iterator<Pair<byte[],List<Cell>>>",
"signature": "Iterator<Pair<byte[],List<Cell>>> getUncommittedDataIterator(Connection conn, boolean includeMutableIndexes)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getTableNoCache(Connection conn, String name)",
"constructor": false,
"full_signature": "public static PTable getTableNoCache(Connection conn, String name)",
"identifier": "getTableNoCache",
"modifiers": "public static",
"parameters": "(Connection conn, String name)",
"return": "PTable",
"signature": "PTable getTableNoCache(Connection conn, String name)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getTable(Connection conn, String name)",
"constructor": false,
"full_signature": "public static PTable getTable(Connection conn, String name)",
"identifier": "getTable",
"modifiers": "public static",
"parameters": "(Connection conn, String name)",
"return": "PTable",
"signature": "PTable getTable(Connection conn, String name)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getTable(Connection conn, String tenantId, String fullTableName)",
"constructor": false,
"full_signature": "public static PTable getTable(Connection conn, String tenantId, String fullTableName)",
"identifier": "getTable",
"modifiers": "public static",
"parameters": "(Connection conn, String tenantId, String fullTableName)",
"return": "PTable",
"signature": "PTable getTable(Connection conn, String tenantId, String fullTableName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getTable(Connection conn, @Nullable String tenantId, String fullTableName,\n @Nullable Long timestamp)",
"constructor": false,
"full_signature": "public static PTable getTable(Connection conn, @Nullable String tenantId, String fullTableName,\n @Nullable Long timestamp)",
"identifier": "getTable",
"modifiers": "public static",
"parameters": "(Connection conn, @Nullable String tenantId, String fullTableName,\n @Nullable Long timestamp)",
"return": "PTable",
"signature": "PTable getTable(Connection conn, @Nullable String tenantId, String fullTableName,\n @Nullable Long timestamp)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.generateColumnInfo(Connection conn,\n String tableName, List<String> columns)",
"constructor": false,
"full_signature": "public static List<ColumnInfo> generateColumnInfo(Connection conn,\n String tableName, List<String> columns)",
"identifier": "generateColumnInfo",
"modifiers": "public static",
"parameters": "(Connection conn,\n String tableName, List<String> columns)",
"return": "List<ColumnInfo>",
"signature": "List<ColumnInfo> generateColumnInfo(Connection conn,\n String tableName, List<String> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getColumnInfo(PTable table, String columnName)",
"constructor": false,
"full_signature": "public static ColumnInfo getColumnInfo(PTable table, String columnName)",
"identifier": "getColumnInfo",
"modifiers": "public static",
"parameters": "(PTable table, String columnName)",
"return": "ColumnInfo",
"signature": "ColumnInfo getColumnInfo(PTable table, String columnName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getColumnInfo(PColumn pColumn)",
"constructor": false,
"full_signature": "public static ColumnInfo getColumnInfo(PColumn pColumn)",
"identifier": "getColumnInfo",
"modifiers": "public static",
"parameters": "(PColumn pColumn)",
"return": "ColumnInfo",
"signature": "ColumnInfo getColumnInfo(PColumn pColumn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getOptimizedQueryPlan(PreparedStatement stmt)",
"constructor": false,
"full_signature": "public static QueryPlan getOptimizedQueryPlan(PreparedStatement stmt)",
"identifier": "getOptimizedQueryPlan",
"modifiers": "public static",
"parameters": "(PreparedStatement stmt)",
"return": "QueryPlan",
"signature": "QueryPlan getOptimizedQueryPlan(PreparedStatement stmt)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.hasOrderBy(QueryPlan plan)",
"constructor": false,
"full_signature": "public static boolean hasOrderBy(QueryPlan plan)",
"identifier": "hasOrderBy",
"modifiers": "public static",
"parameters": "(QueryPlan plan)",
"return": "boolean",
"signature": "boolean hasOrderBy(QueryPlan plan)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getLimit(QueryPlan plan)",
"constructor": false,
"full_signature": "public static int getLimit(QueryPlan plan)",
"identifier": "getLimit",
"modifiers": "public static",
"parameters": "(QueryPlan plan)",
"return": "int",
"signature": "int getLimit(QueryPlan plan)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.addQuotes(String str)",
"constructor": false,
"full_signature": "private static String addQuotes(String str)",
"identifier": "addQuotes",
"modifiers": "private static",
"parameters": "(String str)",
"return": "String",
"signature": "String addQuotes(String str)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPkColsForSql(Connection conn, QueryPlan plan)",
"constructor": false,
"full_signature": "public static List<Pair<String, String>> getPkColsForSql(Connection conn, QueryPlan plan)",
"identifier": "getPkColsForSql",
"modifiers": "public static",
"parameters": "(Connection conn, QueryPlan plan)",
"return": "List<Pair<String, String>>",
"signature": "List<Pair<String, String>> getPkColsForSql(Connection conn, QueryPlan plan)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPkColsForSql(List<Pair<String, String>> columns, QueryPlan plan, Connection conn, boolean forDataTable)",
"constructor": false,
"full_signature": "@Deprecated public static void getPkColsForSql(List<Pair<String, String>> columns, QueryPlan plan, Connection conn, boolean forDataTable)",
"identifier": "getPkColsForSql",
"modifiers": "@Deprecated public static",
"parameters": "(List<Pair<String, String>> columns, QueryPlan plan, Connection conn, boolean forDataTable)",
"return": "void",
"signature": "void getPkColsForSql(List<Pair<String, String>> columns, QueryPlan plan, Connection conn, boolean forDataTable)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPkColsDataTypesForSql(List<Pair<String, String>> columns, List<String> dataTypes, QueryPlan plan, Connection conn, boolean forDataTable)",
"constructor": false,
"full_signature": "@Deprecated public static void getPkColsDataTypesForSql(List<Pair<String, String>> columns, List<String> dataTypes, QueryPlan plan, Connection conn, boolean forDataTable)",
"identifier": "getPkColsDataTypesForSql",
"modifiers": "@Deprecated public static",
"parameters": "(List<Pair<String, String>> columns, List<String> dataTypes, QueryPlan plan, Connection conn, boolean forDataTable)",
"return": "void",
"signature": "void getPkColsDataTypesForSql(List<Pair<String, String>> columns, List<String> dataTypes, QueryPlan plan, Connection conn, boolean forDataTable)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getSqlTypeName(PColumn pCol)",
"constructor": false,
"full_signature": "public static String getSqlTypeName(PColumn pCol)",
"identifier": "getSqlTypeName",
"modifiers": "public static",
"parameters": "(PColumn pCol)",
"return": "String",
"signature": "String getSqlTypeName(PColumn pCol)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getSqlTypeName(PDataType dataType, Integer maxLength, Integer scale)",
"constructor": false,
"full_signature": "public static String getSqlTypeName(PDataType dataType, Integer maxLength, Integer scale)",
"identifier": "getSqlTypeName",
"modifiers": "public static",
"parameters": "(PDataType dataType, Integer maxLength, Integer scale)",
"return": "String",
"signature": "String getSqlTypeName(PDataType dataType, Integer maxLength, Integer scale)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getArraySqlTypeName(@Nullable Integer maxLength, @Nullable Integer scale, PDataType arrayType)",
"constructor": false,
"full_signature": "public static String getArraySqlTypeName(@Nullable Integer maxLength, @Nullable Integer scale, PDataType arrayType)",
"identifier": "getArraySqlTypeName",
"modifiers": "public static",
"parameters": "(@Nullable Integer maxLength, @Nullable Integer scale, PDataType arrayType)",
"return": "String",
"signature": "String getArraySqlTypeName(@Nullable Integer maxLength, @Nullable Integer scale, PDataType arrayType)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.appendMaxLengthAndScale(@Nullable Integer maxLength, @Nullable Integer scale, String sqlTypeName)",
"constructor": false,
"full_signature": "private static String appendMaxLengthAndScale(@Nullable Integer maxLength, @Nullable Integer scale, String sqlTypeName)",
"identifier": "appendMaxLengthAndScale",
"modifiers": "private static",
"parameters": "(@Nullable Integer maxLength, @Nullable Integer scale, String sqlTypeName)",
"return": "String",
"signature": "String appendMaxLengthAndScale(@Nullable Integer maxLength, @Nullable Integer scale, String sqlTypeName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPkColumns(PTable ptable, Connection conn, boolean forDataTable)",
"constructor": false,
"full_signature": "@Deprecated private static List<PColumn> getPkColumns(PTable ptable, Connection conn, boolean forDataTable)",
"identifier": "getPkColumns",
"modifiers": "@Deprecated private static",
"parameters": "(PTable ptable, Connection conn, boolean forDataTable)",
"return": "List<PColumn>",
"signature": "List<PColumn> getPkColumns(PTable ptable, Connection conn, boolean forDataTable)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPkColumns(PTable ptable, Connection conn)",
"constructor": false,
"full_signature": "private static List<PColumn> getPkColumns(PTable ptable, Connection conn)",
"identifier": "getPkColumns",
"modifiers": "private static",
"parameters": "(PTable ptable, Connection conn)",
"return": "List<PColumn>",
"signature": "List<PColumn> getPkColumns(PTable ptable, Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.encodeValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "@Deprecated public static byte[] encodeValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"identifier": "encodeValues",
"modifiers": "@Deprecated public static",
"parameters": "(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"return": "byte[]",
"signature": "byte[] encodeValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.decodeValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "@Deprecated public static Object[] decodeValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"identifier": "decodeValues",
"modifiers": "@Deprecated public static",
"parameters": "(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"return": "Object[]",
"signature": "Object[] decodeValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.encodeColumnValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "public static byte[] encodeColumnValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"identifier": "encodeColumnValues",
"modifiers": "public static",
"parameters": "(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"return": "byte[]",
"signature": "byte[] encodeColumnValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.decodeColumnValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "public static Object[] decodeColumnValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"identifier": "decodeColumnValues",
"modifiers": "public static",
"parameters": "(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"return": "Object[]",
"signature": "Object[] decodeColumnValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.buildKeyValueSchema(List<PColumn> columns)",
"constructor": false,
"full_signature": "public static KeyValueSchema buildKeyValueSchema(List<PColumn> columns)",
"identifier": "buildKeyValueSchema",
"modifiers": "public static",
"parameters": "(List<PColumn> columns)",
"return": "KeyValueSchema",
"signature": "KeyValueSchema buildKeyValueSchema(List<PColumn> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getMinNullableIndex(List<PColumn> columns)",
"constructor": false,
"full_signature": "private static int getMinNullableIndex(List<PColumn> columns)",
"identifier": "getMinNullableIndex",
"modifiers": "private static",
"parameters": "(List<PColumn> columns)",
"return": "int",
"signature": "int getMinNullableIndex(List<PColumn> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPColumns(PTable table, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "@Deprecated private static List<PColumn> getPColumns(PTable table, List<Pair<String, String>> columns)",
"identifier": "getPColumns",
"modifiers": "@Deprecated private static",
"parameters": "(PTable table, List<Pair<String, String>> columns)",
"return": "List<PColumn>",
"signature": "List<PColumn> getPColumns(PTable table, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPColumn(PTable table, @Nullable String familyName, String columnName)",
"constructor": false,
"full_signature": "@Deprecated private static PColumn getPColumn(PTable table, @Nullable String familyName, String columnName)",
"identifier": "getPColumn",
"modifiers": "@Deprecated private static",
"parameters": "(PTable table, @Nullable String familyName, String columnName)",
"return": "PColumn",
"signature": "PColumn getPColumn(PTable table, @Nullable String familyName, String columnName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getColumns(PTable table, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "private static List<PColumn> getColumns(PTable table, List<Pair<String, String>> columns)",
"identifier": "getColumns",
"modifiers": "private static",
"parameters": "(PTable table, List<Pair<String, String>> columns)",
"return": "List<PColumn>",
"signature": "List<PColumn> getColumns(PTable table, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getColumn(PTable table, @Nullable String familyName, String columnName)",
"constructor": false,
"full_signature": "private static PColumn getColumn(PTable table, @Nullable String familyName, String columnName)",
"identifier": "getColumn",
"modifiers": "private static",
"parameters": "(PTable table, @Nullable String familyName, String columnName)",
"return": "PColumn",
"signature": "PColumn getColumn(PTable table, @Nullable String familyName, String columnName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getTenantIdExpression(Connection conn, String fullTableName)",
"constructor": false,
"full_signature": "public static Expression getTenantIdExpression(Connection conn, String fullTableName)",
"identifier": "getTenantIdExpression",
"modifiers": "public static",
"parameters": "(Connection conn, String fullTableName)",
"return": "Expression",
"signature": "Expression getTenantIdExpression(Connection conn, String fullTableName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getFirstPKColumnExpression(Connection conn, String fullTableName)",
"constructor": false,
"full_signature": "public static Expression getFirstPKColumnExpression(Connection conn, String fullTableName)",
"identifier": "getFirstPKColumnExpression",
"modifiers": "public static",
"parameters": "(Connection conn, String fullTableName)",
"return": "Expression",
"signature": "Expression getFirstPKColumnExpression(Connection conn, String fullTableName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getFirstPKColumnExpression(PTable table)",
"constructor": false,
"full_signature": "private static Expression getFirstPKColumnExpression(PTable table)",
"identifier": "getFirstPKColumnExpression",
"modifiers": "private static",
"parameters": "(PTable table)",
"return": "Expression",
"signature": "Expression getFirstPKColumnExpression(PTable table)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getGlobalPhoenixClientMetrics()",
"constructor": false,
"full_signature": "public static Collection<GlobalMetric> getGlobalPhoenixClientMetrics()",
"identifier": "getGlobalPhoenixClientMetrics",
"modifiers": "public static",
"parameters": "()",
"return": "Collection<GlobalMetric>",
"signature": "Collection<GlobalMetric> getGlobalPhoenixClientMetrics()",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.areGlobalClientMetricsBeingCollected()",
"constructor": false,
"full_signature": "public static boolean areGlobalClientMetricsBeingCollected()",
"identifier": "areGlobalClientMetricsBeingCollected",
"modifiers": "public static",
"parameters": "()",
"return": "boolean",
"signature": "boolean areGlobalClientMetricsBeingCollected()",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.createMetricMap(Map<MetricType, Long> metricInfoMap)",
"constructor": false,
"full_signature": "private static Map<String, Long> createMetricMap(Map<MetricType, Long> metricInfoMap)",
"identifier": "createMetricMap",
"modifiers": "private static",
"parameters": "(Map<MetricType, Long> metricInfoMap)",
"return": "Map<String, Long>",
"signature": "Map<String, Long> createMetricMap(Map<MetricType, Long> metricInfoMap)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.transformMetrics(Map<String, Map<MetricType, Long>> metricMap)",
"constructor": false,
"full_signature": "private static Map<String, Map<String, Long>> transformMetrics(Map<String, Map<MetricType, Long>> metricMap)",
"identifier": "transformMetrics",
"modifiers": "private static",
"parameters": "(Map<String, Map<MetricType, Long>> metricMap)",
"return": "Map<String, Map<String, Long>>",
"signature": "Map<String, Map<String, Long>> transformMetrics(Map<String, Map<MetricType, Long>> metricMap)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getRequestReadMetricInfo(ResultSet rs)",
"constructor": false,
"full_signature": "public static Map<String, Map<MetricType, Long>> getRequestReadMetricInfo(ResultSet rs)",
"identifier": "getRequestReadMetricInfo",
"modifiers": "public static",
"parameters": "(ResultSet rs)",
"return": "Map<String, Map<MetricType, Long>>",
"signature": "Map<String, Map<MetricType, Long>> getRequestReadMetricInfo(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getRequestReadMetrics(ResultSet rs)",
"constructor": false,
"full_signature": "@Deprecated // use getRequestReadMetricInfo public static Map<String, Map<String, Long>> getRequestReadMetrics(ResultSet rs)",
"identifier": "getRequestReadMetrics",
"modifiers": "@Deprecated // use getRequestReadMetricInfo public static",
"parameters": "(ResultSet rs)",
"return": "Map<String, Map<String, Long>>",
"signature": "Map<String, Map<String, Long>> getRequestReadMetrics(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getOverAllReadRequestMetricInfo(ResultSet rs)",
"constructor": false,
"full_signature": "public static Map<MetricType, Long> getOverAllReadRequestMetricInfo(ResultSet rs)",
"identifier": "getOverAllReadRequestMetricInfo",
"modifiers": "public static",
"parameters": "(ResultSet rs)",
"return": "Map<MetricType, Long>",
"signature": "Map<MetricType, Long> getOverAllReadRequestMetricInfo(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getOverAllReadRequestMetrics(ResultSet rs)",
"constructor": false,
"full_signature": "@Deprecated // use getOverAllReadRequestMetricInfo public static Map<String, Long> getOverAllReadRequestMetrics(ResultSet rs)",
"identifier": "getOverAllReadRequestMetrics",
"modifiers": "@Deprecated // use getOverAllReadRequestMetricInfo public static",
"parameters": "(ResultSet rs)",
"return": "Map<String, Long>",
"signature": "Map<String, Long> getOverAllReadRequestMetrics(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getWriteMetricInfoForMutationsSinceLastReset(Connection conn)",
"constructor": false,
"full_signature": "public static Map<String, Map<MetricType, Long>> getWriteMetricInfoForMutationsSinceLastReset(Connection conn)",
"identifier": "getWriteMetricInfoForMutationsSinceLastReset",
"modifiers": "public static",
"parameters": "(Connection conn)",
"return": "Map<String, Map<MetricType, Long>>",
"signature": "Map<String, Map<MetricType, Long>> getWriteMetricInfoForMutationsSinceLastReset(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getWriteMetricsForMutationsSinceLastReset(Connection conn)",
"constructor": false,
"full_signature": "@Deprecated // use getWriteMetricInfoForMutationsSinceLastReset public static Map<String, Map<String, Long>> getWriteMetricsForMutationsSinceLastReset(Connection conn)",
"identifier": "getWriteMetricsForMutationsSinceLastReset",
"modifiers": "@Deprecated // use getWriteMetricInfoForMutationsSinceLastReset public static",
"parameters": "(Connection conn)",
"return": "Map<String, Map<String, Long>>",
"signature": "Map<String, Map<String, Long>> getWriteMetricsForMutationsSinceLastReset(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getReadMetricInfoForMutationsSinceLastReset(Connection conn)",
"constructor": false,
"full_signature": "public static Map<String, Map<MetricType, Long>> getReadMetricInfoForMutationsSinceLastReset(Connection conn)",
"identifier": "getReadMetricInfoForMutationsSinceLastReset",
"modifiers": "public static",
"parameters": "(Connection conn)",
"return": "Map<String, Map<MetricType, Long>>",
"signature": "Map<String, Map<MetricType, Long>> getReadMetricInfoForMutationsSinceLastReset(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getReadMetricsForMutationsSinceLastReset(Connection conn)",
"constructor": false,
"full_signature": "@Deprecated // use getReadMetricInfoForMutationsSinceLastReset public static Map<String, Map<String, Long>> getReadMetricsForMutationsSinceLastReset(Connection conn)",
"identifier": "getReadMetricsForMutationsSinceLastReset",
"modifiers": "@Deprecated // use getReadMetricInfoForMutationsSinceLastReset public static",
"parameters": "(Connection conn)",
"return": "Map<String, Map<String, Long>>",
"signature": "Map<String, Map<String, Long>> getReadMetricsForMutationsSinceLastReset(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.resetMetrics(ResultSet rs)",
"constructor": false,
"full_signature": "public static void resetMetrics(ResultSet rs)",
"identifier": "resetMetrics",
"modifiers": "public static",
"parameters": "(ResultSet rs)",
"return": "void",
"signature": "void resetMetrics(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.resetMetrics(Connection conn)",
"constructor": false,
"full_signature": "public static void resetMetrics(Connection conn)",
"identifier": "resetMetrics",
"modifiers": "public static",
"parameters": "(Connection conn)",
"return": "void",
"signature": "void resetMetrics(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getWallClockTimeFromCellTimeStamp(long tsOfCell)",
"constructor": false,
"full_signature": "public static long getWallClockTimeFromCellTimeStamp(long tsOfCell)",
"identifier": "getWallClockTimeFromCellTimeStamp",
"modifiers": "public static",
"parameters": "(long tsOfCell)",
"return": "long",
"signature": "long getWallClockTimeFromCellTimeStamp(long tsOfCell)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getCurrentScn(ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static long getCurrentScn(ReadOnlyProps props)",
"identifier": "getCurrentScn",
"modifiers": "public static",
"parameters": "(ReadOnlyProps props)",
"return": "long",
"signature": "long getCurrentScn(ReadOnlyProps props)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static long getWallClockTimeFromCellTimeStamp(long tsOfCell) {\n return TransactionUtil.isTransactionalTimestamp(tsOfCell) ? TransactionUtil.convertToMilliseconds(tsOfCell) : tsOfCell;\n }",
"class_method_signature": "PhoenixRuntime.getWallClockTimeFromCellTimeStamp(long tsOfCell)",
"constructor": false,
"full_signature": "public static long getWallClockTimeFromCellTimeStamp(long tsOfCell)",
"identifier": "getWallClockTimeFromCellTimeStamp",
"invocations": [
"isTransactionalTimestamp",
"convertToMilliseconds"
],
"modifiers": "public static",
"parameters": "(long tsOfCell)",
"return": "long",
"signature": "long getWallClockTimeFromCellTimeStamp(long tsOfCell)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_102 | {
"fields": [
{
"declarator": "bytesA = Bytes.toBytes(\"a\")",
"modifier": "",
"original_string": "byte[] bytesA = Bytes.toBytes(\"a\");",
"type": "byte[]",
"var_name": "bytesA"
},
{
"declarator": "bytesB = Bytes.toBytes(\"b\")",
"modifier": "",
"original_string": "byte[] bytesB = Bytes.toBytes(\"b\");",
"type": "byte[]",
"var_name": "bytesB"
},
{
"declarator": "bytesC = Bytes.toBytes(\"c\")",
"modifier": "",
"original_string": "byte[] bytesC = Bytes.toBytes(\"c\");",
"type": "byte[]",
"var_name": "bytesC"
},
{
"declarator": "bytesD = Bytes.toBytes(\"d\")",
"modifier": "",
"original_string": "byte[] bytesD = Bytes.toBytes(\"d\");",
"type": "byte[]",
"var_name": "bytesD"
},
{
"declarator": "bytesE = Bytes.toBytes(\"e\")",
"modifier": "",
"original_string": "byte[] bytesE = Bytes.toBytes(\"e\");",
"type": "byte[]",
"var_name": "bytesE"
},
{
"declarator": "a_b",
"modifier": "",
"original_string": "Bar a_b;",
"type": "Bar",
"var_name": "a_b"
},
{
"declarator": "b_c",
"modifier": "",
"original_string": "Bar b_c;",
"type": "Bar",
"var_name": "b_c"
},
{
"declarator": "c_d",
"modifier": "",
"original_string": "Bar c_d;",
"type": "Bar",
"var_name": "c_d"
},
{
"declarator": "d_e",
"modifier": "",
"original_string": "Bar d_e;",
"type": "Bar",
"var_name": "d_e"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/EquiDepthStreamHistogramTest.java",
"identifier": "EquiDepthStreamHistogramTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testComputeBuckets() {\n EquiDepthStreamHistogram histo = new EquiDepthStreamHistogram(3);\n histo.addValue(bytesA);\n histo.addValue(bytesB);\n histo.addValue(bytesC);\n histo.addValue(bytesD);\n histo.addValue(bytesE);\n List<Bucket> buckets = histo.computeBuckets();\n assertEquals(3, buckets.size());\n Bucket bucket = buckets.get(0);\n assertEquals(2, bucket.getCountEstimate());\n assertInBucket(bucket, bytesA);\n assertInBucket(bucket, bytesB);\n bucket = buckets.get(1);\n assertEquals(2, bucket.getCountEstimate());\n assertInBucket(bucket, bytesC);\n assertInBucket(bucket, bytesD);\n bucket = buckets.get(2);\n assertEquals(1, bucket.getCountEstimate());\n assertInBucketInclusive(bucket, bytesE);\n\n // test closestSplitIdx - total count is currently 5, idealBuckSize=2\n histo.bars.clear();\n a_b.incrementCount();\n histo.bars.add(a_b);\n Bar b_d = new Bar(bytesB, bytesD);\n b_d.incrementCount(3); // use 1/3 of this bar's count for first bucket\n histo.bars.add(b_d);\n histo.bars.add(d_e);\n buckets = histo.computeBuckets();\n bucket = buckets.get(0);\n // bound should be 1/3 of [bytesB, bytesD),\n // since we used 1/3 of b_d's count for first bucket\n byte[][] splits = Bytes.split(bytesB, bytesD, 8);\n assertArrayEquals(splits[3], bucket.getRightBoundExclusive());\n bucket = buckets.get(1);\n assertArrayEquals(splits[3], bucket.leftBoundInclusive);\n }",
"class_method_signature": "EquiDepthStreamHistogramTest.testComputeBuckets()",
"constructor": false,
"full_signature": "@Test public void testComputeBuckets()",
"identifier": "testComputeBuckets",
"invocations": [
"addValue",
"addValue",
"addValue",
"addValue",
"addValue",
"computeBuckets",
"assertEquals",
"size",
"get",
"assertEquals",
"getCountEstimate",
"assertInBucket",
"assertInBucket",
"get",
"assertEquals",
"getCountEstimate",
"assertInBucket",
"assertInBucket",
"get",
"assertEquals",
"getCountEstimate",
"assertInBucketInclusive",
"clear",
"incrementCount",
"add",
"incrementCount",
"add",
"add",
"computeBuckets",
"get",
"split",
"assertArrayEquals",
"getRightBoundExclusive",
"get",
"assertArrayEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testComputeBuckets()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(EquiDepthStreamHistogram.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EquiDepthStreamHistogram.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "MAX_COEF = 1.7",
"modifier": "private static final",
"original_string": "private static final double MAX_COEF = 1.7;",
"type": "double",
"var_name": "MAX_COEF"
},
{
"declarator": "DEFAULT_EXPANSION_FACTOR = 7",
"modifier": "private static final",
"original_string": "private static final short DEFAULT_EXPANSION_FACTOR = 7;",
"type": "short",
"var_name": "DEFAULT_EXPANSION_FACTOR"
},
{
"declarator": "numBuckets",
"modifier": "private",
"original_string": "private int numBuckets;",
"type": "int",
"var_name": "numBuckets"
},
{
"declarator": "maxBars",
"modifier": "private",
"original_string": "private int maxBars;",
"type": "int",
"var_name": "maxBars"
},
{
"declarator": "totalCount",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n long totalCount;",
"type": "long",
"var_name": "totalCount"
},
{
"declarator": "bars",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n List<Bar> bars;",
"type": "List<Bar>",
"var_name": "bars"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/EquiDepthStreamHistogram.java",
"identifier": "EquiDepthStreamHistogram",
"interfaces": "",
"methods": [
{
"class_method_signature": "EquiDepthStreamHistogram.EquiDepthStreamHistogram(int numBuckets)",
"constructor": true,
"full_signature": "public EquiDepthStreamHistogram(int numBuckets)",
"identifier": "EquiDepthStreamHistogram",
"modifiers": "public",
"parameters": "(int numBuckets)",
"return": "",
"signature": " EquiDepthStreamHistogram(int numBuckets)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.EquiDepthStreamHistogram(int numBuckets, int expansionFactor)",
"constructor": true,
"full_signature": "public EquiDepthStreamHistogram(int numBuckets, int expansionFactor)",
"identifier": "EquiDepthStreamHistogram",
"modifiers": "public",
"parameters": "(int numBuckets, int expansionFactor)",
"return": "",
"signature": " EquiDepthStreamHistogram(int numBuckets, int expansionFactor)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.addValue(byte[] value)",
"constructor": false,
"full_signature": "public void addValue(byte[] value)",
"identifier": "addValue",
"modifiers": "public",
"parameters": "(byte[] value)",
"return": "void",
"signature": "void addValue(byte[] value)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.computeBuckets()",
"constructor": false,
"full_signature": "public List<Bucket> computeBuckets()",
"identifier": "computeBuckets",
"modifiers": "public",
"parameters": "()",
"return": "List<Bucket>",
"signature": "List<Bucket> computeBuckets()",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.getTotalCount()",
"constructor": false,
"full_signature": "public long getTotalCount()",
"identifier": "getTotalCount",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long getTotalCount()",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.splitBar(Bar origBar)",
"constructor": false,
"full_signature": "@VisibleForTesting void splitBar(Bar origBar)",
"identifier": "splitBar",
"modifiers": "@VisibleForTesting",
"parameters": "(Bar origBar)",
"return": "void",
"signature": "void splitBar(Bar origBar)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.mergeBars()",
"constructor": false,
"full_signature": "@VisibleForTesting boolean mergeBars()",
"identifier": "mergeBars",
"modifiers": "@VisibleForTesting",
"parameters": "()",
"return": "boolean",
"signature": "boolean mergeBars()",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.getBar(byte[] value)",
"constructor": false,
"full_signature": "@VisibleForTesting Bar getBar(byte[] value)",
"identifier": "getBar",
"modifiers": "@VisibleForTesting",
"parameters": "(byte[] value)",
"return": "Bar",
"signature": "Bar getBar(byte[] value)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.getMaxBarSize()",
"constructor": false,
"full_signature": "private long getMaxBarSize()",
"identifier": "getMaxBarSize",
"modifiers": "private",
"parameters": "()",
"return": "long",
"signature": "long getMaxBarSize()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public List<Bucket> computeBuckets() {\n Preconditions.checkState(bars.size() >= numBuckets, \"Not enough data points to compute buckets\");\n List<Bucket> buckets = new ArrayList<>();\n long idealBuckSize = (long) Math.ceil(totalCount / (double) numBuckets);\n long currCount = 0;\n int barsIdx = 0;\n byte[] prevBound = bars.get(0).leftBoundInclusive;\n Bar currBar = null;\n for (int i = 0; i < numBuckets; i++) {\n while (currCount <= idealBuckSize && barsIdx < bars.size()) {\n currBar = bars.get(barsIdx++);\n currCount += currBar.getSize();\n }\n long surplus = Math.max(currCount - idealBuckSize, 0);\n // deviate a bit from the paper here\n // to estimate the bound, we split the range into 8 splits for a total of 10 including start/end\n // then we calculate the % of the currBar's count we've used, and round down to the closest split\n int closestSplitIdx = (int) ((1 - ((double) surplus / currBar.getSize())) * 9);\n byte[][] splits = Bytes.split(currBar.leftBoundInclusive, currBar.rightBoundExclusive, 8);\n Bucket bucket = new Bucket(prevBound, splits[closestSplitIdx]);\n bucket.incrementCountEstimate(currCount - surplus);\n prevBound = splits[closestSplitIdx];\n buckets.add(bucket);\n currCount = surplus;\n }\n return buckets;\n }",
"class_method_signature": "EquiDepthStreamHistogram.computeBuckets()",
"constructor": false,
"full_signature": "public List<Bucket> computeBuckets()",
"identifier": "computeBuckets",
"invocations": [
"checkState",
"size",
"ceil",
"get",
"size",
"get",
"getSize",
"max",
"getSize",
"split",
"incrementCountEstimate",
"add"
],
"modifiers": "public",
"parameters": "()",
"return": "List<Bucket>",
"signature": "List<Bucket> computeBuckets()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_60 | {
"fields": [
{
"declarator": "ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT)",
"modifier": "private static final",
"original_string": "private static final ColumnInfo ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT);",
"type": "ColumnInfo",
"var_name": "ID_COLUMN"
},
{
"declarator": "NAME_COLUMN = new ColumnInfo(\"NAME\", Types.VARCHAR)",
"modifier": "private static final",
"original_string": "private static final ColumnInfo NAME_COLUMN = new ColumnInfo(\"NAME\", Types.VARCHAR);",
"type": "ColumnInfo",
"var_name": "NAME_COLUMN"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/QueryUtilTest.java",
"identifier": "QueryUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConstructSelectStatementWithSchema() {\n assertEquals(\n \"SELECT \\\"ID\\\" , \\\"NAME\\\" FROM A.MYTAB\",\n QueryUtil.constructSelectStatement(\"A.MYTAB\", ImmutableList.of(ID_COLUMN,NAME_COLUMN),null));\n }",
"class_method_signature": "QueryUtilTest.testConstructSelectStatementWithSchema()",
"constructor": false,
"full_signature": "@Test public void testConstructSelectStatementWithSchema()",
"identifier": "testConstructSelectStatementWithSchema",
"invocations": [
"assertEquals",
"constructSelectStatement",
"of"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testConstructSelectStatementWithSchema()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(QueryUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryUtil.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "COLUMN_FAMILY_POSITION = 25",
"modifier": "public static final",
"original_string": "public static final int COLUMN_FAMILY_POSITION = 25;",
"type": "int",
"var_name": "COLUMN_FAMILY_POSITION"
},
{
"declarator": "COLUMN_NAME_POSITION = 4",
"modifier": "public static final",
"original_string": "public static final int COLUMN_NAME_POSITION = 4;",
"type": "int",
"var_name": "COLUMN_NAME_POSITION"
},
{
"declarator": "DATA_TYPE_POSITION = 5",
"modifier": "public static final",
"original_string": "public static final int DATA_TYPE_POSITION = 5;",
"type": "int",
"var_name": "DATA_TYPE_POSITION"
},
{
"declarator": "DATA_TYPE_NAME_POSITION = 6",
"modifier": "public static final",
"original_string": "public static final int DATA_TYPE_NAME_POSITION = 6;",
"type": "int",
"var_name": "DATA_TYPE_NAME_POSITION"
},
{
"declarator": "IS_SERVER_CONNECTION = \"IS_SERVER_CONNECTION\"",
"modifier": "public static final",
"original_string": "public static final String IS_SERVER_CONNECTION = \"IS_SERVER_CONNECTION\";",
"type": "String",
"var_name": "IS_SERVER_CONNECTION"
},
{
"declarator": "SELECT = \"SELECT\"",
"modifier": "private static final",
"original_string": "private static final String SELECT = \"SELECT\";",
"type": "String",
"var_name": "SELECT"
},
{
"declarator": "FROM = \"FROM\"",
"modifier": "private static final",
"original_string": "private static final String FROM = \"FROM\";",
"type": "String",
"var_name": "FROM"
},
{
"declarator": "WHERE = \"WHERE\"",
"modifier": "private static final",
"original_string": "private static final String WHERE = \"WHERE\";",
"type": "String",
"var_name": "WHERE"
},
{
"declarator": "AND = \"AND\"",
"modifier": "private static final",
"original_string": "private static final String AND = \"AND\";",
"type": "String",
"var_name": "AND"
},
{
"declarator": "CompareOpString = new String[CompareOp.values().length]",
"modifier": "private static final",
"original_string": "private static final String[] CompareOpString = new String[CompareOp.values().length];",
"type": "String[]",
"var_name": "CompareOpString"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java",
"identifier": "QueryUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "QueryUtil.toSQL(CompareOp op)",
"constructor": false,
"full_signature": "public static String toSQL(CompareOp op)",
"identifier": "toSQL",
"modifiers": "public static",
"parameters": "(CompareOp op)",
"return": "String",
"signature": "String toSQL(CompareOp op)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.QueryUtil()",
"constructor": true,
"full_signature": "private QueryUtil()",
"identifier": "QueryUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " QueryUtil()",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"constructor": false,
"full_signature": "public static String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"identifier": "constructUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, List<ColumnInfo> columnInfos)",
"return": "String",
"signature": "String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"constructor": false,
"full_signature": "public static String constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"identifier": "constructUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, List<String> columns, Hint hint)",
"return": "String",
"signature": "String constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructGenericUpsertStatement(String tableName, int numColumns)",
"constructor": false,
"full_signature": "public static String constructGenericUpsertStatement(String tableName, int numColumns)",
"identifier": "constructGenericUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, int numColumns)",
"return": "String",
"signature": "String constructGenericUpsertStatement(String tableName, int numColumns)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"constructor": false,
"full_signature": "public static String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"identifier": "constructSelectStatement",
"modifiers": "public static",
"parameters": "(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"return": "String",
"signature": "String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"constructor": false,
"full_signature": "public static String constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"identifier": "constructSelectStatement",
"modifiers": "public static",
"parameters": "(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"return": "String",
"signature": "String constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructParameterizedInClause(int numWhereCols, int numBatches)",
"constructor": false,
"full_signature": "public static String constructParameterizedInClause(int numWhereCols, int numBatches)",
"identifier": "constructParameterizedInClause",
"modifiers": "public static",
"parameters": "(int numWhereCols, int numBatches)",
"return": "String",
"signature": "String constructParameterizedInClause(int numWhereCols, int numBatches)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum)",
"return": "String",
"signature": "String getUrl(String zkQuorum)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int clientPort)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int clientPort)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int clientPort)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int clientPort)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int port, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int port, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int port, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int port, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, Integer port, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, Integer port, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, Integer port, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, Integer port, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, Integer port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "private static String getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"identifier": "getUrlInternal",
"modifiers": "private static",
"parameters": "(String zkQuorum, Integer port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getExplainPlan(ResultSet rs)",
"constructor": false,
"full_signature": "public static String getExplainPlan(ResultSet rs)",
"identifier": "getExplainPlan",
"modifiers": "public static",
"parameters": "(ResultSet rs)",
"return": "String",
"signature": "String getExplainPlan(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getExplainPlan(ResultIterator iterator)",
"constructor": false,
"full_signature": "public static String getExplainPlan(ResultIterator iterator)",
"identifier": "getExplainPlan",
"modifiers": "public static",
"parameters": "(ResultIterator iterator)",
"return": "String",
"signature": "String getExplainPlan(ResultIterator iterator)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServer(Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServer(Configuration conf)",
"identifier": "getConnectionOnServer",
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "Connection",
"signature": "Connection getConnectionOnServer(Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.setServerConnection(Properties props)",
"constructor": false,
"full_signature": "public static void setServerConnection(Properties props)",
"identifier": "setServerConnection",
"modifiers": "public static",
"parameters": "(Properties props)",
"return": "void",
"signature": "void setServerConnection(Properties props)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.isServerConnection(ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static boolean isServerConnection(ReadOnlyProps props)",
"identifier": "isServerConnection",
"modifiers": "public static",
"parameters": "(ReadOnlyProps props)",
"return": "boolean",
"signature": "boolean isServerConnection(ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServer(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServer(Properties props, Configuration conf)",
"identifier": "getConnectionOnServer",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf)",
"return": "Connection",
"signature": "Connection getConnectionOnServer(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"identifier": "getConnectionOnServerWithCustomUrl",
"modifiers": "public static",
"parameters": "(Properties props, String principal)",
"return": "Connection",
"signature": "Connection getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnection(Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnection(Configuration conf)",
"identifier": "getConnection",
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "Connection",
"signature": "Connection getConnection(Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnection(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static Connection getConnection(Properties props, Configuration conf)",
"identifier": "getConnection",
"modifiers": "private static",
"parameters": "(Properties props, Configuration conf)",
"return": "Connection",
"signature": "Connection getConnection(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionUrl(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "public static String getConnectionUrl(Properties props, Configuration conf)",
"identifier": "getConnectionUrl",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf)",
"return": "String",
"signature": "String getConnectionUrl(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionUrl(Properties props, Configuration conf, String principal)",
"constructor": false,
"full_signature": "public static String getConnectionUrl(Properties props, Configuration conf, String principal)",
"identifier": "getConnectionUrl",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf, String principal)",
"return": "String",
"signature": "String getConnectionUrl(Properties props, Configuration conf, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getInt(String key, int defaultValue, Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static int getInt(String key, int defaultValue, Properties props, Configuration conf)",
"identifier": "getInt",
"modifiers": "private static",
"parameters": "(String key, int defaultValue, Properties props, Configuration conf)",
"return": "int",
"signature": "int getInt(String key, int defaultValue, Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getString(String key, String defaultValue, Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static String getString(String key, String defaultValue, Properties props, Configuration conf)",
"identifier": "getString",
"modifiers": "private static",
"parameters": "(String key, String defaultValue, Properties props, Configuration conf)",
"return": "String",
"signature": "String getString(String key, String defaultValue, Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getViewStatement(String schemaName, String tableName, String where)",
"constructor": false,
"full_signature": "public static String getViewStatement(String schemaName, String tableName, String where)",
"identifier": "getViewStatement",
"modifiers": "public static",
"parameters": "(String schemaName, String tableName, String where)",
"return": "String",
"signature": "String getViewStatement(String schemaName, String tableName, String where)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getOffsetLimit(Integer limit, Integer offset)",
"constructor": false,
"full_signature": "public static Integer getOffsetLimit(Integer limit, Integer offset)",
"identifier": "getOffsetLimit",
"modifiers": "public static",
"parameters": "(Integer limit, Integer offset)",
"return": "Integer",
"signature": "Integer getOffsetLimit(Integer limit, Integer offset)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getRemainingOffset(Tuple offsetTuple)",
"constructor": false,
"full_signature": "public static Integer getRemainingOffset(Tuple offsetTuple)",
"identifier": "getRemainingOffset",
"modifiers": "public static",
"parameters": "(Tuple offsetTuple)",
"return": "Integer",
"signature": "Integer getRemainingOffset(Tuple offsetTuple)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"constructor": false,
"full_signature": "public static String getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"identifier": "getViewPartitionClause",
"modifiers": "public static",
"parameters": "(String partitionColumnName, long autoPartitionNum)",
"return": "String",
"signature": "String getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionForQueryLog(Configuration config)",
"constructor": false,
"full_signature": "public static Connection getConnectionForQueryLog(Configuration config)",
"identifier": "getConnectionForQueryLog",
"modifiers": "public static",
"parameters": "(Configuration config)",
"return": "Connection",
"signature": "Connection getConnectionForQueryLog(Configuration config)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getCatalogsStmt(PhoenixConnection connection)",
"constructor": false,
"full_signature": "public static PreparedStatement getCatalogsStmt(PhoenixConnection connection)",
"identifier": "getCatalogsStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection)",
"return": "PreparedStatement",
"signature": "PreparedStatement getCatalogsStmt(PhoenixConnection connection)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"constructor": false,
"full_signature": "public static PreparedStatement getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"identifier": "getSchemasStmt",
"modifiers": "public static",
"parameters": "(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"return": "PreparedStatement",
"signature": "PreparedStatement getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"constructor": false,
"full_signature": "public static PreparedStatement getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"identifier": "getSuperTablesStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"return": "PreparedStatement",
"signature": "PreparedStatement getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"constructor": false,
"full_signature": "public static PreparedStatement getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"identifier": "getIndexInfoStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"return": "PreparedStatement",
"signature": "PreparedStatement getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"constructor": false,
"full_signature": "public static PreparedStatement getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"identifier": "getTablesStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"return": "PreparedStatement",
"signature": "PreparedStatement getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"constructor": false,
"full_signature": "public static void addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"identifier": "addTenantIdFilter",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"return": "void",
"signature": "void addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.appendConjunction(StringBuilder buf)",
"constructor": false,
"full_signature": "private static void appendConjunction(StringBuilder buf)",
"identifier": "appendConjunction",
"modifiers": "private static",
"parameters": "(StringBuilder buf)",
"return": "void",
"signature": "void appendConjunction(StringBuilder buf)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions) {\n List<String> columns = Lists.transform(columnInfos, new Function<ColumnInfo, String>(){\n @Override\n public String apply(ColumnInfo input) {\n return input.getColumnName();\n }});\n return constructSelectStatement(fullTableName, columns , conditions, null, false);\n }",
"class_method_signature": "QueryUtil.constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"constructor": false,
"full_signature": "public static String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"identifier": "constructSelectStatement",
"invocations": [
"transform",
"getColumnName",
"constructSelectStatement"
],
"modifiers": "public static",
"parameters": "(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"return": "String",
"signature": "String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_175 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/schema/SaltingUtilTest.java",
"identifier": "SaltingUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetSaltingByte_EdgeCaseHashCode() {\n // This array has a hashCode of Integer.MIN_VALUE based on the hashing in SaltingUtil\n byte[] rowKey = new byte[] { -106, 0, -10, 0, 19, -2 };\n byte saltingByte = SaltingUtil.getSaltingByte(rowKey, 0, rowKey.length, 3);\n\n assertTrue(\"Salting byte should be 0 or 1 or 2 but was \" + saltingByte,\n ImmutableSet.of((byte)0, (byte)1, (byte)2).contains(saltingByte));\n\n }",
"class_method_signature": "SaltingUtilTest.testGetSaltingByte_EdgeCaseHashCode()",
"constructor": false,
"full_signature": "@Test public void testGetSaltingByte_EdgeCaseHashCode()",
"identifier": "testGetSaltingByte_EdgeCaseHashCode",
"invocations": [
"getSaltingByte",
"assertTrue",
"contains",
"of"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetSaltingByte_EdgeCaseHashCode()",
"testcase": true
} | {
"fields": [
{
"declarator": "NUM_SALTING_BYTES = 1",
"modifier": "public static final",
"original_string": "public static final int NUM_SALTING_BYTES = 1;",
"type": "int",
"var_name": "NUM_SALTING_BYTES"
},
{
"declarator": "MAX_BUCKET_NUM = 256",
"modifier": "public static final",
"original_string": "public static final Integer MAX_BUCKET_NUM = 256;",
"type": "Integer",
"var_name": "MAX_BUCKET_NUM"
},
{
"declarator": "SALTING_COLUMN_NAME = \"_SALT\"",
"modifier": "public static final",
"original_string": "public static final String SALTING_COLUMN_NAME = \"_SALT\";",
"type": "String",
"var_name": "SALTING_COLUMN_NAME"
},
{
"declarator": "SALTED_ROW_KEY_NAME = \"_SALTED_KEY\"",
"modifier": "public static final",
"original_string": "public static final String SALTED_ROW_KEY_NAME = \"_SALTED_KEY\";",
"type": "String",
"var_name": "SALTED_ROW_KEY_NAME"
},
{
"declarator": "SALTING_COLUMN = new PColumnImpl(\n PNameFactory.newName(SALTING_COLUMN_NAME), null, PBinary.INSTANCE, 1, 0, false, 0, SortOrder.getDefault(), 0, null, false, null, false, false, null,\n HConstants.LATEST_TIMESTAMP)",
"modifier": "public static final",
"original_string": "public static final PColumnImpl SALTING_COLUMN = new PColumnImpl(\n PNameFactory.newName(SALTING_COLUMN_NAME), null, PBinary.INSTANCE, 1, 0, false, 0, SortOrder.getDefault(), 0, null, false, null, false, false, null,\n HConstants.LATEST_TIMESTAMP);",
"type": "PColumnImpl",
"var_name": "SALTING_COLUMN"
},
{
"declarator": "VAR_BINARY_SALTED_SCHEMA = new RowKeySchemaBuilder(2)\n .addField(SALTING_COLUMN, false, SortOrder.getDefault())\n .addField(SchemaUtil.VAR_BINARY_DATUM, false, SortOrder.getDefault()).build()",
"modifier": "public static final",
"original_string": "public static final RowKeySchema VAR_BINARY_SALTED_SCHEMA = new RowKeySchemaBuilder(2)\n .addField(SALTING_COLUMN, false, SortOrder.getDefault())\n .addField(SchemaUtil.VAR_BINARY_DATUM, false, SortOrder.getDefault()).build();",
"type": "RowKeySchema",
"var_name": "VAR_BINARY_SALTED_SCHEMA"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/schema/SaltingUtil.java",
"identifier": "SaltingUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "SaltingUtil.generateAllSaltingRanges(int bucketNum)",
"constructor": false,
"full_signature": "public static List<KeyRange> generateAllSaltingRanges(int bucketNum)",
"identifier": "generateAllSaltingRanges",
"modifiers": "public static",
"parameters": "(int bucketNum)",
"return": "List<KeyRange>",
"signature": "List<KeyRange> generateAllSaltingRanges(int bucketNum)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.getSalteByteSplitPoints(int saltBucketNum)",
"constructor": false,
"full_signature": "public static byte[][] getSalteByteSplitPoints(int saltBucketNum)",
"identifier": "getSalteByteSplitPoints",
"modifiers": "public static",
"parameters": "(int saltBucketNum)",
"return": "byte[][]",
"signature": "byte[][] getSalteByteSplitPoints(int saltBucketNum)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.getSaltedKey(ImmutableBytesWritable key, int bucketNum)",
"constructor": false,
"full_signature": "public static byte[] getSaltedKey(ImmutableBytesWritable key, int bucketNum)",
"identifier": "getSaltedKey",
"modifiers": "public static",
"parameters": "(ImmutableBytesWritable key, int bucketNum)",
"return": "byte[]",
"signature": "byte[] getSaltedKey(ImmutableBytesWritable key, int bucketNum)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"constructor": false,
"full_signature": "public static byte getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"identifier": "getSaltingByte",
"modifiers": "public static",
"parameters": "(byte[] value, int offset, int length, int bucketNum)",
"return": "byte",
"signature": "byte getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.calculateHashCode(byte a[], int offset, int length)",
"constructor": false,
"full_signature": "private static int calculateHashCode(byte a[], int offset, int length)",
"identifier": "calculateHashCode",
"modifiers": "private static",
"parameters": "(byte a[], int offset, int length)",
"return": "int",
"signature": "int calculateHashCode(byte a[], int offset, int length)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.addSaltByte(byte[] startKey, KeyRange minMaxRange)",
"constructor": false,
"full_signature": "public static KeyRange addSaltByte(byte[] startKey, KeyRange minMaxRange)",
"identifier": "addSaltByte",
"modifiers": "public static",
"parameters": "(byte[] startKey, KeyRange minMaxRange)",
"return": "KeyRange",
"signature": "KeyRange addSaltByte(byte[] startKey, KeyRange minMaxRange)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.addRegionStartKeyToScanStartAndStopRows(byte[] startKey, byte[] endKey, Scan scan)",
"constructor": false,
"full_signature": "public static void addRegionStartKeyToScanStartAndStopRows(byte[] startKey, byte[] endKey, Scan scan)",
"identifier": "addRegionStartKeyToScanStartAndStopRows",
"modifiers": "public static",
"parameters": "(byte[] startKey, byte[] endKey, Scan scan)",
"return": "void",
"signature": "void addRegionStartKeyToScanStartAndStopRows(byte[] startKey, byte[] endKey, Scan scan)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static byte getSaltingByte(byte[] value, int offset, int length, int bucketNum) {\n int hash = calculateHashCode(value, offset, length);\n return (byte) Math.abs(hash % bucketNum);\n }",
"class_method_signature": "SaltingUtil.getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"constructor": false,
"full_signature": "public static byte getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"identifier": "getSaltingByte",
"invocations": [
"calculateHashCode",
"abs"
],
"modifiers": "public static",
"parameters": "(byte[] value, int offset, int length, int bucketNum)",
"return": "byte",
"signature": "byte getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_37 | {
"fields": [
{
"declarator": "SOME_TENANT_ID = \"00Dxx0000001234\"",
"modifier": "private static final",
"original_string": "private static final String SOME_TENANT_ID = \"00Dxx0000001234\";",
"type": "String",
"var_name": "SOME_TENANT_ID"
},
{
"declarator": "SOME_OTHER_PROPERTY_KEY = \"some_other_property\"",
"modifier": "private static final",
"original_string": "private static final String SOME_OTHER_PROPERTY_KEY = \"some_other_property\";",
"type": "String",
"var_name": "SOME_OTHER_PROPERTY_KEY"
},
{
"declarator": "SOME_OTHER_PROPERTY_VALUE = \"some_other_value\"",
"modifier": "private static final",
"original_string": "private static final String SOME_OTHER_PROPERTY_VALUE = \"some_other_value\";",
"type": "String",
"var_name": "SOME_OTHER_PROPERTY_VALUE"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/PropertiesUtilTest.java",
"identifier": "PropertiesUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPropertyOverrideRespected() throws Exception {\n final Configuration conf = HBaseConfiguration.create();\n final Properties props = new Properties();\n props.setProperty(HConstants.HBASE_RPC_TIMEOUT_KEY,\n Long.toString(HConstants.DEFAULT_HBASE_RPC_TIMEOUT * 10));\n Properties combinedProps = PropertiesUtil.combineProperties(props, conf);\n assertEquals(combinedProps.getProperty(HConstants.HBASE_RPC_TIMEOUT_KEY),\n Long.toString(HConstants.DEFAULT_HBASE_RPC_TIMEOUT * 10));\n }",
"class_method_signature": "PropertiesUtilTest.testPropertyOverrideRespected()",
"constructor": false,
"full_signature": "@Test public void testPropertyOverrideRespected()",
"identifier": "testPropertyOverrideRespected",
"invocations": [
"create",
"setProperty",
"toString",
"combineProperties",
"assertEquals",
"getProperty",
"toString"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testPropertyOverrideRespected()",
"testcase": true
} | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/PropertiesUtil.java",
"identifier": "PropertiesUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "PropertiesUtil.PropertiesUtil()",
"constructor": true,
"full_signature": "private PropertiesUtil()",
"identifier": "PropertiesUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " PropertiesUtil()",
"testcase": false
},
{
"class_method_signature": "PropertiesUtil.deepCopy(Properties properties)",
"constructor": false,
"full_signature": "public static Properties deepCopy(Properties properties)",
"identifier": "deepCopy",
"modifiers": "public static",
"parameters": "(Properties properties)",
"return": "Properties",
"signature": "Properties deepCopy(Properties properties)",
"testcase": false
},
{
"class_method_signature": "PropertiesUtil.combineProperties(Properties props, final Configuration conf)",
"constructor": false,
"full_signature": "public static Properties combineProperties(Properties props, final Configuration conf)",
"identifier": "combineProperties",
"modifiers": "public static",
"parameters": "(Properties props, final Configuration conf)",
"return": "Properties",
"signature": "Properties combineProperties(Properties props, final Configuration conf)",
"testcase": false
},
{
"class_method_signature": "PropertiesUtil.combineProperties(Properties props, final Configuration conf, Set<String> withoutTheseProps)",
"constructor": false,
"full_signature": "public static Properties combineProperties(Properties props, final Configuration conf, Set<String> withoutTheseProps)",
"identifier": "combineProperties",
"modifiers": "public static",
"parameters": "(Properties props, final Configuration conf, Set<String> withoutTheseProps)",
"return": "Properties",
"signature": "Properties combineProperties(Properties props, final Configuration conf, Set<String> withoutTheseProps)",
"testcase": false
},
{
"class_method_signature": "PropertiesUtil.cloneConfig(Configuration toCopy)",
"constructor": false,
"full_signature": "public static Configuration cloneConfig(Configuration toCopy)",
"identifier": "cloneConfig",
"modifiers": "public static",
"parameters": "(Configuration toCopy)",
"return": "Configuration",
"signature": "Configuration cloneConfig(Configuration toCopy)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static Properties combineProperties(Properties props, final Configuration conf) {\n return combineProperties(props, conf, Collections.<String>emptySet());\n }",
"class_method_signature": "PropertiesUtil.combineProperties(Properties props, final Configuration conf)",
"constructor": false,
"full_signature": "public static Properties combineProperties(Properties props, final Configuration conf)",
"identifier": "combineProperties",
"invocations": [
"combineProperties",
"emptySet"
],
"modifiers": "public static",
"parameters": "(Properties props, final Configuration conf)",
"return": "Properties",
"signature": "Properties combineProperties(Properties props, final Configuration conf)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_122 | {
"fields": [
{
"declarator": "row = new byte[] { 'a' }",
"modifier": "",
"original_string": "byte[] row = new byte[] { 'a' };",
"type": "byte[]",
"var_name": "row"
},
{
"declarator": "fam = Bytes.toBytes(\"family\")",
"modifier": "",
"original_string": "byte[] fam = Bytes.toBytes(\"family\");",
"type": "byte[]",
"var_name": "fam"
},
{
"declarator": "qual = new byte[] { 'b' }",
"modifier": "",
"original_string": "byte[] qual = new byte[] { 'b' };",
"type": "byte[]",
"var_name": "qual"
},
{
"declarator": "val = Bytes.toBytes(\"val\")",
"modifier": "",
"original_string": "byte[] val = Bytes.toBytes(\"val\");",
"type": "byte[]",
"var_name": "val"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/filter/TestNewerTimestampFilter.java",
"identifier": "TestNewerTimestampFilter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testOnlyAllowsOlderTimestamps() {\n long ts = 100;\n NewerTimestampFilter filter = new NewerTimestampFilter(ts);\n\n KeyValue kv = new KeyValue(row, fam, qual, ts, val);\n assertEquals(\"Didn't accept kv with matching ts\", ReturnCode.INCLUDE, filter.filterKeyValue(kv));\n\n kv = new KeyValue(row, fam, qual, ts + 1, val);\n assertEquals(\"Didn't skip kv with greater ts\", ReturnCode.SKIP, filter.filterKeyValue(kv));\n\n kv = new KeyValue(row, fam, qual, ts - 1, val);\n assertEquals(\"Didn't accept kv with lower ts\", ReturnCode.INCLUDE, filter.filterKeyValue(kv));\n }",
"class_method_signature": "TestNewerTimestampFilter.testOnlyAllowsOlderTimestamps()",
"constructor": false,
"full_signature": "@Test public void testOnlyAllowsOlderTimestamps()",
"identifier": "testOnlyAllowsOlderTimestamps",
"invocations": [
"assertEquals",
"filterKeyValue",
"assertEquals",
"filterKeyValue",
"assertEquals",
"filterKeyValue"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testOnlyAllowsOlderTimestamps()",
"testcase": true
} | {
"fields": [
{
"declarator": "timestamp",
"modifier": "private",
"original_string": "private long timestamp;",
"type": "long",
"var_name": "timestamp"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/filter/NewerTimestampFilter.java",
"identifier": "NewerTimestampFilter",
"interfaces": "",
"methods": [
{
"class_method_signature": "NewerTimestampFilter.NewerTimestampFilter(long timestamp)",
"constructor": true,
"full_signature": "public NewerTimestampFilter(long timestamp)",
"identifier": "NewerTimestampFilter",
"modifiers": "public",
"parameters": "(long timestamp)",
"return": "",
"signature": " NewerTimestampFilter(long timestamp)",
"testcase": false
},
{
"class_method_signature": "NewerTimestampFilter.filterKeyValue(Cell ignored)",
"constructor": false,
"full_signature": "@Override public ReturnCode filterKeyValue(Cell ignored)",
"identifier": "filterKeyValue",
"modifiers": "@Override public",
"parameters": "(Cell ignored)",
"return": "ReturnCode",
"signature": "ReturnCode filterKeyValue(Cell ignored)",
"testcase": false
}
],
"superclass": "extends FilterBase"
} | {
"body": "@Override\n public ReturnCode filterKeyValue(Cell ignored) {\n return ignored.getTimestamp() > timestamp ? ReturnCode.SKIP : ReturnCode.INCLUDE;\n }",
"class_method_signature": "NewerTimestampFilter.filterKeyValue(Cell ignored)",
"constructor": false,
"full_signature": "@Override public ReturnCode filterKeyValue(Cell ignored)",
"identifier": "filterKeyValue",
"invocations": [
"getTimestamp"
],
"modifiers": "@Override public",
"parameters": "(Cell ignored)",
"return": "ReturnCode",
"signature": "ReturnCode filterKeyValue(Cell ignored)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_134 | {
"fields": [
{
"declarator": "overAllQueryMetrics",
"modifier": "private",
"original_string": "private OverAllQueryMetrics overAllQueryMetrics;",
"type": "OverAllQueryMetrics",
"var_name": "overAllQueryMetrics"
},
{
"declarator": "numParallelScans = 10L",
"modifier": "private static final",
"original_string": "private static final long numParallelScans = 10L;",
"type": "long",
"var_name": "numParallelScans"
},
{
"declarator": "delta = 1000L",
"modifier": "private static final",
"original_string": "private static final long delta = 1000L;",
"type": "long",
"var_name": "delta"
},
{
"declarator": "queryTimeouts = 5",
"modifier": "private static final",
"original_string": "private static final int queryTimeouts = 5;",
"type": "int",
"var_name": "queryTimeouts"
},
{
"declarator": "queryFailures = 8",
"modifier": "private static final",
"original_string": "private static final int queryFailures = 8;",
"type": "int",
"var_name": "queryFailures"
},
{
"declarator": "cacheRefreshesDueToSplits = 15",
"modifier": "private static final",
"original_string": "private static final int cacheRefreshesDueToSplits = 15;",
"type": "int",
"var_name": "cacheRefreshesDueToSplits"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/monitoring/OverAllQueryMetricsTest.java",
"identifier": "OverAllQueryMetricsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNoOpRequestMetricsIfRequestMetricsDisabled() {\n OverAllQueryMetrics noOpMetrics = new OverAllQueryMetrics(false, LogLevel.OFF);\n populateMetrics(noOpMetrics, numParallelScans, queryTimeouts, queryFailures,\n cacheRefreshesDueToSplits);\n Map<MetricType, Long> noOpMap = noOpMetrics.publish();\n assertEquals(1, noOpMap.size());\n assertEquals(0L, (long)noOpMap.get(NO_OP_METRIC));\n }",
"class_method_signature": "OverAllQueryMetricsTest.testNoOpRequestMetricsIfRequestMetricsDisabled()",
"constructor": false,
"full_signature": "@Test public void testNoOpRequestMetricsIfRequestMetricsDisabled()",
"identifier": "testNoOpRequestMetricsIfRequestMetricsDisabled",
"invocations": [
"populateMetrics",
"publish",
"assertEquals",
"size",
"assertEquals",
"get"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testNoOpRequestMetricsIfRequestMetricsDisabled()",
"testcase": true
} | {
"fields": [
{
"declarator": "queryWatch",
"modifier": "private final",
"original_string": "private final MetricsStopWatch queryWatch;",
"type": "MetricsStopWatch",
"var_name": "queryWatch"
},
{
"declarator": "resultSetWatch",
"modifier": "private final",
"original_string": "private final MetricsStopWatch resultSetWatch;",
"type": "MetricsStopWatch",
"var_name": "resultSetWatch"
},
{
"declarator": "numParallelScans",
"modifier": "private final",
"original_string": "private final CombinableMetric numParallelScans;",
"type": "CombinableMetric",
"var_name": "numParallelScans"
},
{
"declarator": "wallClockTimeMS",
"modifier": "private final",
"original_string": "private final CombinableMetric wallClockTimeMS;",
"type": "CombinableMetric",
"var_name": "wallClockTimeMS"
},
{
"declarator": "resultSetTimeMS",
"modifier": "private final",
"original_string": "private final CombinableMetric resultSetTimeMS;",
"type": "CombinableMetric",
"var_name": "resultSetTimeMS"
},
{
"declarator": "queryTimedOut",
"modifier": "private final",
"original_string": "private final CombinableMetric queryTimedOut;",
"type": "CombinableMetric",
"var_name": "queryTimedOut"
},
{
"declarator": "queryFailed",
"modifier": "private final",
"original_string": "private final CombinableMetric queryFailed;",
"type": "CombinableMetric",
"var_name": "queryFailed"
},
{
"declarator": "cacheRefreshedDueToSplits",
"modifier": "private final",
"original_string": "private final CombinableMetric cacheRefreshedDueToSplits;",
"type": "CombinableMetric",
"var_name": "cacheRefreshedDueToSplits"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/monitoring/OverAllQueryMetrics.java",
"identifier": "OverAllQueryMetrics",
"interfaces": "",
"methods": [
{
"class_method_signature": "OverAllQueryMetrics.OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"constructor": true,
"full_signature": "public OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"identifier": "OverAllQueryMetrics",
"modifiers": "public",
"parameters": "(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"return": "",
"signature": " OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.updateNumParallelScans(long numParallelScans)",
"constructor": false,
"full_signature": "public void updateNumParallelScans(long numParallelScans)",
"identifier": "updateNumParallelScans",
"modifiers": "public",
"parameters": "(long numParallelScans)",
"return": "void",
"signature": "void updateNumParallelScans(long numParallelScans)",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.queryTimedOut()",
"constructor": false,
"full_signature": "public void queryTimedOut()",
"identifier": "queryTimedOut",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void queryTimedOut()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.queryFailed()",
"constructor": false,
"full_signature": "public void queryFailed()",
"identifier": "queryFailed",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void queryFailed()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.cacheRefreshedDueToSplits()",
"constructor": false,
"full_signature": "public void cacheRefreshedDueToSplits()",
"identifier": "cacheRefreshedDueToSplits",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void cacheRefreshedDueToSplits()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.startQuery()",
"constructor": false,
"full_signature": "public void startQuery()",
"identifier": "startQuery",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void startQuery()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.endQuery()",
"constructor": false,
"full_signature": "public void endQuery()",
"identifier": "endQuery",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void endQuery()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.startResultSetWatch()",
"constructor": false,
"full_signature": "public void startResultSetWatch()",
"identifier": "startResultSetWatch",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void startResultSetWatch()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.stopResultSetWatch()",
"constructor": false,
"full_signature": "public void stopResultSetWatch()",
"identifier": "stopResultSetWatch",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void stopResultSetWatch()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.getWallClockTimeMs()",
"constructor": false,
"full_signature": "@VisibleForTesting long getWallClockTimeMs()",
"identifier": "getWallClockTimeMs",
"modifiers": "@VisibleForTesting",
"parameters": "()",
"return": "long",
"signature": "long getWallClockTimeMs()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.getResultSetTimeMs()",
"constructor": false,
"full_signature": "@VisibleForTesting long getResultSetTimeMs()",
"identifier": "getResultSetTimeMs",
"modifiers": "@VisibleForTesting",
"parameters": "()",
"return": "long",
"signature": "long getResultSetTimeMs()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.publish()",
"constructor": false,
"full_signature": "public Map<MetricType, Long> publish()",
"identifier": "publish",
"modifiers": "public",
"parameters": "()",
"return": "Map<MetricType, Long>",
"signature": "Map<MetricType, Long> publish()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.reset()",
"constructor": false,
"full_signature": "public void reset()",
"identifier": "reset",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void reset()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.combine(OverAllQueryMetrics metric)",
"constructor": false,
"full_signature": "public OverAllQueryMetrics combine(OverAllQueryMetrics metric)",
"identifier": "combine",
"modifiers": "public",
"parameters": "(OverAllQueryMetrics metric)",
"return": "OverAllQueryMetrics",
"signature": "OverAllQueryMetrics combine(OverAllQueryMetrics metric)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public Map<MetricType, Long> publish() {\n Map<MetricType, Long> metricsForPublish = new HashMap<>();\n metricsForPublish.put(numParallelScans.getMetricType(), numParallelScans.getValue());\n metricsForPublish.put(wallClockTimeMS.getMetricType(), wallClockTimeMS.getValue());\n metricsForPublish.put(resultSetTimeMS.getMetricType(), resultSetTimeMS.getValue());\n metricsForPublish.put(queryTimedOut.getMetricType(), queryTimedOut.getValue());\n metricsForPublish.put(queryFailed.getMetricType(), queryFailed.getValue());\n metricsForPublish.put(cacheRefreshedDueToSplits.getMetricType(), cacheRefreshedDueToSplits.getValue());\n return metricsForPublish;\n }",
"class_method_signature": "OverAllQueryMetrics.publish()",
"constructor": false,
"full_signature": "public Map<MetricType, Long> publish()",
"identifier": "publish",
"invocations": [
"put",
"getMetricType",
"getValue",
"put",
"getMetricType",
"getValue",
"put",
"getMetricType",
"getValue",
"put",
"getMetricType",
"getValue",
"put",
"getMetricType",
"getValue",
"put",
"getMetricType",
"getValue"
],
"modifiers": "public",
"parameters": "()",
"return": "Map<MetricType, Long>",
"signature": "Map<MetricType, Long> publish()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_21 | {
"fields": [
{
"declarator": "MIN_VALUE = 1",
"modifier": "private static",
"original_string": "private static long MIN_VALUE = 1;",
"type": "long",
"var_name": "MIN_VALUE"
},
{
"declarator": "MAX_VALUE = 10",
"modifier": "private static",
"original_string": "private static long MAX_VALUE = 10;",
"type": "long",
"var_name": "MAX_VALUE"
},
{
"declarator": "CACHE_SIZE = 2",
"modifier": "private static",
"original_string": "private static long CACHE_SIZE = 2;",
"type": "long",
"var_name": "CACHE_SIZE"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/SequenceUtilTest.java",
"identifier": "SequenceUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAscendingOverflow() throws SQLException {\n assertTrue(SequenceUtil.checkIfLimitReached(Long.MAX_VALUE, 0, Long.MAX_VALUE, 1/* incrementBy */, CACHE_SIZE));\n }",
"class_method_signature": "SequenceUtilTest.testAscendingOverflow()",
"constructor": false,
"full_signature": "@Test public void testAscendingOverflow()",
"identifier": "testAscendingOverflow",
"invocations": [
"assertTrue",
"checkIfLimitReached"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testAscendingOverflow()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L",
"modifier": "public static final",
"original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;",
"type": "long",
"var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/SequenceUtil.java",
"identifier": "SequenceUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(SequenceInfo info)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(SequenceInfo info)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(SequenceInfo info)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(SequenceInfo info)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isBulkAllocation(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isBulkAllocation(long numToAllocate)",
"identifier": "isBulkAllocation",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isBulkAllocation(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isCycleAllowed(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isCycleAllowed(long numToAllocate)",
"identifier": "isCycleAllowed",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isCycleAllowed(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"constructor": false,
"full_signature": "public static SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"identifier": "getException",
"modifiers": "public static",
"parameters": "(String schemaName, String tableName,\n SQLExceptionCode code)",
"return": "SQLException",
"signature": "SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getLimitReachedErrorCode(boolean increasingSeq)",
"constructor": false,
"full_signature": "public static SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"identifier": "getLimitReachedErrorCode",
"modifiers": "public static",
"parameters": "(boolean increasingSeq)",
"return": "SQLExceptionCode",
"signature": "SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for overflow \n try {\n long incrementValue;\n if (isBulkAllocation(numToAllocate)) {\n // For bulk allocation we increment independent of cache size\n incrementValue = LongMath.checkedMultiply(incrementBy, numToAllocate);\n } else {\n incrementValue = LongMath.checkedMultiply(incrementBy, cacheSize);\n }\n nextValue = LongMath.checkedAdd(currentValue, incrementValue);\n } catch (ArithmeticException e) {\n return true;\n }\n\n // check if limit was reached\n\t\tif ((increasingSeq && nextValue > maxValue)\n\t\t\t\t|| (!increasingSeq && nextValue < minValue)) {\n return true;\n }\n return false;\n }",
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"invocations": [
"isBulkAllocation",
"checkedMultiply",
"checkedMultiply",
"checkedAdd"
],
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_4 | {
"fields": [
{
"declarator": "mockParser",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static XMLConfigParser mockParser;",
"type": "XMLConfigParser",
"var_name": "mockParser"
},
{
"declarator": "mockDMR",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static DataModelResult mockDMR;",
"type": "DataModelResult",
"var_name": "mockDMR"
},
{
"declarator": "mockRA",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static RulesApplier mockRA;",
"type": "RulesApplier",
"var_name": "mockRA"
},
{
"declarator": "mockTT",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static ThreadTime mockTT;",
"type": "ThreadTime",
"var_name": "mockTT"
},
{
"declarator": "mockScenario",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static Scenario mockScenario;",
"type": "Scenario",
"var_name": "mockScenario"
},
{
"declarator": "mockWE",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static WorkloadExecutor mockWE;",
"type": "WorkloadExecutor",
"var_name": "mockWE"
},
{
"declarator": "mockQuery",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static Query mockQuery;",
"type": "Query",
"var_name": "mockQuery"
},
{
"declarator": "mockRS",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static ResultSet mockRS;",
"type": "ResultSet",
"var_name": "mockRS"
}
],
"file": "phoenix-pherf/src/test/java/org/apache/phoenix/pherf/workload/MultiThreadedRunnerTest.java",
"identifier": "MultiThreadedRunnerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFinishWithoutTimeout() throws Exception {\n DefaultEnvironmentEdge myClock = Mockito.mock(DefaultEnvironmentEdge.class);\n Mockito.when(myClock.currentTime()).thenReturn(0L);\n EnvironmentEdgeManager.injectEdge(myClock);\n try {\n Mockito.when(mockQuery.getTimeoutDuration()).thenReturn(1000L);\n Mockito.when(mockQuery.getExpectedAggregateRowCount()).thenReturn(1L);\n MultiThreadedRunner mtr = new MultiThreadedRunner(\"test\",\n mockQuery, mockDMR, mockTT,\n 10L, 1000L,\n true, mockRA,\n mockScenario, mockWE, mockParser);\n Mockito.when(mockRS.next()).thenReturn(true, false);\n Mockito.when(mockRS.getLong(1)).thenReturn(1L);\n Pair<Long, Long> results = mtr.getResults(mockRS, \"test_iteration\", false, 0L);\n assertFalse(results.getSecond() > mockQuery.getTimeoutDuration());\n } finally {\n EnvironmentEdgeManager.reset();\n }\n }",
"class_method_signature": "MultiThreadedRunnerTest.testFinishWithoutTimeout()",
"constructor": false,
"full_signature": "@Test public void testFinishWithoutTimeout()",
"identifier": "testFinishWithoutTimeout",
"invocations": [
"mock",
"thenReturn",
"when",
"currentTime",
"injectEdge",
"thenReturn",
"when",
"getTimeoutDuration",
"thenReturn",
"when",
"getExpectedAggregateRowCount",
"thenReturn",
"when",
"next",
"thenReturn",
"when",
"getLong",
"getResults",
"assertFalse",
"getSecond",
"getTimeoutDuration",
"reset"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testFinishWithoutTimeout()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MultiThreadedRunner.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MultiThreadedRunner.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "query",
"modifier": "private",
"original_string": "private Query query;",
"type": "Query",
"var_name": "query"
},
{
"declarator": "threadTime",
"modifier": "private",
"original_string": "private ThreadTime threadTime;",
"type": "ThreadTime",
"var_name": "threadTime"
},
{
"declarator": "pUtil = PhoenixUtil.create()",
"modifier": "private",
"original_string": "private PhoenixUtil pUtil = PhoenixUtil.create();",
"type": "PhoenixUtil",
"var_name": "pUtil"
},
{
"declarator": "threadName",
"modifier": "private",
"original_string": "private String threadName;",
"type": "String",
"var_name": "threadName"
},
{
"declarator": "dataModelResult",
"modifier": "private",
"original_string": "private DataModelResult dataModelResult;",
"type": "DataModelResult",
"var_name": "dataModelResult"
},
{
"declarator": "numberOfExecutions",
"modifier": "private",
"original_string": "private long numberOfExecutions;",
"type": "long",
"var_name": "numberOfExecutions"
},
{
"declarator": "executionDurationInMs",
"modifier": "private",
"original_string": "private long executionDurationInMs;",
"type": "long",
"var_name": "executionDurationInMs"
},
{
"declarator": "lastResultWritten = EnvironmentEdgeManager.currentTimeMillis() - 1000",
"modifier": "private static",
"original_string": "private static long lastResultWritten = EnvironmentEdgeManager.currentTimeMillis() - 1000;",
"type": "long",
"var_name": "lastResultWritten"
},
{
"declarator": "resultManager",
"modifier": "private final",
"original_string": "private final ResultManager resultManager;",
"type": "ResultManager",
"var_name": "resultManager"
},
{
"declarator": "ruleApplier",
"modifier": "private final",
"original_string": "private final RulesApplier ruleApplier;",
"type": "RulesApplier",
"var_name": "ruleApplier"
},
{
"declarator": "scenario",
"modifier": "private final",
"original_string": "private final Scenario scenario;",
"type": "Scenario",
"var_name": "scenario"
},
{
"declarator": "workloadExecutor",
"modifier": "private final",
"original_string": "private final WorkloadExecutor workloadExecutor;",
"type": "WorkloadExecutor",
"var_name": "workloadExecutor"
},
{
"declarator": "parser",
"modifier": "private final",
"original_string": "private final XMLConfigParser parser;",
"type": "XMLConfigParser",
"var_name": "parser"
},
{
"declarator": "writeRuntimeResults",
"modifier": "private final",
"original_string": "private final boolean writeRuntimeResults;",
"type": "boolean",
"var_name": "writeRuntimeResults"
}
],
"file": "phoenix-pherf/src/main/java/org/apache/phoenix/pherf/workload/MultiThreadedRunner.java",
"identifier": "MultiThreadedRunner",
"interfaces": "implements Callable<Void>",
"methods": [
{
"class_method_signature": "MultiThreadedRunner.MultiThreadedRunner(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"constructor": true,
"full_signature": " MultiThreadedRunner(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"identifier": "MultiThreadedRunner",
"modifiers": "",
"parameters": "(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"return": "",
"signature": " MultiThreadedRunner(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.call()",
"constructor": false,
"full_signature": "@Override public Void call()",
"identifier": "call",
"modifiers": "@Override public",
"parameters": "()",
"return": "Void",
"signature": "Void call()",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.getThreadTime()",
"constructor": false,
"full_signature": "private synchronized ThreadTime getThreadTime()",
"identifier": "getThreadTime",
"modifiers": "private synchronized",
"parameters": "()",
"return": "ThreadTime",
"signature": "ThreadTime getThreadTime()",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.timedQuery(long iterationNumber)",
"constructor": false,
"full_signature": "private boolean timedQuery(long iterationNumber)",
"identifier": "timedQuery",
"modifiers": "private",
"parameters": "(long iterationNumber)",
"return": "boolean",
"signature": "boolean timedQuery(long iterationNumber)",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"constructor": false,
"full_signature": "@VisibleForTesting Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"identifier": "getResults",
"modifiers": "@VisibleForTesting",
"parameters": "(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"return": "Pair<Long, Long>",
"signature": "Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting\n /**\n * @return a Pair whose first value is the resultRowCount, and whose second value is whether the query timed out.\n */\n Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime) throws Exception {\n Long resultRowCount = 0L;\n while (rs.next()) {\n if (null != query.getExpectedAggregateRowCount()) {\n if (rs.getLong(1) != query.getExpectedAggregateRowCount())\n throw new RuntimeException(\n \"Aggregate count \" + rs.getLong(1) + \" does not match expected \"\n + query.getExpectedAggregateRowCount());\n }\n\n if (isSelectCountStatement) {\n resultRowCount = rs.getLong(1);\n } else {\n resultRowCount++;\n }\n long queryElapsedTime = EnvironmentEdgeManager.currentTimeMillis() - queryStartTime;\n if (queryElapsedTime >= query.getTimeoutDuration()) {\n LOGGER.error(\"Query \" + queryIteration + \" exceeded timeout of \"\n + query.getTimeoutDuration() + \" ms at \" + queryElapsedTime + \" ms.\");\n return new Pair(resultRowCount, queryElapsedTime);\n }\n }\n return new Pair(resultRowCount, EnvironmentEdgeManager.currentTimeMillis() - queryStartTime);\n }",
"class_method_signature": "MultiThreadedRunner.getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"constructor": false,
"full_signature": "@VisibleForTesting Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"identifier": "getResults",
"invocations": [
"next",
"getExpectedAggregateRowCount",
"getLong",
"getExpectedAggregateRowCount",
"getLong",
"getExpectedAggregateRowCount",
"getLong",
"currentTimeMillis",
"getTimeoutDuration",
"error",
"getTimeoutDuration",
"currentTimeMillis"
],
"modifiers": "@VisibleForTesting",
"parameters": "(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"return": "Pair<Long, Long>",
"signature": "Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_163 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/cache/JodaTimezoneCacheTest.java",
"identifier": "JodaTimezoneCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetInstanceString() {\n DateTimeZone instance = JodaTimezoneCache.getInstance(\"America/St_Vincent\");\n assertNotNull(instance);\n }",
"class_method_signature": "JodaTimezoneCacheTest.testGetInstanceString()",
"constructor": false,
"full_signature": "@Test public void testGetInstanceString()",
"identifier": "testGetInstanceString",
"invocations": [
"getInstance",
"assertNotNull"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetInstanceString()",
"testcase": true
} | {
"fields": [
{
"declarator": "CACHE_EXPRIRE_TIME_MINUTES = 10",
"modifier": "public static final",
"original_string": "public static final int CACHE_EXPRIRE_TIME_MINUTES = 10;",
"type": "int",
"var_name": "CACHE_EXPRIRE_TIME_MINUTES"
},
{
"declarator": "cachedJodaTimeZones = createTimezoneCache()",
"modifier": "private static final",
"original_string": "private static final LoadingCache<ByteBuffer, DateTimeZone> cachedJodaTimeZones = createTimezoneCache();",
"type": "LoadingCache<ByteBuffer, DateTimeZone>",
"var_name": "cachedJodaTimeZones"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/cache/JodaTimezoneCache.java",
"identifier": "JodaTimezoneCache",
"interfaces": "",
"methods": [
{
"class_method_signature": "JodaTimezoneCache.getInstance(ByteBuffer timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ByteBuffer timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(ByteBuffer timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ByteBuffer timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.getInstance(ImmutableBytesWritable timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ImmutableBytesWritable timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(ImmutableBytesWritable timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ImmutableBytesWritable timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.getInstance(String timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(String timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(String timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(String timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.createTimezoneCache()",
"constructor": false,
"full_signature": "private static LoadingCache<ByteBuffer, DateTimeZone> createTimezoneCache()",
"identifier": "createTimezoneCache",
"modifiers": "private static",
"parameters": "()",
"return": "LoadingCache<ByteBuffer, DateTimeZone>",
"signature": "LoadingCache<ByteBuffer, DateTimeZone> createTimezoneCache()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static DateTimeZone getInstance(ByteBuffer timezoneId) {\n try {\n return cachedJodaTimeZones.get(timezoneId);\n } catch (ExecutionException ex) {\n throw new IllegalDataException(ex);\n } catch (UncheckedExecutionException e) {\n throw new IllegalDataException(\"Unknown timezone \" + Bytes.toString(timezoneId.array()));\n }\n }",
"class_method_signature": "JodaTimezoneCache.getInstance(ByteBuffer timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ByteBuffer timezoneId)",
"identifier": "getInstance",
"invocations": [
"get",
"toString",
"array"
],
"modifiers": "public static",
"parameters": "(ByteBuffer timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ByteBuffer timezoneId)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_76 | {
"fields": [
{
"declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L",
"modifier": "private static final",
"original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;",
"type": "long",
"var_name": "ONE_HOUR_IN_MILLIS"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/DateUtilTest.java",
"identifier": "DateUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalDataException.class)\n public void testParseDate_InvalidDate() {\n DateUtil.parseDate(\"not-a-date\");\n }",
"class_method_signature": "DateUtilTest.testParseDate_InvalidDate()",
"constructor": false,
"full_signature": "@Test(expected = IllegalDataException.class) public void testParseDate_InvalidDate()",
"identifier": "testParseDate_InvalidDate",
"invocations": [
"parseDate"
],
"modifiers": "@Test(expected = IllegalDataException.class) public",
"parameters": "()",
"return": "void",
"signature": "void testParseDate_InvalidDate()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";",
"type": "String",
"var_name": "DEFAULT_TIME_ZONE_ID"
},
{
"declarator": "LOCAL_TIME_ZONE_ID = \"LOCAL\"",
"modifier": "public static final",
"original_string": "public static final String LOCAL_TIME_ZONE_ID = \"LOCAL\";",
"type": "String",
"var_name": "LOCAL_TIME_ZONE_ID"
},
{
"declarator": "DEFAULT_TIME_ZONE = TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID)",
"modifier": "private static final",
"original_string": "private static final TimeZone DEFAULT_TIME_ZONE = TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID);",
"type": "TimeZone",
"var_name": "DEFAULT_TIME_ZONE"
},
{
"declarator": "DEFAULT_MS_DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss.SSS\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_MS_DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss.SSS\";",
"type": "String",
"var_name": "DEFAULT_MS_DATE_FORMAT"
},
{
"declarator": "DEFAULT_MS_DATE_FORMATTER = FastDateFormat.getInstance(\n DEFAULT_MS_DATE_FORMAT, TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID))",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_MS_DATE_FORMATTER = FastDateFormat.getInstance(\n DEFAULT_MS_DATE_FORMAT, TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID));",
"type": "Format",
"var_name": "DEFAULT_MS_DATE_FORMATTER"
},
{
"declarator": "DEFAULT_DATE_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_DATE_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_DATE_FORMAT"
},
{
"declarator": "DEFAULT_DATE_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_DATE_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_DATE_FORMATTER"
},
{
"declarator": "DEFAULT_TIME_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIME_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_TIME_FORMAT"
},
{
"declarator": "DEFAULT_TIME_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_TIME_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_TIME_FORMATTER"
},
{
"declarator": "DEFAULT_TIMESTAMP_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIMESTAMP_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_TIMESTAMP_FORMAT"
},
{
"declarator": "DEFAULT_TIMESTAMP_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_TIMESTAMP_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_TIMESTAMP_FORMATTER"
},
{
"declarator": "ISO_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.dateParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .appendLiteral(' ').toParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.timeParser()).toParser())\n .toFormatter().withChronology(ISOChronology.getInstanceUTC())",
"modifier": "private static final",
"original_string": "private static final DateTimeFormatter ISO_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.dateParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .appendLiteral(' ').toParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.timeParser()).toParser())\n .toFormatter().withChronology(ISOChronology.getInstanceUTC());",
"type": "DateTimeFormatter",
"var_name": "ISO_DATE_TIME_FORMATTER"
},
{
"declarator": "defaultPattern",
"modifier": "private static",
"original_string": "private static String[] defaultPattern;",
"type": "String[]",
"var_name": "defaultPattern"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/DateUtil.java",
"identifier": "DateUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "DateUtil.DateUtil()",
"constructor": true,
"full_signature": "private DateUtil()",
"identifier": "DateUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " DateUtil()",
"testcase": false
},
{
"class_method_signature": "DateUtil.getCodecFor(PDataType type)",
"constructor": false,
"full_signature": "@NonNull public static PDataCodec getCodecFor(PDataType type)",
"identifier": "getCodecFor",
"modifiers": "@NonNull public static",
"parameters": "(PDataType type)",
"return": "PDataCodec",
"signature": "PDataCodec getCodecFor(PDataType type)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimeZone(String timeZoneId)",
"constructor": false,
"full_signature": "public static TimeZone getTimeZone(String timeZoneId)",
"identifier": "getTimeZone",
"modifiers": "public static",
"parameters": "(String timeZoneId)",
"return": "TimeZone",
"signature": "TimeZone getTimeZone(String timeZoneId)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDefaultFormat(PDataType type)",
"constructor": false,
"full_signature": "private static String getDefaultFormat(PDataType type)",
"identifier": "getDefaultFormat",
"modifiers": "private static",
"parameters": "(PDataType type)",
"return": "String",
"signature": "String getDefaultFormat(PDataType type)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"constructor": false,
"full_signature": "public static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"identifier": "getDateTimeParser",
"modifiers": "public static",
"parameters": "(String pattern, PDataType pDataType, String timeZoneId)",
"return": "DateTimeParser",
"signature": "DateTimeParser getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateTimeParser(String pattern, PDataType pDataType)",
"constructor": false,
"full_signature": "public static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType)",
"identifier": "getDateTimeParser",
"modifiers": "public static",
"parameters": "(String pattern, PDataType pDataType)",
"return": "DateTimeParser",
"signature": "DateTimeParser getDateTimeParser(String pattern, PDataType pDataType)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateFormatter(String pattern)",
"constructor": false,
"full_signature": "public static Format getDateFormatter(String pattern)",
"identifier": "getDateFormatter",
"modifiers": "public static",
"parameters": "(String pattern)",
"return": "Format",
"signature": "Format getDateFormatter(String pattern)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getDateFormatter(String pattern, String timeZoneID)",
"identifier": "getDateFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getDateFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimeFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getTimeFormatter(String pattern, String timeZoneID)",
"identifier": "getTimeFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getTimeFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestampFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getTimestampFormatter(String pattern, String timeZoneID)",
"identifier": "getTimestampFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getTimestampFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseDateTime(String dateTimeValue)",
"constructor": false,
"full_signature": "private static long parseDateTime(String dateTimeValue)",
"identifier": "parseDateTime",
"modifiers": "private static",
"parameters": "(String dateTimeValue)",
"return": "long",
"signature": "long parseDateTime(String dateTimeValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseDate(String dateValue)",
"constructor": false,
"full_signature": "public static Date parseDate(String dateValue)",
"identifier": "parseDate",
"modifiers": "public static",
"parameters": "(String dateValue)",
"return": "Date",
"signature": "Date parseDate(String dateValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseTime(String timeValue)",
"constructor": false,
"full_signature": "public static Time parseTime(String timeValue)",
"identifier": "parseTime",
"modifiers": "public static",
"parameters": "(String timeValue)",
"return": "Time",
"signature": "Time parseTime(String timeValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseTimestamp(String timestampValue)",
"constructor": false,
"full_signature": "public static Timestamp parseTimestamp(String timestampValue)",
"identifier": "parseTimestamp",
"modifiers": "public static",
"parameters": "(String timestampValue)",
"return": "Timestamp",
"signature": "Timestamp parseTimestamp(String timestampValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestamp(long millis, int nanos)",
"constructor": false,
"full_signature": "public static Timestamp getTimestamp(long millis, int nanos)",
"identifier": "getTimestamp",
"modifiers": "public static",
"parameters": "(long millis, int nanos)",
"return": "Timestamp",
"signature": "Timestamp getTimestamp(long millis, int nanos)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestamp(BigDecimal bd)",
"constructor": false,
"full_signature": "public static Timestamp getTimestamp(BigDecimal bd)",
"identifier": "getTimestamp",
"modifiers": "public static",
"parameters": "(BigDecimal bd)",
"return": "Timestamp",
"signature": "Timestamp getTimestamp(BigDecimal bd)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static Date parseDate(String dateValue) {\n return new Date(parseDateTime(dateValue));\n }",
"class_method_signature": "DateUtil.parseDate(String dateValue)",
"constructor": false,
"full_signature": "public static Date parseDate(String dateValue)",
"identifier": "parseDate",
"invocations": [
"parseDateTime"
],
"modifiers": "public static",
"parameters": "(String dateValue)",
"return": "Date",
"signature": "Date parseDate(String dateValue)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_99 | {
"fields": [
{
"declarator": "bytesA = Bytes.toBytes(\"a\")",
"modifier": "",
"original_string": "byte[] bytesA = Bytes.toBytes(\"a\");",
"type": "byte[]",
"var_name": "bytesA"
},
{
"declarator": "bytesB = Bytes.toBytes(\"b\")",
"modifier": "",
"original_string": "byte[] bytesB = Bytes.toBytes(\"b\");",
"type": "byte[]",
"var_name": "bytesB"
},
{
"declarator": "bytesC = Bytes.toBytes(\"c\")",
"modifier": "",
"original_string": "byte[] bytesC = Bytes.toBytes(\"c\");",
"type": "byte[]",
"var_name": "bytesC"
},
{
"declarator": "bytesD = Bytes.toBytes(\"d\")",
"modifier": "",
"original_string": "byte[] bytesD = Bytes.toBytes(\"d\");",
"type": "byte[]",
"var_name": "bytesD"
},
{
"declarator": "bytesE = Bytes.toBytes(\"e\")",
"modifier": "",
"original_string": "byte[] bytesE = Bytes.toBytes(\"e\");",
"type": "byte[]",
"var_name": "bytesE"
},
{
"declarator": "a_b",
"modifier": "",
"original_string": "Bar a_b;",
"type": "Bar",
"var_name": "a_b"
},
{
"declarator": "b_c",
"modifier": "",
"original_string": "Bar b_c;",
"type": "Bar",
"var_name": "b_c"
},
{
"declarator": "c_d",
"modifier": "",
"original_string": "Bar c_d;",
"type": "Bar",
"var_name": "c_d"
},
{
"declarator": "d_e",
"modifier": "",
"original_string": "Bar d_e;",
"type": "Bar",
"var_name": "d_e"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/EquiDepthStreamHistogramTest.java",
"identifier": "EquiDepthStreamHistogramTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMergeBars() {\n EquiDepthStreamHistogram histo = new EquiDepthStreamHistogram(2, 1);\n // test merge of two bars\n histo.bars.add(a_b);\n histo.bars.add(b_c);\n histo.bars.add(c_d);\n histo.bars.add(d_e);\n histo.totalCount = 20; // maxBarCount of 1.7 * (10/2) = 17\n a_b.incrementCount(3);\n b_c.incrementCount(2);\n c_d.incrementCount(10);\n d_e.incrementCount(5);\n histo.mergeBars();\n assertEquals(3, histo.bars.size());\n Bar mergedBar = histo.bars.get(0);\n assertEquals(5, mergedBar.getSize());\n assertArrayEquals(bytesA, mergedBar.getLeftBoundInclusive());\n assertArrayEquals(bytesC, mergedBar.getRightBoundExclusive());\n\n // merge again a_c=5 c_d=10 d_e=5\n histo.mergeBars();\n assertEquals(2, histo.bars.size());\n mergedBar = histo.bars.get(0);\n assertEquals(15, mergedBar.getSize());\n assertArrayEquals(bytesA, mergedBar.getLeftBoundInclusive());\n assertArrayEquals(bytesD, mergedBar.getRightBoundExclusive());\n\n // a_d=15 d_e=5 , 20 > 17 so merge shouldn't happen\n histo.mergeBars();\n assertEquals(2, histo.bars.size());\n }",
"class_method_signature": "EquiDepthStreamHistogramTest.testMergeBars()",
"constructor": false,
"full_signature": "@Test public void testMergeBars()",
"identifier": "testMergeBars",
"invocations": [
"add",
"add",
"add",
"add",
"incrementCount",
"incrementCount",
"incrementCount",
"incrementCount",
"mergeBars",
"assertEquals",
"size",
"get",
"assertEquals",
"getSize",
"assertArrayEquals",
"getLeftBoundInclusive",
"assertArrayEquals",
"getRightBoundExclusive",
"mergeBars",
"assertEquals",
"size",
"get",
"assertEquals",
"getSize",
"assertArrayEquals",
"getLeftBoundInclusive",
"assertArrayEquals",
"getRightBoundExclusive",
"mergeBars",
"assertEquals",
"size"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testMergeBars()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(EquiDepthStreamHistogram.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EquiDepthStreamHistogram.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "MAX_COEF = 1.7",
"modifier": "private static final",
"original_string": "private static final double MAX_COEF = 1.7;",
"type": "double",
"var_name": "MAX_COEF"
},
{
"declarator": "DEFAULT_EXPANSION_FACTOR = 7",
"modifier": "private static final",
"original_string": "private static final short DEFAULT_EXPANSION_FACTOR = 7;",
"type": "short",
"var_name": "DEFAULT_EXPANSION_FACTOR"
},
{
"declarator": "numBuckets",
"modifier": "private",
"original_string": "private int numBuckets;",
"type": "int",
"var_name": "numBuckets"
},
{
"declarator": "maxBars",
"modifier": "private",
"original_string": "private int maxBars;",
"type": "int",
"var_name": "maxBars"
},
{
"declarator": "totalCount",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n long totalCount;",
"type": "long",
"var_name": "totalCount"
},
{
"declarator": "bars",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n List<Bar> bars;",
"type": "List<Bar>",
"var_name": "bars"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/EquiDepthStreamHistogram.java",
"identifier": "EquiDepthStreamHistogram",
"interfaces": "",
"methods": [
{
"class_method_signature": "EquiDepthStreamHistogram.EquiDepthStreamHistogram(int numBuckets)",
"constructor": true,
"full_signature": "public EquiDepthStreamHistogram(int numBuckets)",
"identifier": "EquiDepthStreamHistogram",
"modifiers": "public",
"parameters": "(int numBuckets)",
"return": "",
"signature": " EquiDepthStreamHistogram(int numBuckets)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.EquiDepthStreamHistogram(int numBuckets, int expansionFactor)",
"constructor": true,
"full_signature": "public EquiDepthStreamHistogram(int numBuckets, int expansionFactor)",
"identifier": "EquiDepthStreamHistogram",
"modifiers": "public",
"parameters": "(int numBuckets, int expansionFactor)",
"return": "",
"signature": " EquiDepthStreamHistogram(int numBuckets, int expansionFactor)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.addValue(byte[] value)",
"constructor": false,
"full_signature": "public void addValue(byte[] value)",
"identifier": "addValue",
"modifiers": "public",
"parameters": "(byte[] value)",
"return": "void",
"signature": "void addValue(byte[] value)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.computeBuckets()",
"constructor": false,
"full_signature": "public List<Bucket> computeBuckets()",
"identifier": "computeBuckets",
"modifiers": "public",
"parameters": "()",
"return": "List<Bucket>",
"signature": "List<Bucket> computeBuckets()",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.getTotalCount()",
"constructor": false,
"full_signature": "public long getTotalCount()",
"identifier": "getTotalCount",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long getTotalCount()",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.splitBar(Bar origBar)",
"constructor": false,
"full_signature": "@VisibleForTesting void splitBar(Bar origBar)",
"identifier": "splitBar",
"modifiers": "@VisibleForTesting",
"parameters": "(Bar origBar)",
"return": "void",
"signature": "void splitBar(Bar origBar)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.mergeBars()",
"constructor": false,
"full_signature": "@VisibleForTesting boolean mergeBars()",
"identifier": "mergeBars",
"modifiers": "@VisibleForTesting",
"parameters": "()",
"return": "boolean",
"signature": "boolean mergeBars()",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.getBar(byte[] value)",
"constructor": false,
"full_signature": "@VisibleForTesting Bar getBar(byte[] value)",
"identifier": "getBar",
"modifiers": "@VisibleForTesting",
"parameters": "(byte[] value)",
"return": "Bar",
"signature": "Bar getBar(byte[] value)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.getMaxBarSize()",
"constructor": false,
"full_signature": "private long getMaxBarSize()",
"identifier": "getMaxBarSize",
"modifiers": "private",
"parameters": "()",
"return": "long",
"signature": "long getMaxBarSize()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting\n boolean mergeBars() {\n Preconditions.checkState(bars.size() > 1, \"Need at least two bars to merge\");\n // pairwise search for the two bars with the smallest summed count\n int currIdx = 0;\n Bar currBar = bars.get(currIdx);\n Bar nextBar = bars.get(currIdx + 1);\n long currMinSum = Long.MAX_VALUE;\n int currMinIdx = currIdx; // keep this for fast removal from ArrayList later\n Pair<Bar, Bar> minBars = new Pair<>(currBar, nextBar);\n while (nextBar != null) {\n long sum = currBar.getSize() + nextBar.getSize();\n if (sum < currMinSum) {\n currMinSum = sum;\n minBars = new Pair<>(currBar, nextBar);\n currMinIdx = currIdx;\n }\n currBar = nextBar;\n nextBar = ++currIdx < bars.size() - 1 ? bars.get(currIdx+1) : null;\n }\n // don't want to merge bars into one that will just need an immediate split again\n if (currMinSum >= getMaxBarSize()) {\n return false;\n }\n // do the merge\n Bar leftBar = minBars.getFirst();\n Bar rightBar = minBars.getSecond();\n Bar newBar = new Bar(leftBar.getLeftBoundInclusive(), rightBar.getRightBoundExclusive());\n if (leftBar.getSize() >= rightBar.getSize()) {\n newBar.incrementCount(rightBar.getCount()); // count of rightBar without its blocked bars\n // this just adds the leftBar without its blocked bars, as we don't want nested blocked bars\n // the leftBar's blocked bars are added later below\n newBar.addBlockedBar(new Bar(leftBar));\n } else {\n newBar.incrementCount(leftBar.getCount());\n newBar.addBlockedBar(new Bar(rightBar));\n }\n newBar.addBlockedBars(leftBar.getBlockedBars());\n newBar.addBlockedBars(rightBar.getBlockedBars());\n bars.subList(currMinIdx, currMinIdx + 2).clear(); // remove minBars\n bars.add(newBar);\n Collections.sort(bars);\n if (LOGGER.isTraceEnabled()) {\n LOGGER.trace(String.format(\"Merged left=%s , right=%s , newBar=%s\", leftBar, rightBar, newBar));\n }\n return true;\n }",
"class_method_signature": "EquiDepthStreamHistogram.mergeBars()",
"constructor": false,
"full_signature": "@VisibleForTesting boolean mergeBars()",
"identifier": "mergeBars",
"invocations": [
"checkState",
"size",
"get",
"get",
"getSize",
"getSize",
"size",
"get",
"getMaxBarSize",
"getFirst",
"getSecond",
"getLeftBoundInclusive",
"getRightBoundExclusive",
"getSize",
"getSize",
"incrementCount",
"getCount",
"addBlockedBar",
"incrementCount",
"getCount",
"addBlockedBar",
"addBlockedBars",
"getBlockedBars",
"addBlockedBars",
"getBlockedBars",
"clear",
"subList",
"add",
"sort",
"isTraceEnabled",
"trace",
"format"
],
"modifiers": "@VisibleForTesting",
"parameters": "()",
"return": "boolean",
"signature": "boolean mergeBars()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_118 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/hbase/index/util/TestIndexManagementUtil.java",
"identifier": "TestIndexManagementUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalStateException.class)\n public void testCompressedWALWithHLogReader() throws Exception {\n Configuration conf = new Configuration(false);\n conf.setBoolean(HConstants.ENABLE_WAL_COMPRESSION, true);\n // works with WALEditcodec\n conf.set(IndexManagementUtil.HLOG_READER_IMPL_KEY, IndexedHLogReader.class.getName());\n IndexManagementUtil.ensureMutableIndexingCorrectlyConfigured(conf);\n }",
"class_method_signature": "TestIndexManagementUtil.testCompressedWALWithHLogReader()",
"constructor": false,
"full_signature": "@Test(expected = IllegalStateException.class) public void testCompressedWALWithHLogReader()",
"identifier": "testCompressedWALWithHLogReader",
"invocations": [
"setBoolean",
"set",
"getName",
"ensureMutableIndexingCorrectlyConfigured"
],
"modifiers": "@Test(expected = IllegalStateException.class) public",
"parameters": "()",
"return": "void",
"signature": "void testCompressedWALWithHLogReader()",
"testcase": true
} | {
"fields": [
{
"declarator": "INDEX_WAL_EDIT_CODEC_CLASS_NAME = \"org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec\"",
"modifier": "public static final",
"original_string": "public static final String INDEX_WAL_EDIT_CODEC_CLASS_NAME = \"org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec\";",
"type": "String",
"var_name": "INDEX_WAL_EDIT_CODEC_CLASS_NAME"
},
{
"declarator": "HLOG_READER_IMPL_KEY = \"hbase.regionserver.hlog.reader.impl\"",
"modifier": "public static final",
"original_string": "public static final String HLOG_READER_IMPL_KEY = \"hbase.regionserver.hlog.reader.impl\";",
"type": "String",
"var_name": "HLOG_READER_IMPL_KEY"
},
{
"declarator": "WAL_EDIT_CODEC_CLASS_KEY = \"hbase.regionserver.wal.codec\"",
"modifier": "public static final",
"original_string": "public static final String WAL_EDIT_CODEC_CLASS_KEY = \"hbase.regionserver.wal.codec\";",
"type": "String",
"var_name": "WAL_EDIT_CODEC_CLASS_KEY"
},
{
"declarator": "INDEX_HLOG_READER_CLASS_NAME = \"org.apache.hadoop.hbase.regionserver.wal.IndexedHLogReader\"",
"modifier": "private static final",
"original_string": "private static final String INDEX_HLOG_READER_CLASS_NAME = \"org.apache.hadoop.hbase.regionserver.wal.IndexedHLogReader\";",
"type": "String",
"var_name": "INDEX_HLOG_READER_CLASS_NAME"
},
{
"declarator": "LOGGER = LoggerFactory.getLogger(IndexManagementUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(IndexManagementUtil.class);",
"type": "Logger",
"var_name": "LOGGER"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/hbase/index/util/IndexManagementUtil.java",
"identifier": "IndexManagementUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "IndexManagementUtil.IndexManagementUtil()",
"constructor": true,
"full_signature": "private IndexManagementUtil()",
"identifier": "IndexManagementUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " IndexManagementUtil()",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.isWALEditCodecSet(Configuration conf)",
"constructor": false,
"full_signature": "public static boolean isWALEditCodecSet(Configuration conf)",
"identifier": "isWALEditCodecSet",
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "boolean",
"signature": "boolean isWALEditCodecSet(Configuration conf)",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.ensureMutableIndexingCorrectlyConfigured(Configuration conf)",
"constructor": false,
"full_signature": "public static void ensureMutableIndexingCorrectlyConfigured(Configuration conf)",
"identifier": "ensureMutableIndexingCorrectlyConfigured",
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "void",
"signature": "void ensureMutableIndexingCorrectlyConfigured(Configuration conf)",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.createGetterFromScanner(CoveredDeleteScanner scanner, byte[] currentRow)",
"constructor": false,
"full_signature": "public static ValueGetter createGetterFromScanner(CoveredDeleteScanner scanner, byte[] currentRow)",
"identifier": "createGetterFromScanner",
"modifiers": "public static",
"parameters": "(CoveredDeleteScanner scanner, byte[] currentRow)",
"return": "ValueGetter",
"signature": "ValueGetter createGetterFromScanner(CoveredDeleteScanner scanner, byte[] currentRow)",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.updateMatchesColumns(Collection<KeyValue> update, List<ColumnReference> columns)",
"constructor": false,
"full_signature": "public static boolean updateMatchesColumns(Collection<KeyValue> update, List<ColumnReference> columns)",
"identifier": "updateMatchesColumns",
"modifiers": "public static",
"parameters": "(Collection<KeyValue> update, List<ColumnReference> columns)",
"return": "boolean",
"signature": "boolean updateMatchesColumns(Collection<KeyValue> update, List<ColumnReference> columns)",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.columnMatchesUpdate(List<ColumnReference> columns, Collection<KeyValue> update)",
"constructor": false,
"full_signature": "public static boolean columnMatchesUpdate(List<ColumnReference> columns, Collection<KeyValue> update)",
"identifier": "columnMatchesUpdate",
"modifiers": "public static",
"parameters": "(List<ColumnReference> columns, Collection<KeyValue> update)",
"return": "boolean",
"signature": "boolean columnMatchesUpdate(List<ColumnReference> columns, Collection<KeyValue> update)",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.newLocalStateScan(List<? extends Iterable<? extends ColumnReference>> refsArray)",
"constructor": false,
"full_signature": "public static Scan newLocalStateScan(List<? extends Iterable<? extends ColumnReference>> refsArray)",
"identifier": "newLocalStateScan",
"modifiers": "public static",
"parameters": "(List<? extends Iterable<? extends ColumnReference>> refsArray)",
"return": "Scan",
"signature": "Scan newLocalStateScan(List<? extends Iterable<? extends ColumnReference>> refsArray)",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.newLocalStateScan(Scan scan, List<? extends Iterable<? extends ColumnReference>> refsArray)",
"constructor": false,
"full_signature": "public static Scan newLocalStateScan(Scan scan, List<? extends Iterable<? extends ColumnReference>> refsArray)",
"identifier": "newLocalStateScan",
"modifiers": "public static",
"parameters": "(Scan scan, List<? extends Iterable<? extends ColumnReference>> refsArray)",
"return": "Scan",
"signature": "Scan newLocalStateScan(Scan scan, List<? extends Iterable<? extends ColumnReference>> refsArray)",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.rethrowIndexingException(Throwable e)",
"constructor": false,
"full_signature": "public static void rethrowIndexingException(Throwable e)",
"identifier": "rethrowIndexingException",
"modifiers": "public static",
"parameters": "(Throwable e)",
"return": "void",
"signature": "void rethrowIndexingException(Throwable e)",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.setIfNotSet(Configuration conf, String key, int value)",
"constructor": false,
"full_signature": "public static void setIfNotSet(Configuration conf, String key, int value)",
"identifier": "setIfNotSet",
"modifiers": "public static",
"parameters": "(Configuration conf, String key, int value)",
"return": "void",
"signature": "void setIfNotSet(Configuration conf, String key, int value)",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.createTimestampBatchesFromKeyValues(Collection<KeyValue> kvs, Map<Long, Batch> batches)",
"constructor": false,
"full_signature": "public static void createTimestampBatchesFromKeyValues(Collection<KeyValue> kvs, Map<Long, Batch> batches)",
"identifier": "createTimestampBatchesFromKeyValues",
"modifiers": "public static",
"parameters": "(Collection<KeyValue> kvs, Map<Long, Batch> batches)",
"return": "void",
"signature": "void createTimestampBatchesFromKeyValues(Collection<KeyValue> kvs, Map<Long, Batch> batches)",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.createTimestampBatchesFromMutation(Mutation m)",
"constructor": false,
"full_signature": "public static Collection<Batch> createTimestampBatchesFromMutation(Mutation m)",
"identifier": "createTimestampBatchesFromMutation",
"modifiers": "public static",
"parameters": "(Mutation m)",
"return": "Collection<Batch>",
"signature": "Collection<Batch> createTimestampBatchesFromMutation(Mutation m)",
"testcase": false
},
{
"class_method_signature": "IndexManagementUtil.flattenMutationsByTimestamp(Collection<? extends Mutation> mutations)",
"constructor": false,
"full_signature": "public static Collection<? extends Mutation> flattenMutationsByTimestamp(Collection<? extends Mutation> mutations)",
"identifier": "flattenMutationsByTimestamp",
"modifiers": "public static",
"parameters": "(Collection<? extends Mutation> mutations)",
"return": "Collection<? extends Mutation>",
"signature": "Collection<? extends Mutation> flattenMutationsByTimestamp(Collection<? extends Mutation> mutations)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static void ensureMutableIndexingCorrectlyConfigured(Configuration conf) throws IllegalStateException {\n\n // check to see if the WALEditCodec is installed\n if (isWALEditCodecSet(conf)) { return; }\n\n // otherwise, we have to install the indexedhlogreader, but it cannot have compression\n String codecClass = INDEX_WAL_EDIT_CODEC_CLASS_NAME;\n String indexLogReaderName = INDEX_HLOG_READER_CLASS_NAME;\n try {\n // Use reflection to load the IndexedHLogReader, since it may not load with an older version\n // of HBase\n Class.forName(indexLogReaderName);\n } catch (ClassNotFoundException e) {\n throw new IllegalStateException(codecClass + \" is not installed, but \"\n + indexLogReaderName + \" hasn't been installed in hbase-site.xml under \" + HLOG_READER_IMPL_KEY);\n }\n if (indexLogReaderName.equals(conf.get(HLOG_READER_IMPL_KEY, indexLogReaderName))) {\n if (conf.getBoolean(HConstants.ENABLE_WAL_COMPRESSION, false)) { throw new IllegalStateException(\n \"WAL Compression is only supported with \" + codecClass\n + \". You can install in hbase-site.xml, under \" + WALCellCodec.WAL_CELL_CODEC_CLASS_KEY);\n }\n } else {\n throw new IllegalStateException(codecClass + \" is not installed, but \"\n + indexLogReaderName + \" hasn't been installed in hbase-site.xml under \" + HLOG_READER_IMPL_KEY);\n }\n\n }",
"class_method_signature": "IndexManagementUtil.ensureMutableIndexingCorrectlyConfigured(Configuration conf)",
"constructor": false,
"full_signature": "public static void ensureMutableIndexingCorrectlyConfigured(Configuration conf)",
"identifier": "ensureMutableIndexingCorrectlyConfigured",
"invocations": [
"isWALEditCodecSet",
"forName",
"equals",
"get",
"getBoolean"
],
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "void",
"signature": "void ensureMutableIndexingCorrectlyConfigured(Configuration conf)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_159 | {
"fields": [
{
"declarator": "TABLE_NAME = TableName.create(null,\"TABLE1\")",
"modifier": "private static",
"original_string": "private static TableName TABLE_NAME = TableName.create(null,\"TABLE1\");",
"type": "TableName",
"var_name": "TABLE_NAME"
},
{
"declarator": "offsetCompiler",
"modifier": "",
"original_string": "RVCOffsetCompiler offsetCompiler;",
"type": "RVCOffsetCompiler",
"var_name": "offsetCompiler"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/compile/RVCOffsetCompilerTest.java",
"identifier": "RVCOffsetCompilerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void buildListOfRowKeyColumnExpressionsSingleNodeIsNullTest() throws Exception {\n List<Expression> expressions = new ArrayList<>();\n\n RowKeyColumnExpression rvc = new RowKeyColumnExpression();\n\n IsNullExpression expression = mock(IsNullExpression.class);\n\n Mockito.when(expression.getChildren()).thenReturn(Lists.<Expression>newArrayList(rvc));\n\n RVCOffsetCompiler.RowKeyColumnExpressionOutput output = offsetCompiler.buildListOfRowKeyColumnExpressions(expression, false);\n\n List<RowKeyColumnExpression> result = output.getRowKeyColumnExpressions();\n\n assertEquals(1,result.size());\n assertEquals(rvc,result.get(0));\n\n assertTrue(output.isTrailingNull());\n }",
"class_method_signature": "RVCOffsetCompilerTest.buildListOfRowKeyColumnExpressionsSingleNodeIsNullTest()",
"constructor": false,
"full_signature": "@Test public void buildListOfRowKeyColumnExpressionsSingleNodeIsNullTest()",
"identifier": "buildListOfRowKeyColumnExpressionsSingleNodeIsNullTest",
"invocations": [
"mock",
"thenReturn",
"when",
"getChildren",
"newArrayList",
"buildListOfRowKeyColumnExpressions",
"getRowKeyColumnExpressions",
"assertEquals",
"size",
"assertEquals",
"get",
"assertTrue",
"isTrailingNull"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void buildListOfRowKeyColumnExpressionsSingleNodeIsNullTest()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class)",
"modifier": "private final static",
"original_string": "private final static Logger LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "INSTANCE = new RVCOffsetCompiler()",
"modifier": "private final static",
"original_string": "private final static RVCOffsetCompiler INSTANCE = new RVCOffsetCompiler();",
"type": "RVCOffsetCompiler",
"var_name": "INSTANCE"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/compile/RVCOffsetCompiler.java",
"identifier": "RVCOffsetCompiler",
"interfaces": "",
"methods": [
{
"class_method_signature": "RVCOffsetCompiler.RVCOffsetCompiler()",
"constructor": true,
"full_signature": "private RVCOffsetCompiler()",
"identifier": "RVCOffsetCompiler",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " RVCOffsetCompiler()",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.getInstance()",
"constructor": false,
"full_signature": "public static RVCOffsetCompiler getInstance()",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "()",
"return": "RVCOffsetCompiler",
"signature": "RVCOffsetCompiler getInstance()",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"constructor": false,
"full_signature": "public CompiledOffset getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"identifier": "getRVCOffset",
"modifiers": "public",
"parameters": "(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"return": "CompiledOffset",
"signature": "CompiledOffset getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"identifier": "buildListOfRowKeyColumnExpressions",
"modifiers": "@VisibleForTesting",
"parameters": "(\n Expression whereExpression, boolean isIndex)",
"return": "RowKeyColumnExpressionOutput",
"signature": "RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"identifier": "buildListOfColumnParseNodes",
"modifiers": "@VisibleForTesting",
"parameters": "(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"return": "List<ColumnParseNode>",
"signature": "List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting\n RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions (\n Expression whereExpression, boolean isIndex)\n throws RowValueConstructorOffsetNotCoercibleException, RowValueConstructorOffsetInternalErrorException {\n\n boolean trailingNull = false;\n List<Expression> expressions;\n if((whereExpression instanceof AndExpression)) {\n expressions = whereExpression.getChildren();\n } else if (whereExpression instanceof ComparisonExpression || whereExpression instanceof IsNullExpression) {\n expressions = Lists.newArrayList(whereExpression);\n } else {\n LOGGER.warn(\"Unexpected error while compiling RVC Offset, expected either a Comparison/IsNull Expression of a AndExpression got \"\n + whereExpression.getClass().getName());\n throw new RowValueConstructorOffsetInternalErrorException(\n \"RVC Offset must specify the tables PKs.\");\n }\n\n List<RowKeyColumnExpression>\n rowKeyColumnExpressionList =\n new ArrayList<RowKeyColumnExpression>();\n for (int i = 0; i < expressions.size(); i++) {\n Expression child = expressions.get(i);\n if (!(child instanceof ComparisonExpression || child instanceof IsNullExpression)) {\n LOGGER.warn(\"Unexpected error while compiling RVC Offset\");\n throw new RowValueConstructorOffsetNotCoercibleException(\n \"RVC Offset must specify the tables PKs.\");\n }\n\n //if this is the last position\n if(i == expressions.size() - 1) {\n if(child instanceof IsNullExpression) {\n trailingNull = true;\n }\n }\n\n //For either case comparison/isNull the first child should be the rowkey\n Expression possibleRowKeyColumnExpression = child.getChildren().get(0);\n\n // Note that since we store indexes in variable length form there may be casts from fixed types to\n // variable length\n if (isIndex) {\n if (possibleRowKeyColumnExpression instanceof CoerceExpression) {\n // Cast today has 1 child\n possibleRowKeyColumnExpression =\n ((CoerceExpression) possibleRowKeyColumnExpression).getChild();\n }\n }\n\n if (!(possibleRowKeyColumnExpression instanceof RowKeyColumnExpression)) {\n LOGGER.warn(\"Unexpected error while compiling RVC Offset\");\n throw new RowValueConstructorOffsetNotCoercibleException(\n \"RVC Offset must specify the tables PKs.\");\n }\n rowKeyColumnExpressionList.add((RowKeyColumnExpression) possibleRowKeyColumnExpression);\n }\n return new RowKeyColumnExpressionOutput(rowKeyColumnExpressionList,trailingNull);\n }",
"class_method_signature": "RVCOffsetCompiler.buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"identifier": "buildListOfRowKeyColumnExpressions",
"invocations": [
"getChildren",
"newArrayList",
"warn",
"getName",
"getClass",
"size",
"get",
"warn",
"size",
"get",
"getChildren",
"getChild",
"warn",
"add"
],
"modifiers": "@VisibleForTesting",
"parameters": "(\n Expression whereExpression, boolean isIndex)",
"return": "RowKeyColumnExpressionOutput",
"signature": "RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_158 | {
"fields": [
{
"declarator": "TABLE_NAME = TableName.create(null,\"TABLE1\")",
"modifier": "private static",
"original_string": "private static TableName TABLE_NAME = TableName.create(null,\"TABLE1\");",
"type": "TableName",
"var_name": "TABLE_NAME"
},
{
"declarator": "offsetCompiler",
"modifier": "",
"original_string": "RVCOffsetCompiler offsetCompiler;",
"type": "RVCOffsetCompiler",
"var_name": "offsetCompiler"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/compile/RVCOffsetCompilerTest.java",
"identifier": "RVCOffsetCompilerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void buildListOfRowKeyColumnExpressionsSingleNodeComparisonTest() throws Exception {\n List<Expression> expressions = new ArrayList<>();\n\n RowKeyColumnExpression rvc = new RowKeyColumnExpression();\n\n ComparisonExpression expression = mock(ComparisonExpression.class);\n\n Mockito.when(expression.getChildren()).thenReturn(Lists.<Expression>newArrayList(rvc));\n\n RVCOffsetCompiler.RowKeyColumnExpressionOutput\n output = offsetCompiler.buildListOfRowKeyColumnExpressions(expression, false);\n List<RowKeyColumnExpression>\n result = output.getRowKeyColumnExpressions();\n\n assertEquals(1,result.size());\n assertEquals(rvc,result.get(0));\n }",
"class_method_signature": "RVCOffsetCompilerTest.buildListOfRowKeyColumnExpressionsSingleNodeComparisonTest()",
"constructor": false,
"full_signature": "@Test public void buildListOfRowKeyColumnExpressionsSingleNodeComparisonTest()",
"identifier": "buildListOfRowKeyColumnExpressionsSingleNodeComparisonTest",
"invocations": [
"mock",
"thenReturn",
"when",
"getChildren",
"newArrayList",
"buildListOfRowKeyColumnExpressions",
"getRowKeyColumnExpressions",
"assertEquals",
"size",
"assertEquals",
"get"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void buildListOfRowKeyColumnExpressionsSingleNodeComparisonTest()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class)",
"modifier": "private final static",
"original_string": "private final static Logger LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "INSTANCE = new RVCOffsetCompiler()",
"modifier": "private final static",
"original_string": "private final static RVCOffsetCompiler INSTANCE = new RVCOffsetCompiler();",
"type": "RVCOffsetCompiler",
"var_name": "INSTANCE"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/compile/RVCOffsetCompiler.java",
"identifier": "RVCOffsetCompiler",
"interfaces": "",
"methods": [
{
"class_method_signature": "RVCOffsetCompiler.RVCOffsetCompiler()",
"constructor": true,
"full_signature": "private RVCOffsetCompiler()",
"identifier": "RVCOffsetCompiler",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " RVCOffsetCompiler()",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.getInstance()",
"constructor": false,
"full_signature": "public static RVCOffsetCompiler getInstance()",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "()",
"return": "RVCOffsetCompiler",
"signature": "RVCOffsetCompiler getInstance()",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"constructor": false,
"full_signature": "public CompiledOffset getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"identifier": "getRVCOffset",
"modifiers": "public",
"parameters": "(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"return": "CompiledOffset",
"signature": "CompiledOffset getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"identifier": "buildListOfRowKeyColumnExpressions",
"modifiers": "@VisibleForTesting",
"parameters": "(\n Expression whereExpression, boolean isIndex)",
"return": "RowKeyColumnExpressionOutput",
"signature": "RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"identifier": "buildListOfColumnParseNodes",
"modifiers": "@VisibleForTesting",
"parameters": "(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"return": "List<ColumnParseNode>",
"signature": "List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting\n RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions (\n Expression whereExpression, boolean isIndex)\n throws RowValueConstructorOffsetNotCoercibleException, RowValueConstructorOffsetInternalErrorException {\n\n boolean trailingNull = false;\n List<Expression> expressions;\n if((whereExpression instanceof AndExpression)) {\n expressions = whereExpression.getChildren();\n } else if (whereExpression instanceof ComparisonExpression || whereExpression instanceof IsNullExpression) {\n expressions = Lists.newArrayList(whereExpression);\n } else {\n LOGGER.warn(\"Unexpected error while compiling RVC Offset, expected either a Comparison/IsNull Expression of a AndExpression got \"\n + whereExpression.getClass().getName());\n throw new RowValueConstructorOffsetInternalErrorException(\n \"RVC Offset must specify the tables PKs.\");\n }\n\n List<RowKeyColumnExpression>\n rowKeyColumnExpressionList =\n new ArrayList<RowKeyColumnExpression>();\n for (int i = 0; i < expressions.size(); i++) {\n Expression child = expressions.get(i);\n if (!(child instanceof ComparisonExpression || child instanceof IsNullExpression)) {\n LOGGER.warn(\"Unexpected error while compiling RVC Offset\");\n throw new RowValueConstructorOffsetNotCoercibleException(\n \"RVC Offset must specify the tables PKs.\");\n }\n\n //if this is the last position\n if(i == expressions.size() - 1) {\n if(child instanceof IsNullExpression) {\n trailingNull = true;\n }\n }\n\n //For either case comparison/isNull the first child should be the rowkey\n Expression possibleRowKeyColumnExpression = child.getChildren().get(0);\n\n // Note that since we store indexes in variable length form there may be casts from fixed types to\n // variable length\n if (isIndex) {\n if (possibleRowKeyColumnExpression instanceof CoerceExpression) {\n // Cast today has 1 child\n possibleRowKeyColumnExpression =\n ((CoerceExpression) possibleRowKeyColumnExpression).getChild();\n }\n }\n\n if (!(possibleRowKeyColumnExpression instanceof RowKeyColumnExpression)) {\n LOGGER.warn(\"Unexpected error while compiling RVC Offset\");\n throw new RowValueConstructorOffsetNotCoercibleException(\n \"RVC Offset must specify the tables PKs.\");\n }\n rowKeyColumnExpressionList.add((RowKeyColumnExpression) possibleRowKeyColumnExpression);\n }\n return new RowKeyColumnExpressionOutput(rowKeyColumnExpressionList,trailingNull);\n }",
"class_method_signature": "RVCOffsetCompiler.buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"identifier": "buildListOfRowKeyColumnExpressions",
"invocations": [
"getChildren",
"newArrayList",
"warn",
"getName",
"getClass",
"size",
"get",
"warn",
"size",
"get",
"getChildren",
"getChild",
"warn",
"add"
],
"modifiers": "@VisibleForTesting",
"parameters": "(\n Expression whereExpression, boolean isIndex)",
"return": "RowKeyColumnExpressionOutput",
"signature": "RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_119 | {
"fields": [
{
"declarator": "TEST_TABLE_STRING = \"TEST_TABLE\"",
"modifier": "private static final",
"original_string": "private static final String TEST_TABLE_STRING = \"TEST_TABLE\";",
"type": "String",
"var_name": "TEST_TABLE_STRING"
},
{
"declarator": "TEST_TABLE_DDL = \"CREATE TABLE IF NOT EXISTS \" +\n TEST_TABLE_STRING + \" (\\n\" +\n \" ORGANIZATION_ID CHAR(4) NOT NULL,\\n\" +\n \" ENTITY_ID CHAR(7) NOT NULL,\\n\" +\n \" SCORE INTEGER,\\n\" +\n \" LAST_UPDATE_TIME TIMESTAMP\\n\" +\n \" CONSTRAINT TEST_TABLE_PK PRIMARY KEY (\\n\" +\n \" ORGANIZATION_ID,\\n\" +\n \" ENTITY_ID\\n\" +\n \" )\\n\" +\n \") VERSIONS=1, MULTI_TENANT=TRUE\"",
"modifier": "private static final",
"original_string": "private static final String TEST_TABLE_DDL = \"CREATE TABLE IF NOT EXISTS \" +\n TEST_TABLE_STRING + \" (\\n\" +\n \" ORGANIZATION_ID CHAR(4) NOT NULL,\\n\" +\n \" ENTITY_ID CHAR(7) NOT NULL,\\n\" +\n \" SCORE INTEGER,\\n\" +\n \" LAST_UPDATE_TIME TIMESTAMP\\n\" +\n \" CONSTRAINT TEST_TABLE_PK PRIMARY KEY (\\n\" +\n \" ORGANIZATION_ID,\\n\" +\n \" ENTITY_ID\\n\" +\n \" )\\n\" +\n \") VERSIONS=1, MULTI_TENANT=TRUE\";",
"type": "String",
"var_name": "TEST_TABLE_DDL"
},
{
"declarator": "TEST_TABLE_INDEX_STRING = \"TEST_TABLE_SCORE\"",
"modifier": "private static final",
"original_string": "private static final String TEST_TABLE_INDEX_STRING = \"TEST_TABLE_SCORE\";",
"type": "String",
"var_name": "TEST_TABLE_INDEX_STRING"
},
{
"declarator": "TEST_TABLE_INDEX_DDL = \"CREATE INDEX IF NOT EXISTS \" +\n TEST_TABLE_INDEX_STRING\n + \" ON \" + TEST_TABLE_STRING + \" (SCORE DESC, ENTITY_ID DESC)\"",
"modifier": "private static final",
"original_string": "private static final String TEST_TABLE_INDEX_DDL = \"CREATE INDEX IF NOT EXISTS \" +\n TEST_TABLE_INDEX_STRING\n + \" ON \" + TEST_TABLE_STRING + \" (SCORE DESC, ENTITY_ID DESC)\";",
"type": "String",
"var_name": "TEST_TABLE_INDEX_DDL"
},
{
"declarator": "ROW = Bytes.toBytes(\"org1entity1\")",
"modifier": "private static final",
"original_string": "private static final byte[] ROW = Bytes.toBytes(\"org1entity1\");",
"type": "byte[]",
"var_name": "ROW"
},
{
"declarator": "FAM_STRING = QueryConstants.DEFAULT_COLUMN_FAMILY",
"modifier": "private static final",
"original_string": "private static final String FAM_STRING = QueryConstants.DEFAULT_COLUMN_FAMILY;",
"type": "String",
"var_name": "FAM_STRING"
},
{
"declarator": "FAM = Bytes.toBytes(FAM_STRING)",
"modifier": "private static final",
"original_string": "private static final byte[] FAM = Bytes.toBytes(FAM_STRING);",
"type": "byte[]",
"var_name": "FAM"
},
{
"declarator": "INDEXED_QUALIFIER = Bytes.toBytes(\"SCORE\")",
"modifier": "private static final",
"original_string": "private static final byte[] INDEXED_QUALIFIER = Bytes.toBytes(\"SCORE\");",
"type": "byte[]",
"var_name": "INDEXED_QUALIFIER"
},
{
"declarator": "VALUE_1 = Bytes.toBytes(111)",
"modifier": "private static final",
"original_string": "private static final byte[] VALUE_1 = Bytes.toBytes(111);",
"type": "byte[]",
"var_name": "VALUE_1"
},
{
"declarator": "VALUE_2 = Bytes.toBytes(222)",
"modifier": "private static final",
"original_string": "private static final byte[] VALUE_2 = Bytes.toBytes(222);",
"type": "byte[]",
"var_name": "VALUE_2"
},
{
"declarator": "VALUE_3 = Bytes.toBytes(333)",
"modifier": "private static final",
"original_string": "private static final byte[] VALUE_3 = Bytes.toBytes(333);",
"type": "byte[]",
"var_name": "VALUE_3"
},
{
"declarator": "VALUE_4 = Bytes.toBytes(444)",
"modifier": "private static final",
"original_string": "private static final byte[] VALUE_4 = Bytes.toBytes(444);",
"type": "byte[]",
"var_name": "VALUE_4"
},
{
"declarator": "indexBuilder",
"modifier": "private",
"original_string": "private NonTxIndexBuilder indexBuilder;",
"type": "NonTxIndexBuilder",
"var_name": "indexBuilder"
},
{
"declarator": "mockIndexMetaData",
"modifier": "private",
"original_string": "private PhoenixIndexMetaData mockIndexMetaData;",
"type": "PhoenixIndexMetaData",
"var_name": "mockIndexMetaData"
},
{
"declarator": "currentRowCells",
"modifier": "private",
"original_string": "private List<Cell> currentRowCells;",
"type": "List<Cell>",
"var_name": "currentRowCells"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilderTest.java",
"identifier": "NonTxIndexBuilderTest",
"interfaces": "",
"superclass": "extends BaseConnectionlessQueryTest"
} | {
"body": "@Test\n public void testGetMutableIndexUpdate() throws IOException {\n setCurrentRowState(FAM, INDEXED_QUALIFIER, 1, VALUE_1);\n\n // update ts and value\n Put put = new Put(ROW);\n put.addImmutable(FAM, INDEXED_QUALIFIER, 2, VALUE_2);\n MultiMutation mutation = new MultiMutation(new ImmutableBytesPtr(ROW));\n mutation.addAll(put);\n\n CachedLocalTable cachedLocalTable = CachedLocalTable.build(\n Collections.singletonList(mutation),\n this.mockIndexMetaData,\n this.indexBuilder.getEnv().getRegion());\n\n Collection<Pair<Mutation, byte[]>> indexUpdates =\n indexBuilder.getIndexUpdate(mutation, mockIndexMetaData, cachedLocalTable);\n assertEquals(2, indexUpdates.size());\n assertContains(indexUpdates, 2, ROW, KeyValue.Type.DeleteFamily, FAM,\n new byte[0] /* qual not needed */, 2);\n assertContains(indexUpdates, ColumnTracker.NO_NEWER_PRIMARY_TABLE_ENTRY_TIMESTAMP, ROW,\n KeyValue.Type.Put, FAM, QueryConstants.EMPTY_COLUMN_BYTES, 2);\n }",
"class_method_signature": "NonTxIndexBuilderTest.testGetMutableIndexUpdate()",
"constructor": false,
"full_signature": "@Test public void testGetMutableIndexUpdate()",
"identifier": "testGetMutableIndexUpdate",
"invocations": [
"setCurrentRowState",
"addImmutable",
"addAll",
"build",
"singletonList",
"getRegion",
"getEnv",
"getIndexUpdate",
"assertEquals",
"size",
"assertContains",
"assertContains"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetMutableIndexUpdate()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(NonTxIndexBuilder.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NonTxIndexBuilder.class);",
"type": "Logger",
"var_name": "LOGGER"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java",
"identifier": "NonTxIndexBuilder",
"interfaces": "",
"methods": [
{
"class_method_signature": "NonTxIndexBuilder.setup(RegionCoprocessorEnvironment env)",
"constructor": false,
"full_signature": "@Override public void setup(RegionCoprocessorEnvironment env)",
"identifier": "setup",
"modifiers": "@Override public",
"parameters": "(RegionCoprocessorEnvironment env)",
"return": "void",
"signature": "void setup(RegionCoprocessorEnvironment env)",
"testcase": false
},
{
"class_method_signature": "NonTxIndexBuilder.getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData, LocalHBaseState localHBaseState)",
"constructor": false,
"full_signature": "@Override public Collection<Pair<Mutation, byte[]>> getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData, LocalHBaseState localHBaseState)",
"identifier": "getIndexUpdate",
"modifiers": "@Override public",
"parameters": "(Mutation mutation, IndexMetaData indexMetaData, LocalHBaseState localHBaseState)",
"return": "Collection<Pair<Mutation, byte[]>>",
"signature": "Collection<Pair<Mutation, byte[]>> getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData, LocalHBaseState localHBaseState)",
"testcase": false
},
{
"class_method_signature": "NonTxIndexBuilder.batchMutationAndAddUpdates(IndexUpdateManager manager, LocalTableState state, Mutation m, IndexMetaData indexMetaData)",
"constructor": false,
"full_signature": "private void batchMutationAndAddUpdates(IndexUpdateManager manager, LocalTableState state, Mutation m, IndexMetaData indexMetaData)",
"identifier": "batchMutationAndAddUpdates",
"modifiers": "private",
"parameters": "(IndexUpdateManager manager, LocalTableState state, Mutation m, IndexMetaData indexMetaData)",
"return": "void",
"signature": "void batchMutationAndAddUpdates(IndexUpdateManager manager, LocalTableState state, Mutation m, IndexMetaData indexMetaData)",
"testcase": false
},
{
"class_method_signature": "NonTxIndexBuilder.addMutationsForBatch(IndexUpdateManager updateMap, Batch batch, LocalTableState state,\n IndexMetaData indexMetaData)",
"constructor": false,
"full_signature": "private boolean addMutationsForBatch(IndexUpdateManager updateMap, Batch batch, LocalTableState state,\n IndexMetaData indexMetaData)",
"identifier": "addMutationsForBatch",
"modifiers": "private",
"parameters": "(IndexUpdateManager updateMap, Batch batch, LocalTableState state,\n IndexMetaData indexMetaData)",
"return": "boolean",
"signature": "boolean addMutationsForBatch(IndexUpdateManager updateMap, Batch batch, LocalTableState state,\n IndexMetaData indexMetaData)",
"testcase": false
},
{
"class_method_signature": "NonTxIndexBuilder.addUpdateForGivenTimestamp(long ts, LocalTableState state, IndexUpdateManager updateMap, IndexMetaData indexMetaData)",
"constructor": false,
"full_signature": "private long addUpdateForGivenTimestamp(long ts, LocalTableState state, IndexUpdateManager updateMap, IndexMetaData indexMetaData)",
"identifier": "addUpdateForGivenTimestamp",
"modifiers": "private",
"parameters": "(long ts, LocalTableState state, IndexUpdateManager updateMap, IndexMetaData indexMetaData)",
"return": "long",
"signature": "long addUpdateForGivenTimestamp(long ts, LocalTableState state, IndexUpdateManager updateMap, IndexMetaData indexMetaData)",
"testcase": false
},
{
"class_method_signature": "NonTxIndexBuilder.addCleanupForCurrentBatch(IndexUpdateManager updateMap, long batchTs, LocalTableState state, IndexMetaData indexMetaData)",
"constructor": false,
"full_signature": "private void addCleanupForCurrentBatch(IndexUpdateManager updateMap, long batchTs, LocalTableState state, IndexMetaData indexMetaData)",
"identifier": "addCleanupForCurrentBatch",
"modifiers": "private",
"parameters": "(IndexUpdateManager updateMap, long batchTs, LocalTableState state, IndexMetaData indexMetaData)",
"return": "void",
"signature": "void addCleanupForCurrentBatch(IndexUpdateManager updateMap, long batchTs, LocalTableState state, IndexMetaData indexMetaData)",
"testcase": false
},
{
"class_method_signature": "NonTxIndexBuilder.addCurrentStateMutationsForBatch(IndexUpdateManager updateMap, LocalTableState state, IndexMetaData indexMetaData)",
"constructor": false,
"full_signature": "private long addCurrentStateMutationsForBatch(IndexUpdateManager updateMap, LocalTableState state, IndexMetaData indexMetaData)",
"identifier": "addCurrentStateMutationsForBatch",
"modifiers": "private",
"parameters": "(IndexUpdateManager updateMap, LocalTableState state, IndexMetaData indexMetaData)",
"return": "long",
"signature": "long addCurrentStateMutationsForBatch(IndexUpdateManager updateMap, LocalTableState state, IndexMetaData indexMetaData)",
"testcase": false
},
{
"class_method_signature": "NonTxIndexBuilder.addDeleteUpdatesToMap(IndexUpdateManager updateMap, LocalTableState state, long ts, IndexMetaData indexMetaData)",
"constructor": false,
"full_signature": "protected void addDeleteUpdatesToMap(IndexUpdateManager updateMap, LocalTableState state, long ts, IndexMetaData indexMetaData)",
"identifier": "addDeleteUpdatesToMap",
"modifiers": "protected",
"parameters": "(IndexUpdateManager updateMap, LocalTableState state, long ts, IndexMetaData indexMetaData)",
"return": "void",
"signature": "void addDeleteUpdatesToMap(IndexUpdateManager updateMap, LocalTableState state, long ts, IndexMetaData indexMetaData)",
"testcase": false
},
{
"class_method_signature": "NonTxIndexBuilder.getIndexUpdateForFilteredRows(Collection<Cell> filtered, IndexMetaData indexMetaData)",
"constructor": false,
"full_signature": "@Override public Collection<Pair<Mutation, byte[]>> getIndexUpdateForFilteredRows(Collection<Cell> filtered, IndexMetaData indexMetaData)",
"identifier": "getIndexUpdateForFilteredRows",
"modifiers": "@Override public",
"parameters": "(Collection<Cell> filtered, IndexMetaData indexMetaData)",
"return": "Collection<Pair<Mutation, byte[]>>",
"signature": "Collection<Pair<Mutation, byte[]>> getIndexUpdateForFilteredRows(Collection<Cell> filtered, IndexMetaData indexMetaData)",
"testcase": false
}
],
"superclass": "extends BaseIndexBuilder"
} | {
"body": "@Override\n public Collection<Pair<Mutation, byte[]>> getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData, LocalHBaseState localHBaseState) throws IOException {\n \t// create a state manager, so we can manage each batch\n LocalTableState state = new LocalTableState(localHBaseState, mutation);\n // build the index updates for each group\n IndexUpdateManager manager = new IndexUpdateManager(indexMetaData);\n\n batchMutationAndAddUpdates(manager, state, mutation, indexMetaData);\n\n if (LOGGER.isTraceEnabled()) {\n LOGGER.trace(\"Found index updates for Mutation: \" + mutation + \"\\n\" + manager);\n }\n\n return manager.toMap();\n }",
"class_method_signature": "NonTxIndexBuilder.getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData, LocalHBaseState localHBaseState)",
"constructor": false,
"full_signature": "@Override public Collection<Pair<Mutation, byte[]>> getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData, LocalHBaseState localHBaseState)",
"identifier": "getIndexUpdate",
"invocations": [
"batchMutationAndAddUpdates",
"isTraceEnabled",
"trace",
"toMap"
],
"modifiers": "@Override public",
"parameters": "(Mutation mutation, IndexMetaData indexMetaData, LocalHBaseState localHBaseState)",
"return": "Collection<Pair<Mutation, byte[]>>",
"signature": "Collection<Pair<Mutation, byte[]>> getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData, LocalHBaseState localHBaseState)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_162 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/cache/JodaTimezoneCacheTest.java",
"identifier": "JodaTimezoneCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetInstanceByteBufferUTC() {\n DateTimeZone instance = JodaTimezoneCache.getInstance(ByteBuffer.wrap(Bytes.toBytes(\"UTC\")));\n assertNotNull(instance);\n }",
"class_method_signature": "JodaTimezoneCacheTest.testGetInstanceByteBufferUTC()",
"constructor": false,
"full_signature": "@Test public void testGetInstanceByteBufferUTC()",
"identifier": "testGetInstanceByteBufferUTC",
"invocations": [
"getInstance",
"wrap",
"toBytes",
"assertNotNull"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetInstanceByteBufferUTC()",
"testcase": true
} | {
"fields": [
{
"declarator": "CACHE_EXPRIRE_TIME_MINUTES = 10",
"modifier": "public static final",
"original_string": "public static final int CACHE_EXPRIRE_TIME_MINUTES = 10;",
"type": "int",
"var_name": "CACHE_EXPRIRE_TIME_MINUTES"
},
{
"declarator": "cachedJodaTimeZones = createTimezoneCache()",
"modifier": "private static final",
"original_string": "private static final LoadingCache<ByteBuffer, DateTimeZone> cachedJodaTimeZones = createTimezoneCache();",
"type": "LoadingCache<ByteBuffer, DateTimeZone>",
"var_name": "cachedJodaTimeZones"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/cache/JodaTimezoneCache.java",
"identifier": "JodaTimezoneCache",
"interfaces": "",
"methods": [
{
"class_method_signature": "JodaTimezoneCache.getInstance(ByteBuffer timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ByteBuffer timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(ByteBuffer timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ByteBuffer timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.getInstance(ImmutableBytesWritable timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ImmutableBytesWritable timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(ImmutableBytesWritable timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ImmutableBytesWritable timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.getInstance(String timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(String timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(String timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(String timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.createTimezoneCache()",
"constructor": false,
"full_signature": "private static LoadingCache<ByteBuffer, DateTimeZone> createTimezoneCache()",
"identifier": "createTimezoneCache",
"modifiers": "private static",
"parameters": "()",
"return": "LoadingCache<ByteBuffer, DateTimeZone>",
"signature": "LoadingCache<ByteBuffer, DateTimeZone> createTimezoneCache()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static DateTimeZone getInstance(ByteBuffer timezoneId) {\n try {\n return cachedJodaTimeZones.get(timezoneId);\n } catch (ExecutionException ex) {\n throw new IllegalDataException(ex);\n } catch (UncheckedExecutionException e) {\n throw new IllegalDataException(\"Unknown timezone \" + Bytes.toString(timezoneId.array()));\n }\n }",
"class_method_signature": "JodaTimezoneCache.getInstance(ByteBuffer timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ByteBuffer timezoneId)",
"identifier": "getInstance",
"invocations": [
"get",
"toString",
"array"
],
"modifiers": "public static",
"parameters": "(ByteBuffer timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ByteBuffer timezoneId)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_77 | {
"fields": [
{
"declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L",
"modifier": "private static final",
"original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;",
"type": "long",
"var_name": "ONE_HOUR_IN_MILLIS"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/DateUtilTest.java",
"identifier": "DateUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseTime() {\n assertEquals(10000L, DateUtil.parseTime(\"1970-01-01 00:00:10\").getTime());\n }",
"class_method_signature": "DateUtilTest.testParseTime()",
"constructor": false,
"full_signature": "@Test public void testParseTime()",
"identifier": "testParseTime",
"invocations": [
"assertEquals",
"getTime",
"parseTime"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testParseTime()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";",
"type": "String",
"var_name": "DEFAULT_TIME_ZONE_ID"
},
{
"declarator": "LOCAL_TIME_ZONE_ID = \"LOCAL\"",
"modifier": "public static final",
"original_string": "public static final String LOCAL_TIME_ZONE_ID = \"LOCAL\";",
"type": "String",
"var_name": "LOCAL_TIME_ZONE_ID"
},
{
"declarator": "DEFAULT_TIME_ZONE = TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID)",
"modifier": "private static final",
"original_string": "private static final TimeZone DEFAULT_TIME_ZONE = TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID);",
"type": "TimeZone",
"var_name": "DEFAULT_TIME_ZONE"
},
{
"declarator": "DEFAULT_MS_DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss.SSS\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_MS_DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss.SSS\";",
"type": "String",
"var_name": "DEFAULT_MS_DATE_FORMAT"
},
{
"declarator": "DEFAULT_MS_DATE_FORMATTER = FastDateFormat.getInstance(\n DEFAULT_MS_DATE_FORMAT, TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID))",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_MS_DATE_FORMATTER = FastDateFormat.getInstance(\n DEFAULT_MS_DATE_FORMAT, TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID));",
"type": "Format",
"var_name": "DEFAULT_MS_DATE_FORMATTER"
},
{
"declarator": "DEFAULT_DATE_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_DATE_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_DATE_FORMAT"
},
{
"declarator": "DEFAULT_DATE_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_DATE_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_DATE_FORMATTER"
},
{
"declarator": "DEFAULT_TIME_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIME_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_TIME_FORMAT"
},
{
"declarator": "DEFAULT_TIME_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_TIME_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_TIME_FORMATTER"
},
{
"declarator": "DEFAULT_TIMESTAMP_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIMESTAMP_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_TIMESTAMP_FORMAT"
},
{
"declarator": "DEFAULT_TIMESTAMP_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_TIMESTAMP_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_TIMESTAMP_FORMATTER"
},
{
"declarator": "ISO_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.dateParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .appendLiteral(' ').toParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.timeParser()).toParser())\n .toFormatter().withChronology(ISOChronology.getInstanceUTC())",
"modifier": "private static final",
"original_string": "private static final DateTimeFormatter ISO_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.dateParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .appendLiteral(' ').toParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.timeParser()).toParser())\n .toFormatter().withChronology(ISOChronology.getInstanceUTC());",
"type": "DateTimeFormatter",
"var_name": "ISO_DATE_TIME_FORMATTER"
},
{
"declarator": "defaultPattern",
"modifier": "private static",
"original_string": "private static String[] defaultPattern;",
"type": "String[]",
"var_name": "defaultPattern"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/DateUtil.java",
"identifier": "DateUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "DateUtil.DateUtil()",
"constructor": true,
"full_signature": "private DateUtil()",
"identifier": "DateUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " DateUtil()",
"testcase": false
},
{
"class_method_signature": "DateUtil.getCodecFor(PDataType type)",
"constructor": false,
"full_signature": "@NonNull public static PDataCodec getCodecFor(PDataType type)",
"identifier": "getCodecFor",
"modifiers": "@NonNull public static",
"parameters": "(PDataType type)",
"return": "PDataCodec",
"signature": "PDataCodec getCodecFor(PDataType type)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimeZone(String timeZoneId)",
"constructor": false,
"full_signature": "public static TimeZone getTimeZone(String timeZoneId)",
"identifier": "getTimeZone",
"modifiers": "public static",
"parameters": "(String timeZoneId)",
"return": "TimeZone",
"signature": "TimeZone getTimeZone(String timeZoneId)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDefaultFormat(PDataType type)",
"constructor": false,
"full_signature": "private static String getDefaultFormat(PDataType type)",
"identifier": "getDefaultFormat",
"modifiers": "private static",
"parameters": "(PDataType type)",
"return": "String",
"signature": "String getDefaultFormat(PDataType type)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"constructor": false,
"full_signature": "public static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"identifier": "getDateTimeParser",
"modifiers": "public static",
"parameters": "(String pattern, PDataType pDataType, String timeZoneId)",
"return": "DateTimeParser",
"signature": "DateTimeParser getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateTimeParser(String pattern, PDataType pDataType)",
"constructor": false,
"full_signature": "public static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType)",
"identifier": "getDateTimeParser",
"modifiers": "public static",
"parameters": "(String pattern, PDataType pDataType)",
"return": "DateTimeParser",
"signature": "DateTimeParser getDateTimeParser(String pattern, PDataType pDataType)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateFormatter(String pattern)",
"constructor": false,
"full_signature": "public static Format getDateFormatter(String pattern)",
"identifier": "getDateFormatter",
"modifiers": "public static",
"parameters": "(String pattern)",
"return": "Format",
"signature": "Format getDateFormatter(String pattern)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getDateFormatter(String pattern, String timeZoneID)",
"identifier": "getDateFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getDateFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimeFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getTimeFormatter(String pattern, String timeZoneID)",
"identifier": "getTimeFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getTimeFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestampFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getTimestampFormatter(String pattern, String timeZoneID)",
"identifier": "getTimestampFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getTimestampFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseDateTime(String dateTimeValue)",
"constructor": false,
"full_signature": "private static long parseDateTime(String dateTimeValue)",
"identifier": "parseDateTime",
"modifiers": "private static",
"parameters": "(String dateTimeValue)",
"return": "long",
"signature": "long parseDateTime(String dateTimeValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseDate(String dateValue)",
"constructor": false,
"full_signature": "public static Date parseDate(String dateValue)",
"identifier": "parseDate",
"modifiers": "public static",
"parameters": "(String dateValue)",
"return": "Date",
"signature": "Date parseDate(String dateValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseTime(String timeValue)",
"constructor": false,
"full_signature": "public static Time parseTime(String timeValue)",
"identifier": "parseTime",
"modifiers": "public static",
"parameters": "(String timeValue)",
"return": "Time",
"signature": "Time parseTime(String timeValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseTimestamp(String timestampValue)",
"constructor": false,
"full_signature": "public static Timestamp parseTimestamp(String timestampValue)",
"identifier": "parseTimestamp",
"modifiers": "public static",
"parameters": "(String timestampValue)",
"return": "Timestamp",
"signature": "Timestamp parseTimestamp(String timestampValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestamp(long millis, int nanos)",
"constructor": false,
"full_signature": "public static Timestamp getTimestamp(long millis, int nanos)",
"identifier": "getTimestamp",
"modifiers": "public static",
"parameters": "(long millis, int nanos)",
"return": "Timestamp",
"signature": "Timestamp getTimestamp(long millis, int nanos)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestamp(BigDecimal bd)",
"constructor": false,
"full_signature": "public static Timestamp getTimestamp(BigDecimal bd)",
"identifier": "getTimestamp",
"modifiers": "public static",
"parameters": "(BigDecimal bd)",
"return": "Timestamp",
"signature": "Timestamp getTimestamp(BigDecimal bd)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static Time parseTime(String timeValue) {\n return new Time(parseDateTime(timeValue));\n }",
"class_method_signature": "DateUtil.parseTime(String timeValue)",
"constructor": false,
"full_signature": "public static Time parseTime(String timeValue)",
"identifier": "parseTime",
"invocations": [
"parseDateTime"
],
"modifiers": "public static",
"parameters": "(String timeValue)",
"return": "Time",
"signature": "Time parseTime(String timeValue)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_98 | {
"fields": [
{
"declarator": "bytesA = Bytes.toBytes(\"a\")",
"modifier": "",
"original_string": "byte[] bytesA = Bytes.toBytes(\"a\");",
"type": "byte[]",
"var_name": "bytesA"
},
{
"declarator": "bytesB = Bytes.toBytes(\"b\")",
"modifier": "",
"original_string": "byte[] bytesB = Bytes.toBytes(\"b\");",
"type": "byte[]",
"var_name": "bytesB"
},
{
"declarator": "bytesC = Bytes.toBytes(\"c\")",
"modifier": "",
"original_string": "byte[] bytesC = Bytes.toBytes(\"c\");",
"type": "byte[]",
"var_name": "bytesC"
},
{
"declarator": "bytesD = Bytes.toBytes(\"d\")",
"modifier": "",
"original_string": "byte[] bytesD = Bytes.toBytes(\"d\");",
"type": "byte[]",
"var_name": "bytesD"
},
{
"declarator": "bytesE = Bytes.toBytes(\"e\")",
"modifier": "",
"original_string": "byte[] bytesE = Bytes.toBytes(\"e\");",
"type": "byte[]",
"var_name": "bytesE"
},
{
"declarator": "a_b",
"modifier": "",
"original_string": "Bar a_b;",
"type": "Bar",
"var_name": "a_b"
},
{
"declarator": "b_c",
"modifier": "",
"original_string": "Bar b_c;",
"type": "Bar",
"var_name": "b_c"
},
{
"declarator": "c_d",
"modifier": "",
"original_string": "Bar c_d;",
"type": "Bar",
"var_name": "c_d"
},
{
"declarator": "d_e",
"modifier": "",
"original_string": "Bar d_e;",
"type": "Bar",
"var_name": "d_e"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/EquiDepthStreamHistogramTest.java",
"identifier": "EquiDepthStreamHistogramTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetBar() {\n EquiDepthStreamHistogram histo = new EquiDepthStreamHistogram(10);\n Bar bar = histo.getBar(bytesB);\n assertTrue(Arrays.equals(bytesB, bar.getLeftBoundInclusive()));\n assertEquals(1, histo.bars.size());\n assertTrue(bar == histo.getBar(bytesB));\n assertTrue(bar == histo.getBar(bytesA));\n assertTrue(bar == histo.getBar(bytesC));\n assertEquals(1, histo.bars.size());\n assertArrayEquals(bytesA, bar.getLeftBoundInclusive());\n assertArrayEquals(bytesC, bar.getRightBoundExclusive());\n\n histo.bars = new ArrayList<Bar>();\n histo.bars.add(b_c);\n histo.bars.add(c_d);\n assertEquals(b_c, histo.getBar(bytesB));\n assertEquals(c_d, histo.getBar(bytesC));\n\n assertTrue(histo.getBar(bytesA) == b_c);\n assertTrue(histo.getBar(bytesE) == c_d);\n assertArrayEquals(bytesA, b_c.getLeftBoundInclusive());\n assertArrayEquals(bytesE, c_d.getRightBoundExclusive());\n }",
"class_method_signature": "EquiDepthStreamHistogramTest.testGetBar()",
"constructor": false,
"full_signature": "@Test public void testGetBar()",
"identifier": "testGetBar",
"invocations": [
"getBar",
"assertTrue",
"equals",
"getLeftBoundInclusive",
"assertEquals",
"size",
"assertTrue",
"getBar",
"assertTrue",
"getBar",
"assertTrue",
"getBar",
"assertEquals",
"size",
"assertArrayEquals",
"getLeftBoundInclusive",
"assertArrayEquals",
"getRightBoundExclusive",
"add",
"add",
"assertEquals",
"getBar",
"assertEquals",
"getBar",
"assertTrue",
"getBar",
"assertTrue",
"getBar",
"assertArrayEquals",
"getLeftBoundInclusive",
"assertArrayEquals",
"getRightBoundExclusive"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetBar()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(EquiDepthStreamHistogram.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EquiDepthStreamHistogram.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "MAX_COEF = 1.7",
"modifier": "private static final",
"original_string": "private static final double MAX_COEF = 1.7;",
"type": "double",
"var_name": "MAX_COEF"
},
{
"declarator": "DEFAULT_EXPANSION_FACTOR = 7",
"modifier": "private static final",
"original_string": "private static final short DEFAULT_EXPANSION_FACTOR = 7;",
"type": "short",
"var_name": "DEFAULT_EXPANSION_FACTOR"
},
{
"declarator": "numBuckets",
"modifier": "private",
"original_string": "private int numBuckets;",
"type": "int",
"var_name": "numBuckets"
},
{
"declarator": "maxBars",
"modifier": "private",
"original_string": "private int maxBars;",
"type": "int",
"var_name": "maxBars"
},
{
"declarator": "totalCount",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n long totalCount;",
"type": "long",
"var_name": "totalCount"
},
{
"declarator": "bars",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n List<Bar> bars;",
"type": "List<Bar>",
"var_name": "bars"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/EquiDepthStreamHistogram.java",
"identifier": "EquiDepthStreamHistogram",
"interfaces": "",
"methods": [
{
"class_method_signature": "EquiDepthStreamHistogram.EquiDepthStreamHistogram(int numBuckets)",
"constructor": true,
"full_signature": "public EquiDepthStreamHistogram(int numBuckets)",
"identifier": "EquiDepthStreamHistogram",
"modifiers": "public",
"parameters": "(int numBuckets)",
"return": "",
"signature": " EquiDepthStreamHistogram(int numBuckets)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.EquiDepthStreamHistogram(int numBuckets, int expansionFactor)",
"constructor": true,
"full_signature": "public EquiDepthStreamHistogram(int numBuckets, int expansionFactor)",
"identifier": "EquiDepthStreamHistogram",
"modifiers": "public",
"parameters": "(int numBuckets, int expansionFactor)",
"return": "",
"signature": " EquiDepthStreamHistogram(int numBuckets, int expansionFactor)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.addValue(byte[] value)",
"constructor": false,
"full_signature": "public void addValue(byte[] value)",
"identifier": "addValue",
"modifiers": "public",
"parameters": "(byte[] value)",
"return": "void",
"signature": "void addValue(byte[] value)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.computeBuckets()",
"constructor": false,
"full_signature": "public List<Bucket> computeBuckets()",
"identifier": "computeBuckets",
"modifiers": "public",
"parameters": "()",
"return": "List<Bucket>",
"signature": "List<Bucket> computeBuckets()",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.getTotalCount()",
"constructor": false,
"full_signature": "public long getTotalCount()",
"identifier": "getTotalCount",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long getTotalCount()",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.splitBar(Bar origBar)",
"constructor": false,
"full_signature": "@VisibleForTesting void splitBar(Bar origBar)",
"identifier": "splitBar",
"modifiers": "@VisibleForTesting",
"parameters": "(Bar origBar)",
"return": "void",
"signature": "void splitBar(Bar origBar)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.mergeBars()",
"constructor": false,
"full_signature": "@VisibleForTesting boolean mergeBars()",
"identifier": "mergeBars",
"modifiers": "@VisibleForTesting",
"parameters": "()",
"return": "boolean",
"signature": "boolean mergeBars()",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.getBar(byte[] value)",
"constructor": false,
"full_signature": "@VisibleForTesting Bar getBar(byte[] value)",
"identifier": "getBar",
"modifiers": "@VisibleForTesting",
"parameters": "(byte[] value)",
"return": "Bar",
"signature": "Bar getBar(byte[] value)",
"testcase": false
},
{
"class_method_signature": "EquiDepthStreamHistogram.getMaxBarSize()",
"constructor": false,
"full_signature": "private long getMaxBarSize()",
"identifier": "getMaxBarSize",
"modifiers": "private",
"parameters": "()",
"return": "long",
"signature": "long getMaxBarSize()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting\n Bar getBar(byte[] value) {\n Bar searchKey = new Bar(value, value);\n int searchIdx = Collections.binarySearch(this.bars, searchKey);\n if (searchIdx < 0) {\n // copy value so later changes by caller don't affect histogram results\n byte[] newBound = Bytes.copy(value);\n if (this.bars.size() == 0) {\n Bar firstBar = new Bar(newBound, newBound);\n bars.add(firstBar);\n return firstBar;\n }\n int expectedIndex = Math.abs(searchIdx + 1); // jdk binary search index\n if (expectedIndex == bars.size()) { // no bars >= value, need to extend rightBound of last bar\n Bar lastBar = bars.get(expectedIndex - 1);\n lastBar.setRightBoundExclusive(newBound); // actually inclusive for last bar\n return lastBar;\n } else { // extend leftBound of next greatest bar\n Bar nextBar = bars.get(expectedIndex);\n nextBar.setLeftBoundInclusive(newBound);\n return nextBar;\n }\n } else {\n return bars.get(searchIdx);\n }\n }",
"class_method_signature": "EquiDepthStreamHistogram.getBar(byte[] value)",
"constructor": false,
"full_signature": "@VisibleForTesting Bar getBar(byte[] value)",
"identifier": "getBar",
"invocations": [
"binarySearch",
"copy",
"size",
"add",
"abs",
"size",
"get",
"setRightBoundExclusive",
"get",
"setLeftBoundInclusive",
"get"
],
"modifiers": "@VisibleForTesting",
"parameters": "(byte[] value)",
"return": "Bar",
"signature": "Bar getBar(byte[] value)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_135 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/monitoring/MetricUtilTest.java",
"identifier": "MetricUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetMetricsStopWatchWithMetricsTrue() throws Exception {\n MetricsStopWatch metricsStopWatch = MetricUtil.getMetricsStopWatch(true,\n LogLevel.OFF, WALL_CLOCK_TIME_MS);\n assertTrue(metricsStopWatch.getMetricsEnabled());\n metricsStopWatch.start();\n\n metricsStopWatch = MetricUtil.getMetricsStopWatch(false,\n LogLevel.INFO, RESULT_SET_TIME_MS);\n assertTrue(metricsStopWatch.getMetricsEnabled());\n }",
"class_method_signature": "MetricUtilTest.testGetMetricsStopWatchWithMetricsTrue()",
"constructor": false,
"full_signature": "@Test public void testGetMetricsStopWatchWithMetricsTrue()",
"identifier": "testGetMetricsStopWatchWithMetricsTrue",
"invocations": [
"getMetricsStopWatch",
"assertTrue",
"getMetricsEnabled",
"start",
"getMetricsStopWatch",
"assertTrue",
"getMetricsEnabled"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetMetricsStopWatchWithMetricsTrue()",
"testcase": true
} | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/monitoring/MetricUtil.java",
"identifier": "MetricUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "MetricUtil.getCombinableMetric(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"constructor": false,
"full_signature": "public static CombinableMetric getCombinableMetric(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"identifier": "getCombinableMetric",
"modifiers": "public static",
"parameters": "(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"return": "CombinableMetric",
"signature": "CombinableMetric getCombinableMetric(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"testcase": false
},
{
"class_method_signature": "MetricUtil.getMetricsStopWatch(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"constructor": false,
"full_signature": "public static MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"identifier": "getMetricsStopWatch",
"modifiers": "public static",
"parameters": "(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"return": "MetricsStopWatch",
"signature": "MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type) {\n if(!type.isLoggingEnabled(connectionLogLevel) && !isRequestMetricsEnabled) {\n return new MetricsStopWatch(false); }\n return new MetricsStopWatch(true);\n }",
"class_method_signature": "MetricUtil.getMetricsStopWatch(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"constructor": false,
"full_signature": "public static MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"identifier": "getMetricsStopWatch",
"invocations": [
"isLoggingEnabled"
],
"modifiers": "public static",
"parameters": "(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"return": "MetricsStopWatch",
"signature": "MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_20 | {
"fields": [
{
"declarator": "MIN_VALUE = 1",
"modifier": "private static",
"original_string": "private static long MIN_VALUE = 1;",
"type": "long",
"var_name": "MIN_VALUE"
},
{
"declarator": "MAX_VALUE = 10",
"modifier": "private static",
"original_string": "private static long MAX_VALUE = 10;",
"type": "long",
"var_name": "MAX_VALUE"
},
{
"declarator": "CACHE_SIZE = 2",
"modifier": "private static",
"original_string": "private static long CACHE_SIZE = 2;",
"type": "long",
"var_name": "CACHE_SIZE"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/SequenceUtilTest.java",
"identifier": "SequenceUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAscendingNextValueGreaterThanMaxValue() throws SQLException {\n assertTrue(SequenceUtil.checkIfLimitReached(MAX_VALUE, MIN_VALUE, MAX_VALUE, 2/* incrementBy */, CACHE_SIZE));\n }",
"class_method_signature": "SequenceUtilTest.testAscendingNextValueGreaterThanMaxValue()",
"constructor": false,
"full_signature": "@Test public void testAscendingNextValueGreaterThanMaxValue()",
"identifier": "testAscendingNextValueGreaterThanMaxValue",
"invocations": [
"assertTrue",
"checkIfLimitReached"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testAscendingNextValueGreaterThanMaxValue()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L",
"modifier": "public static final",
"original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;",
"type": "long",
"var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/SequenceUtil.java",
"identifier": "SequenceUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(SequenceInfo info)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(SequenceInfo info)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(SequenceInfo info)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(SequenceInfo info)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isBulkAllocation(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isBulkAllocation(long numToAllocate)",
"identifier": "isBulkAllocation",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isBulkAllocation(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isCycleAllowed(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isCycleAllowed(long numToAllocate)",
"identifier": "isCycleAllowed",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isCycleAllowed(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"constructor": false,
"full_signature": "public static SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"identifier": "getException",
"modifiers": "public static",
"parameters": "(String schemaName, String tableName,\n SQLExceptionCode code)",
"return": "SQLException",
"signature": "SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getLimitReachedErrorCode(boolean increasingSeq)",
"constructor": false,
"full_signature": "public static SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"identifier": "getLimitReachedErrorCode",
"modifiers": "public static",
"parameters": "(boolean increasingSeq)",
"return": "SQLExceptionCode",
"signature": "SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for overflow \n try {\n long incrementValue;\n if (isBulkAllocation(numToAllocate)) {\n // For bulk allocation we increment independent of cache size\n incrementValue = LongMath.checkedMultiply(incrementBy, numToAllocate);\n } else {\n incrementValue = LongMath.checkedMultiply(incrementBy, cacheSize);\n }\n nextValue = LongMath.checkedAdd(currentValue, incrementValue);\n } catch (ArithmeticException e) {\n return true;\n }\n\n // check if limit was reached\n\t\tif ((increasingSeq && nextValue > maxValue)\n\t\t\t\t|| (!increasingSeq && nextValue < minValue)) {\n return true;\n }\n return false;\n }",
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"invocations": [
"isBulkAllocation",
"checkedMultiply",
"checkedMultiply",
"checkedAdd"
],
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_5 | {
"fields": [
{
"declarator": "generator",
"modifier": "",
"original_string": "SequentialIntegerDataGenerator generator;",
"type": "SequentialIntegerDataGenerator",
"var_name": "generator"
}
],
"file": "phoenix-pherf/src/test/java/org/apache/phoenix/pherf/rules/SequentialIntegerDataGeneratorTest.java",
"identifier": "SequentialIntegerDataGeneratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetDataValue() {\n Column columnA = new Column();\n columnA.setType(INTEGER);\n columnA.setDataSequence(DataSequence.SEQUENTIAL);\n columnA.setMinValue(1);\n columnA.setMaxValue(3);\n\n generator = new SequentialIntegerDataGenerator(columnA);\n DataValue result1 = generator.getDataValue();\n assertEquals(\"1\", result1.getValue());\n DataValue result2 = generator.getDataValue();\n assertEquals(\"2\", result2.getValue());\n DataValue result3 = generator.getDataValue();\n assertEquals(\"3\", result3.getValue());\n DataValue result4 = generator.getDataValue();\n assertEquals(\"1\", result4.getValue());\n }",
"class_method_signature": "SequentialIntegerDataGeneratorTest.testGetDataValue()",
"constructor": false,
"full_signature": "@Test public void testGetDataValue()",
"identifier": "testGetDataValue",
"invocations": [
"setType",
"setDataSequence",
"setMinValue",
"setMaxValue",
"getDataValue",
"assertEquals",
"getValue",
"getDataValue",
"assertEquals",
"getValue",
"getDataValue",
"assertEquals",
"getValue",
"getDataValue",
"assertEquals",
"getValue"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetDataValue()",
"testcase": true
} | {
"fields": [
{
"declarator": "columnRule",
"modifier": "private final",
"original_string": "private final Column columnRule;",
"type": "Column",
"var_name": "columnRule"
},
{
"declarator": "counter",
"modifier": "private final",
"original_string": "private final AtomicLong counter;",
"type": "AtomicLong",
"var_name": "counter"
},
{
"declarator": "minValue",
"modifier": "private final",
"original_string": "private final long minValue;",
"type": "long",
"var_name": "minValue"
},
{
"declarator": "maxValue",
"modifier": "private final",
"original_string": "private final long maxValue;",
"type": "long",
"var_name": "maxValue"
}
],
"file": "phoenix-pherf/src/main/java/org/apache/phoenix/pherf/rules/SequentialIntegerDataGenerator.java",
"identifier": "SequentialIntegerDataGenerator",
"interfaces": "implements RuleBasedDataGenerator",
"methods": [
{
"class_method_signature": "SequentialIntegerDataGenerator.SequentialIntegerDataGenerator(Column columnRule)",
"constructor": true,
"full_signature": "public SequentialIntegerDataGenerator(Column columnRule)",
"identifier": "SequentialIntegerDataGenerator",
"modifiers": "public",
"parameters": "(Column columnRule)",
"return": "",
"signature": " SequentialIntegerDataGenerator(Column columnRule)",
"testcase": false
},
{
"class_method_signature": "SequentialIntegerDataGenerator.getDataValue()",
"constructor": false,
"full_signature": "@Override public DataValue getDataValue()",
"identifier": "getDataValue",
"modifiers": "@Override public",
"parameters": "()",
"return": "DataValue",
"signature": "DataValue getDataValue()",
"testcase": false
},
{
"class_method_signature": "SequentialIntegerDataGenerator.isIntegerType(DataTypeMapping mapping)",
"constructor": false,
"full_signature": " boolean isIntegerType(DataTypeMapping mapping)",
"identifier": "isIntegerType",
"modifiers": "",
"parameters": "(DataTypeMapping mapping)",
"return": "boolean",
"signature": "boolean isIntegerType(DataTypeMapping mapping)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public DataValue getDataValue() {\n return new DataValue(columnRule.getType(), String.valueOf((counter.getAndIncrement() % (maxValue - minValue + 1)) + minValue));\n }",
"class_method_signature": "SequentialIntegerDataGenerator.getDataValue()",
"constructor": false,
"full_signature": "@Override public DataValue getDataValue()",
"identifier": "getDataValue",
"invocations": [
"getType",
"valueOf",
"getAndIncrement"
],
"modifiers": "@Override public",
"parameters": "()",
"return": "DataValue",
"signature": "DataValue getDataValue()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_36 | {
"fields": [
{
"declarator": "SOME_TENANT_ID = \"00Dxx0000001234\"",
"modifier": "private static final",
"original_string": "private static final String SOME_TENANT_ID = \"00Dxx0000001234\";",
"type": "String",
"var_name": "SOME_TENANT_ID"
},
{
"declarator": "SOME_OTHER_PROPERTY_KEY = \"some_other_property\"",
"modifier": "private static final",
"original_string": "private static final String SOME_OTHER_PROPERTY_KEY = \"some_other_property\";",
"type": "String",
"var_name": "SOME_OTHER_PROPERTY_KEY"
},
{
"declarator": "SOME_OTHER_PROPERTY_VALUE = \"some_other_value\"",
"modifier": "private static final",
"original_string": "private static final String SOME_OTHER_PROPERTY_VALUE = \"some_other_value\";",
"type": "String",
"var_name": "SOME_OTHER_PROPERTY_VALUE"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/PropertiesUtilTest.java",
"identifier": "PropertiesUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCopyFromConfiguration() throws Exception{\n //make sure that we don't only copy the ZK quorum, but all\n //properties\n final Configuration conf = HBaseConfiguration.create();\n final Properties props = new Properties();\n \n conf.set(HConstants.ZOOKEEPER_QUORUM, HConstants.LOCALHOST);\n conf.set(PropertiesUtilTest.SOME_OTHER_PROPERTY_KEY, \n PropertiesUtilTest.SOME_OTHER_PROPERTY_VALUE);\n Properties combinedProps = PropertiesUtil.combineProperties(props, conf);\n assertEquals(combinedProps.getProperty(HConstants.ZOOKEEPER_QUORUM),\n conf.get(HConstants.ZOOKEEPER_QUORUM));\n assertEquals(combinedProps.getProperty(PropertiesUtilTest.SOME_OTHER_PROPERTY_KEY),\n conf.get(PropertiesUtilTest.SOME_OTHER_PROPERTY_KEY));\n }",
"class_method_signature": "PropertiesUtilTest.testCopyFromConfiguration()",
"constructor": false,
"full_signature": "@Test public void testCopyFromConfiguration()",
"identifier": "testCopyFromConfiguration",
"invocations": [
"create",
"set",
"set",
"combineProperties",
"assertEquals",
"getProperty",
"get",
"assertEquals",
"getProperty",
"get"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCopyFromConfiguration()",
"testcase": true
} | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/PropertiesUtil.java",
"identifier": "PropertiesUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "PropertiesUtil.PropertiesUtil()",
"constructor": true,
"full_signature": "private PropertiesUtil()",
"identifier": "PropertiesUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " PropertiesUtil()",
"testcase": false
},
{
"class_method_signature": "PropertiesUtil.deepCopy(Properties properties)",
"constructor": false,
"full_signature": "public static Properties deepCopy(Properties properties)",
"identifier": "deepCopy",
"modifiers": "public static",
"parameters": "(Properties properties)",
"return": "Properties",
"signature": "Properties deepCopy(Properties properties)",
"testcase": false
},
{
"class_method_signature": "PropertiesUtil.combineProperties(Properties props, final Configuration conf)",
"constructor": false,
"full_signature": "public static Properties combineProperties(Properties props, final Configuration conf)",
"identifier": "combineProperties",
"modifiers": "public static",
"parameters": "(Properties props, final Configuration conf)",
"return": "Properties",
"signature": "Properties combineProperties(Properties props, final Configuration conf)",
"testcase": false
},
{
"class_method_signature": "PropertiesUtil.combineProperties(Properties props, final Configuration conf, Set<String> withoutTheseProps)",
"constructor": false,
"full_signature": "public static Properties combineProperties(Properties props, final Configuration conf, Set<String> withoutTheseProps)",
"identifier": "combineProperties",
"modifiers": "public static",
"parameters": "(Properties props, final Configuration conf, Set<String> withoutTheseProps)",
"return": "Properties",
"signature": "Properties combineProperties(Properties props, final Configuration conf, Set<String> withoutTheseProps)",
"testcase": false
},
{
"class_method_signature": "PropertiesUtil.cloneConfig(Configuration toCopy)",
"constructor": false,
"full_signature": "public static Configuration cloneConfig(Configuration toCopy)",
"identifier": "cloneConfig",
"modifiers": "public static",
"parameters": "(Configuration toCopy)",
"return": "Configuration",
"signature": "Configuration cloneConfig(Configuration toCopy)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static Properties combineProperties(Properties props, final Configuration conf) {\n return combineProperties(props, conf, Collections.<String>emptySet());\n }",
"class_method_signature": "PropertiesUtil.combineProperties(Properties props, final Configuration conf)",
"constructor": false,
"full_signature": "public static Properties combineProperties(Properties props, final Configuration conf)",
"identifier": "combineProperties",
"invocations": [
"combineProperties",
"emptySet"
],
"modifiers": "public static",
"parameters": "(Properties props, final Configuration conf)",
"return": "Properties",
"signature": "Properties combineProperties(Properties props, final Configuration conf)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_123 | {
"fields": [
{
"declarator": "EMPTY_SET = Collections\n .<ImmutableBytesPtr> emptySet()",
"modifier": "private static final",
"original_string": "private static final Set<ImmutableBytesPtr> EMPTY_SET = Collections\n .<ImmutableBytesPtr> emptySet();",
"type": "Set<ImmutableBytesPtr>",
"var_name": "EMPTY_SET"
},
{
"declarator": "row = Bytes.toBytes(\"row\")",
"modifier": "private",
"original_string": "private byte[] row = Bytes.toBytes(\"row\");",
"type": "byte[]",
"var_name": "row"
},
{
"declarator": "family = Bytes.toBytes(\"family\")",
"modifier": "private",
"original_string": "private byte[] family = Bytes.toBytes(\"family\");",
"type": "byte[]",
"var_name": "family"
},
{
"declarator": "qualifier = Bytes.toBytes(\"qualifier\")",
"modifier": "private",
"original_string": "private byte[] qualifier = Bytes.toBytes(\"qualifier\");",
"type": "byte[]",
"var_name": "qualifier"
},
{
"declarator": "value = Bytes.toBytes(\"value\")",
"modifier": "private",
"original_string": "private byte[] value = Bytes.toBytes(\"value\");",
"type": "byte[]",
"var_name": "value"
},
{
"declarator": "ts = 10",
"modifier": "private",
"original_string": "private long ts = 10;",
"type": "long",
"var_name": "ts"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/filter/TestApplyAndFilterDeletesFilter.java",
"identifier": "TestApplyAndFilterDeletesFilter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCoveringPointDelete() {\n // start with doing a family delete, so we will seek to the next column\n KeyValue kv = createKvForType(Type.Delete);\n ApplyAndFilterDeletesFilter filter = new ApplyAndFilterDeletesFilter(EMPTY_SET);\n filter.filterKeyValue(kv);\n KeyValue put = createKvForType(Type.Put);\n assertEquals(\"Didn't filter out put with same timestamp!\", ReturnCode.SKIP,\n filter.filterKeyValue(put));\n // we should filter out the exact same put again, which could occur with the kvs all kept in the\n // same memstore\n assertEquals(\"Didn't filter out put with same timestamp on second call!\", ReturnCode.SKIP,\n filter.filterKeyValue(put));\n\n // ensure then that we don't filter out a put with an earlier timestamp (though everything else\n // matches)\n put = createKvForType(Type.Put, ts - 1);\n assertEquals(\"Didn't accept put that has an earlier ts than the covering delete!\",\n ReturnCode.INCLUDE, filter.filterKeyValue(put));\n }",
"class_method_signature": "TestApplyAndFilterDeletesFilter.testCoveringPointDelete()",
"constructor": false,
"full_signature": "@Test public void testCoveringPointDelete()",
"identifier": "testCoveringPointDelete",
"invocations": [
"createKvForType",
"filterKeyValue",
"createKvForType",
"assertEquals",
"filterKeyValue",
"assertEquals",
"filterKeyValue",
"createKvForType",
"assertEquals",
"filterKeyValue"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCoveringPointDelete()",
"testcase": true
} | {
"fields": [
{
"declarator": "families",
"modifier": "",
"original_string": "List<ImmutableBytesPtr> families;",
"type": "List<ImmutableBytesPtr>",
"var_name": "families"
},
{
"declarator": "coveringDelete = new DeleteTracker()",
"modifier": "private final",
"original_string": "private final DeleteTracker coveringDelete = new DeleteTracker();",
"type": "DeleteTracker",
"var_name": "coveringDelete"
},
{
"declarator": "currentHint",
"modifier": "private",
"original_string": "private Hinter currentHint;",
"type": "Hinter",
"var_name": "currentHint"
},
{
"declarator": "columnHint = new DeleteColumnHinter()",
"modifier": "private",
"original_string": "private DeleteColumnHinter columnHint = new DeleteColumnHinter();",
"type": "DeleteColumnHinter",
"var_name": "columnHint"
},
{
"declarator": "familyHint = new DeleteFamilyHinter()",
"modifier": "private",
"original_string": "private DeleteFamilyHinter familyHint = new DeleteFamilyHinter();",
"type": "DeleteFamilyHinter",
"var_name": "familyHint"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/filter/ApplyAndFilterDeletesFilter.java",
"identifier": "ApplyAndFilterDeletesFilter",
"interfaces": "",
"methods": [
{
"class_method_signature": "ApplyAndFilterDeletesFilter.ApplyAndFilterDeletesFilter(Set<ImmutableBytesPtr> families)",
"constructor": true,
"full_signature": "public ApplyAndFilterDeletesFilter(Set<ImmutableBytesPtr> families)",
"identifier": "ApplyAndFilterDeletesFilter",
"modifiers": "public",
"parameters": "(Set<ImmutableBytesPtr> families)",
"return": "",
"signature": " ApplyAndFilterDeletesFilter(Set<ImmutableBytesPtr> families)",
"testcase": false
},
{
"class_method_signature": "ApplyAndFilterDeletesFilter.getDeleteTracker()",
"constructor": false,
"full_signature": "public DeleteTracker getDeleteTracker()",
"identifier": "getDeleteTracker",
"modifiers": "public",
"parameters": "()",
"return": "DeleteTracker",
"signature": "DeleteTracker getDeleteTracker()",
"testcase": false
},
{
"class_method_signature": "ApplyAndFilterDeletesFilter.getNextFamily(ImmutableBytesPtr family)",
"constructor": false,
"full_signature": "private ImmutableBytesPtr getNextFamily(ImmutableBytesPtr family)",
"identifier": "getNextFamily",
"modifiers": "private",
"parameters": "(ImmutableBytesPtr family)",
"return": "ImmutableBytesPtr",
"signature": "ImmutableBytesPtr getNextFamily(ImmutableBytesPtr family)",
"testcase": false
},
{
"class_method_signature": "ApplyAndFilterDeletesFilter.reset()",
"constructor": false,
"full_signature": "@Override public void reset()",
"identifier": "reset",
"modifiers": "@Override public",
"parameters": "()",
"return": "void",
"signature": "void reset()",
"testcase": false
},
{
"class_method_signature": "ApplyAndFilterDeletesFilter.getNextCellHint(Cell peeked)",
"constructor": false,
"full_signature": "@Override public Cell getNextCellHint(Cell peeked)",
"identifier": "getNextCellHint",
"modifiers": "@Override public",
"parameters": "(Cell peeked)",
"return": "Cell",
"signature": "Cell getNextCellHint(Cell peeked)",
"testcase": false
},
{
"class_method_signature": "ApplyAndFilterDeletesFilter.filterKeyValue(Cell next)",
"constructor": false,
"full_signature": "@Override public ReturnCode filterKeyValue(Cell next)",
"identifier": "filterKeyValue",
"modifiers": "@Override public",
"parameters": "(Cell next)",
"return": "ReturnCode",
"signature": "ReturnCode filterKeyValue(Cell next)",
"testcase": false
}
],
"superclass": "extends FilterBase"
} | {
"body": "@Override\n public ReturnCode filterKeyValue(Cell next) {\n KeyValue nextKV = PhoenixKeyValueUtil.maybeCopyCell(next);\n switch (KeyValue.Type.codeToType(next.getTypeByte())) {\n /*\n * DeleteFamily will always sort first because those KVs (we assume) don't have qualifiers (or\n * rather are null). Therefore, we have to keep a hold of all the delete families until we get\n * to a Put entry that is covered by that delete (in which case, we are done with the family).\n */\n case DeleteFamily:\n // track the family to delete. If we are updating the delete, that means we have passed all\n // kvs in the last column, so we can safely ignore the last deleteFamily, and just use this\n // one. In fact, it means that all the previous deletes can be ignored because the family must\n // not match anymore.\n // We could potentially have multiple deleteFamily for the same row and family\n // (e.g. upsert row+family, delete it, upsert again, delete again),\n // in which case we keep the first one since its timestamp dominates\n if (coveringDelete.deleteFamily == null || !CellUtil.matchingFamily(coveringDelete.deleteFamily, nextKV)) {\n this.coveringDelete.reset();\n this.coveringDelete.deleteFamily = nextKV;\n }\n return ReturnCode.SKIP;\n case DeleteColumn:\n // similar to deleteFamily, all the newer deletes/puts would have been seen at this point, so\n // we can safely replace the more recent delete column with the more recent one\n this.coveringDelete.pointDelete = null;\n this.coveringDelete.deleteColumn = nextKV;\n return ReturnCode.SKIP;\n case Delete:\n // we are just deleting the single column value at this point.\n // therefore we just skip this entry and go onto the next one. The only caveat is that\n // we should still cover the next entry if this delete applies to the next entry, so we\n // have to keep around a reference to the KV to compare against the next valid entry\n this.coveringDelete.pointDelete = nextKV;\n return ReturnCode.SKIP;\n default:\n // no covering deletes\n if (coveringDelete.empty()) {\n return ReturnCode.INCLUDE;\n }\n\n if (coveringDelete.matchesFamily(nextKV)) {\n this.currentHint = familyHint;\n return ReturnCode.SEEK_NEXT_USING_HINT;\n }\n\n if (coveringDelete.matchesColumn(nextKV)) {\n // hint to the next column\n this.currentHint = columnHint;\n return ReturnCode.SEEK_NEXT_USING_HINT;\n }\n\n if (coveringDelete.matchesPoint(nextKV)) {\n return ReturnCode.SKIP;\n }\n\n }\n\n // none of the deletes matches, we are done\n return ReturnCode.INCLUDE;\n }",
"class_method_signature": "ApplyAndFilterDeletesFilter.filterKeyValue(Cell next)",
"constructor": false,
"full_signature": "@Override public ReturnCode filterKeyValue(Cell next)",
"identifier": "filterKeyValue",
"invocations": [
"maybeCopyCell",
"codeToType",
"getTypeByte",
"matchingFamily",
"reset",
"empty",
"matchesFamily",
"matchesColumn",
"matchesPoint"
],
"modifiers": "@Override public",
"parameters": "(Cell next)",
"return": "ReturnCode",
"signature": "ReturnCode filterKeyValue(Cell next)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_61 | {
"fields": [
{
"declarator": "ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT)",
"modifier": "private static final",
"original_string": "private static final ColumnInfo ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT);",
"type": "ColumnInfo",
"var_name": "ID_COLUMN"
},
{
"declarator": "NAME_COLUMN = new ColumnInfo(\"NAME\", Types.VARCHAR)",
"modifier": "private static final",
"original_string": "private static final ColumnInfo NAME_COLUMN = new ColumnInfo(\"NAME\", Types.VARCHAR);",
"type": "ColumnInfo",
"var_name": "NAME_COLUMN"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/QueryUtilTest.java",
"identifier": "QueryUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConstructSelectStatementWithCaseSensitiveSchema() {\n final String tableName = \"MYTAB\";\n final String schemaName = SchemaUtil.getEscapedArgument(\"a\");\n final String fullTableName = SchemaUtil.getTableName(schemaName, tableName);\n assertEquals(\n \"SELECT \\\"ID\\\" , \\\"NAME\\\" FROM \\\"a\\\".MYTAB\",\n QueryUtil.constructSelectStatement(fullTableName, ImmutableList.of(ID_COLUMN,NAME_COLUMN),null));\n }",
"class_method_signature": "QueryUtilTest.testConstructSelectStatementWithCaseSensitiveSchema()",
"constructor": false,
"full_signature": "@Test public void testConstructSelectStatementWithCaseSensitiveSchema()",
"identifier": "testConstructSelectStatementWithCaseSensitiveSchema",
"invocations": [
"getEscapedArgument",
"getTableName",
"assertEquals",
"constructSelectStatement",
"of"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testConstructSelectStatementWithCaseSensitiveSchema()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(QueryUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryUtil.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "COLUMN_FAMILY_POSITION = 25",
"modifier": "public static final",
"original_string": "public static final int COLUMN_FAMILY_POSITION = 25;",
"type": "int",
"var_name": "COLUMN_FAMILY_POSITION"
},
{
"declarator": "COLUMN_NAME_POSITION = 4",
"modifier": "public static final",
"original_string": "public static final int COLUMN_NAME_POSITION = 4;",
"type": "int",
"var_name": "COLUMN_NAME_POSITION"
},
{
"declarator": "DATA_TYPE_POSITION = 5",
"modifier": "public static final",
"original_string": "public static final int DATA_TYPE_POSITION = 5;",
"type": "int",
"var_name": "DATA_TYPE_POSITION"
},
{
"declarator": "DATA_TYPE_NAME_POSITION = 6",
"modifier": "public static final",
"original_string": "public static final int DATA_TYPE_NAME_POSITION = 6;",
"type": "int",
"var_name": "DATA_TYPE_NAME_POSITION"
},
{
"declarator": "IS_SERVER_CONNECTION = \"IS_SERVER_CONNECTION\"",
"modifier": "public static final",
"original_string": "public static final String IS_SERVER_CONNECTION = \"IS_SERVER_CONNECTION\";",
"type": "String",
"var_name": "IS_SERVER_CONNECTION"
},
{
"declarator": "SELECT = \"SELECT\"",
"modifier": "private static final",
"original_string": "private static final String SELECT = \"SELECT\";",
"type": "String",
"var_name": "SELECT"
},
{
"declarator": "FROM = \"FROM\"",
"modifier": "private static final",
"original_string": "private static final String FROM = \"FROM\";",
"type": "String",
"var_name": "FROM"
},
{
"declarator": "WHERE = \"WHERE\"",
"modifier": "private static final",
"original_string": "private static final String WHERE = \"WHERE\";",
"type": "String",
"var_name": "WHERE"
},
{
"declarator": "AND = \"AND\"",
"modifier": "private static final",
"original_string": "private static final String AND = \"AND\";",
"type": "String",
"var_name": "AND"
},
{
"declarator": "CompareOpString = new String[CompareOp.values().length]",
"modifier": "private static final",
"original_string": "private static final String[] CompareOpString = new String[CompareOp.values().length];",
"type": "String[]",
"var_name": "CompareOpString"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java",
"identifier": "QueryUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "QueryUtil.toSQL(CompareOp op)",
"constructor": false,
"full_signature": "public static String toSQL(CompareOp op)",
"identifier": "toSQL",
"modifiers": "public static",
"parameters": "(CompareOp op)",
"return": "String",
"signature": "String toSQL(CompareOp op)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.QueryUtil()",
"constructor": true,
"full_signature": "private QueryUtil()",
"identifier": "QueryUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " QueryUtil()",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"constructor": false,
"full_signature": "public static String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"identifier": "constructUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, List<ColumnInfo> columnInfos)",
"return": "String",
"signature": "String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"constructor": false,
"full_signature": "public static String constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"identifier": "constructUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, List<String> columns, Hint hint)",
"return": "String",
"signature": "String constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructGenericUpsertStatement(String tableName, int numColumns)",
"constructor": false,
"full_signature": "public static String constructGenericUpsertStatement(String tableName, int numColumns)",
"identifier": "constructGenericUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, int numColumns)",
"return": "String",
"signature": "String constructGenericUpsertStatement(String tableName, int numColumns)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"constructor": false,
"full_signature": "public static String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"identifier": "constructSelectStatement",
"modifiers": "public static",
"parameters": "(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"return": "String",
"signature": "String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"constructor": false,
"full_signature": "public static String constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"identifier": "constructSelectStatement",
"modifiers": "public static",
"parameters": "(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"return": "String",
"signature": "String constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructParameterizedInClause(int numWhereCols, int numBatches)",
"constructor": false,
"full_signature": "public static String constructParameterizedInClause(int numWhereCols, int numBatches)",
"identifier": "constructParameterizedInClause",
"modifiers": "public static",
"parameters": "(int numWhereCols, int numBatches)",
"return": "String",
"signature": "String constructParameterizedInClause(int numWhereCols, int numBatches)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum)",
"return": "String",
"signature": "String getUrl(String zkQuorum)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int clientPort)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int clientPort)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int clientPort)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int clientPort)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int port, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int port, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int port, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int port, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, Integer port, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, Integer port, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, Integer port, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, Integer port, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, Integer port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "private static String getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"identifier": "getUrlInternal",
"modifiers": "private static",
"parameters": "(String zkQuorum, Integer port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getExplainPlan(ResultSet rs)",
"constructor": false,
"full_signature": "public static String getExplainPlan(ResultSet rs)",
"identifier": "getExplainPlan",
"modifiers": "public static",
"parameters": "(ResultSet rs)",
"return": "String",
"signature": "String getExplainPlan(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getExplainPlan(ResultIterator iterator)",
"constructor": false,
"full_signature": "public static String getExplainPlan(ResultIterator iterator)",
"identifier": "getExplainPlan",
"modifiers": "public static",
"parameters": "(ResultIterator iterator)",
"return": "String",
"signature": "String getExplainPlan(ResultIterator iterator)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServer(Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServer(Configuration conf)",
"identifier": "getConnectionOnServer",
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "Connection",
"signature": "Connection getConnectionOnServer(Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.setServerConnection(Properties props)",
"constructor": false,
"full_signature": "public static void setServerConnection(Properties props)",
"identifier": "setServerConnection",
"modifiers": "public static",
"parameters": "(Properties props)",
"return": "void",
"signature": "void setServerConnection(Properties props)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.isServerConnection(ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static boolean isServerConnection(ReadOnlyProps props)",
"identifier": "isServerConnection",
"modifiers": "public static",
"parameters": "(ReadOnlyProps props)",
"return": "boolean",
"signature": "boolean isServerConnection(ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServer(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServer(Properties props, Configuration conf)",
"identifier": "getConnectionOnServer",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf)",
"return": "Connection",
"signature": "Connection getConnectionOnServer(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"identifier": "getConnectionOnServerWithCustomUrl",
"modifiers": "public static",
"parameters": "(Properties props, String principal)",
"return": "Connection",
"signature": "Connection getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnection(Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnection(Configuration conf)",
"identifier": "getConnection",
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "Connection",
"signature": "Connection getConnection(Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnection(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static Connection getConnection(Properties props, Configuration conf)",
"identifier": "getConnection",
"modifiers": "private static",
"parameters": "(Properties props, Configuration conf)",
"return": "Connection",
"signature": "Connection getConnection(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionUrl(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "public static String getConnectionUrl(Properties props, Configuration conf)",
"identifier": "getConnectionUrl",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf)",
"return": "String",
"signature": "String getConnectionUrl(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionUrl(Properties props, Configuration conf, String principal)",
"constructor": false,
"full_signature": "public static String getConnectionUrl(Properties props, Configuration conf, String principal)",
"identifier": "getConnectionUrl",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf, String principal)",
"return": "String",
"signature": "String getConnectionUrl(Properties props, Configuration conf, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getInt(String key, int defaultValue, Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static int getInt(String key, int defaultValue, Properties props, Configuration conf)",
"identifier": "getInt",
"modifiers": "private static",
"parameters": "(String key, int defaultValue, Properties props, Configuration conf)",
"return": "int",
"signature": "int getInt(String key, int defaultValue, Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getString(String key, String defaultValue, Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static String getString(String key, String defaultValue, Properties props, Configuration conf)",
"identifier": "getString",
"modifiers": "private static",
"parameters": "(String key, String defaultValue, Properties props, Configuration conf)",
"return": "String",
"signature": "String getString(String key, String defaultValue, Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getViewStatement(String schemaName, String tableName, String where)",
"constructor": false,
"full_signature": "public static String getViewStatement(String schemaName, String tableName, String where)",
"identifier": "getViewStatement",
"modifiers": "public static",
"parameters": "(String schemaName, String tableName, String where)",
"return": "String",
"signature": "String getViewStatement(String schemaName, String tableName, String where)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getOffsetLimit(Integer limit, Integer offset)",
"constructor": false,
"full_signature": "public static Integer getOffsetLimit(Integer limit, Integer offset)",
"identifier": "getOffsetLimit",
"modifiers": "public static",
"parameters": "(Integer limit, Integer offset)",
"return": "Integer",
"signature": "Integer getOffsetLimit(Integer limit, Integer offset)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getRemainingOffset(Tuple offsetTuple)",
"constructor": false,
"full_signature": "public static Integer getRemainingOffset(Tuple offsetTuple)",
"identifier": "getRemainingOffset",
"modifiers": "public static",
"parameters": "(Tuple offsetTuple)",
"return": "Integer",
"signature": "Integer getRemainingOffset(Tuple offsetTuple)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"constructor": false,
"full_signature": "public static String getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"identifier": "getViewPartitionClause",
"modifiers": "public static",
"parameters": "(String partitionColumnName, long autoPartitionNum)",
"return": "String",
"signature": "String getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionForQueryLog(Configuration config)",
"constructor": false,
"full_signature": "public static Connection getConnectionForQueryLog(Configuration config)",
"identifier": "getConnectionForQueryLog",
"modifiers": "public static",
"parameters": "(Configuration config)",
"return": "Connection",
"signature": "Connection getConnectionForQueryLog(Configuration config)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getCatalogsStmt(PhoenixConnection connection)",
"constructor": false,
"full_signature": "public static PreparedStatement getCatalogsStmt(PhoenixConnection connection)",
"identifier": "getCatalogsStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection)",
"return": "PreparedStatement",
"signature": "PreparedStatement getCatalogsStmt(PhoenixConnection connection)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"constructor": false,
"full_signature": "public static PreparedStatement getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"identifier": "getSchemasStmt",
"modifiers": "public static",
"parameters": "(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"return": "PreparedStatement",
"signature": "PreparedStatement getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"constructor": false,
"full_signature": "public static PreparedStatement getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"identifier": "getSuperTablesStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"return": "PreparedStatement",
"signature": "PreparedStatement getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"constructor": false,
"full_signature": "public static PreparedStatement getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"identifier": "getIndexInfoStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"return": "PreparedStatement",
"signature": "PreparedStatement getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"constructor": false,
"full_signature": "public static PreparedStatement getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"identifier": "getTablesStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"return": "PreparedStatement",
"signature": "PreparedStatement getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"constructor": false,
"full_signature": "public static void addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"identifier": "addTenantIdFilter",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"return": "void",
"signature": "void addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.appendConjunction(StringBuilder buf)",
"constructor": false,
"full_signature": "private static void appendConjunction(StringBuilder buf)",
"identifier": "appendConjunction",
"modifiers": "private static",
"parameters": "(StringBuilder buf)",
"return": "void",
"signature": "void appendConjunction(StringBuilder buf)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions) {\n List<String> columns = Lists.transform(columnInfos, new Function<ColumnInfo, String>(){\n @Override\n public String apply(ColumnInfo input) {\n return input.getColumnName();\n }});\n return constructSelectStatement(fullTableName, columns , conditions, null, false);\n }",
"class_method_signature": "QueryUtil.constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"constructor": false,
"full_signature": "public static String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"identifier": "constructSelectStatement",
"invocations": [
"transform",
"getColumnName",
"constructSelectStatement"
],
"modifiers": "public static",
"parameters": "(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"return": "String",
"signature": "String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_174 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/schema/SaltingUtilTest.java",
"identifier": "SaltingUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetSaltingByte() {\n Set<Byte> saltBytes = Sets.newHashSet();\n for (int i = 0; i < 100; i++) {\n saltBytes.add(SaltingUtil.getSaltingByte(Bytes.toBytes(i), 0, Bytes.SIZEOF_INT, 3));\n }\n assertEquals(ImmutableSet.of((byte)0, (byte)1, (byte)2), saltBytes);\n }",
"class_method_signature": "SaltingUtilTest.testGetSaltingByte()",
"constructor": false,
"full_signature": "@Test public void testGetSaltingByte()",
"identifier": "testGetSaltingByte",
"invocations": [
"newHashSet",
"add",
"getSaltingByte",
"toBytes",
"assertEquals",
"of"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetSaltingByte()",
"testcase": true
} | {
"fields": [
{
"declarator": "NUM_SALTING_BYTES = 1",
"modifier": "public static final",
"original_string": "public static final int NUM_SALTING_BYTES = 1;",
"type": "int",
"var_name": "NUM_SALTING_BYTES"
},
{
"declarator": "MAX_BUCKET_NUM = 256",
"modifier": "public static final",
"original_string": "public static final Integer MAX_BUCKET_NUM = 256;",
"type": "Integer",
"var_name": "MAX_BUCKET_NUM"
},
{
"declarator": "SALTING_COLUMN_NAME = \"_SALT\"",
"modifier": "public static final",
"original_string": "public static final String SALTING_COLUMN_NAME = \"_SALT\";",
"type": "String",
"var_name": "SALTING_COLUMN_NAME"
},
{
"declarator": "SALTED_ROW_KEY_NAME = \"_SALTED_KEY\"",
"modifier": "public static final",
"original_string": "public static final String SALTED_ROW_KEY_NAME = \"_SALTED_KEY\";",
"type": "String",
"var_name": "SALTED_ROW_KEY_NAME"
},
{
"declarator": "SALTING_COLUMN = new PColumnImpl(\n PNameFactory.newName(SALTING_COLUMN_NAME), null, PBinary.INSTANCE, 1, 0, false, 0, SortOrder.getDefault(), 0, null, false, null, false, false, null,\n HConstants.LATEST_TIMESTAMP)",
"modifier": "public static final",
"original_string": "public static final PColumnImpl SALTING_COLUMN = new PColumnImpl(\n PNameFactory.newName(SALTING_COLUMN_NAME), null, PBinary.INSTANCE, 1, 0, false, 0, SortOrder.getDefault(), 0, null, false, null, false, false, null,\n HConstants.LATEST_TIMESTAMP);",
"type": "PColumnImpl",
"var_name": "SALTING_COLUMN"
},
{
"declarator": "VAR_BINARY_SALTED_SCHEMA = new RowKeySchemaBuilder(2)\n .addField(SALTING_COLUMN, false, SortOrder.getDefault())\n .addField(SchemaUtil.VAR_BINARY_DATUM, false, SortOrder.getDefault()).build()",
"modifier": "public static final",
"original_string": "public static final RowKeySchema VAR_BINARY_SALTED_SCHEMA = new RowKeySchemaBuilder(2)\n .addField(SALTING_COLUMN, false, SortOrder.getDefault())\n .addField(SchemaUtil.VAR_BINARY_DATUM, false, SortOrder.getDefault()).build();",
"type": "RowKeySchema",
"var_name": "VAR_BINARY_SALTED_SCHEMA"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/schema/SaltingUtil.java",
"identifier": "SaltingUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "SaltingUtil.generateAllSaltingRanges(int bucketNum)",
"constructor": false,
"full_signature": "public static List<KeyRange> generateAllSaltingRanges(int bucketNum)",
"identifier": "generateAllSaltingRanges",
"modifiers": "public static",
"parameters": "(int bucketNum)",
"return": "List<KeyRange>",
"signature": "List<KeyRange> generateAllSaltingRanges(int bucketNum)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.getSalteByteSplitPoints(int saltBucketNum)",
"constructor": false,
"full_signature": "public static byte[][] getSalteByteSplitPoints(int saltBucketNum)",
"identifier": "getSalteByteSplitPoints",
"modifiers": "public static",
"parameters": "(int saltBucketNum)",
"return": "byte[][]",
"signature": "byte[][] getSalteByteSplitPoints(int saltBucketNum)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.getSaltedKey(ImmutableBytesWritable key, int bucketNum)",
"constructor": false,
"full_signature": "public static byte[] getSaltedKey(ImmutableBytesWritable key, int bucketNum)",
"identifier": "getSaltedKey",
"modifiers": "public static",
"parameters": "(ImmutableBytesWritable key, int bucketNum)",
"return": "byte[]",
"signature": "byte[] getSaltedKey(ImmutableBytesWritable key, int bucketNum)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"constructor": false,
"full_signature": "public static byte getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"identifier": "getSaltingByte",
"modifiers": "public static",
"parameters": "(byte[] value, int offset, int length, int bucketNum)",
"return": "byte",
"signature": "byte getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.calculateHashCode(byte a[], int offset, int length)",
"constructor": false,
"full_signature": "private static int calculateHashCode(byte a[], int offset, int length)",
"identifier": "calculateHashCode",
"modifiers": "private static",
"parameters": "(byte a[], int offset, int length)",
"return": "int",
"signature": "int calculateHashCode(byte a[], int offset, int length)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.addSaltByte(byte[] startKey, KeyRange minMaxRange)",
"constructor": false,
"full_signature": "public static KeyRange addSaltByte(byte[] startKey, KeyRange minMaxRange)",
"identifier": "addSaltByte",
"modifiers": "public static",
"parameters": "(byte[] startKey, KeyRange minMaxRange)",
"return": "KeyRange",
"signature": "KeyRange addSaltByte(byte[] startKey, KeyRange minMaxRange)",
"testcase": false
},
{
"class_method_signature": "SaltingUtil.addRegionStartKeyToScanStartAndStopRows(byte[] startKey, byte[] endKey, Scan scan)",
"constructor": false,
"full_signature": "public static void addRegionStartKeyToScanStartAndStopRows(byte[] startKey, byte[] endKey, Scan scan)",
"identifier": "addRegionStartKeyToScanStartAndStopRows",
"modifiers": "public static",
"parameters": "(byte[] startKey, byte[] endKey, Scan scan)",
"return": "void",
"signature": "void addRegionStartKeyToScanStartAndStopRows(byte[] startKey, byte[] endKey, Scan scan)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static byte getSaltingByte(byte[] value, int offset, int length, int bucketNum) {\n int hash = calculateHashCode(value, offset, length);\n return (byte) Math.abs(hash % bucketNum);\n }",
"class_method_signature": "SaltingUtil.getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"constructor": false,
"full_signature": "public static byte getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"identifier": "getSaltingByte",
"invocations": [
"calculateHashCode",
"abs"
],
"modifiers": "public static",
"parameters": "(byte[] value, int offset, int length, int bucketNum)",
"return": "byte",
"signature": "byte getSaltingByte(byte[] value, int offset, int length, int bucketNum)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_16 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/PhoenixRuntimeTest.java",
"identifier": "PhoenixRuntimeTest",
"interfaces": "",
"superclass": "extends BaseConnectionlessQueryTest"
} | {
"body": "@Test\n public void testGetTenantIdExpression() throws Exception {\n Connection conn = DriverManager.getConnection(getUrl());\n Expression e1 = PhoenixRuntime.getTenantIdExpression(conn, PhoenixDatabaseMetaData.SYSTEM_STATS_NAME);\n assertNull(e1);\n Expression e2 = PhoenixRuntime.getTenantIdExpression(conn, PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME);\n assertNotNull(e2);\n\n Expression e3 = PhoenixRuntime.getTenantIdExpression(conn, PhoenixDatabaseMetaData.SYSTEM_SEQUENCE_NAME);\n assertNotNull(e3);\n \n conn.createStatement().execute(\"CREATE TABLE FOO (k VARCHAR PRIMARY KEY)\");\n Expression e4 = PhoenixRuntime.getTenantIdExpression(conn, \"FOO\");\n assertNull(e4);\n \n conn.createStatement().execute(\"CREATE TABLE A.BAR (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK PRIMARY KEY(K1,K2)) MULTI_TENANT=true\");\n Expression e5 = PhoenixRuntime.getTenantIdExpression(conn, \"A.BAR\");\n assertNotNull(e5);\n\n conn.createStatement().execute(\"CREATE INDEX I1 ON A.BAR (K2)\");\n Expression e5A = PhoenixRuntime.getTenantIdExpression(conn, \"A.I1\");\n assertNotNull(e5A);\n \n conn.createStatement().execute(\"CREATE TABLE BAS (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK PRIMARY KEY(K1,K2)) MULTI_TENANT=true, SALT_BUCKETS=3\");\n Expression e6 = PhoenixRuntime.getTenantIdExpression(conn, \"BAS\");\n assertNotNull(e6);\n \n conn.createStatement().execute(\"CREATE INDEX I2 ON BAS (K2)\");\n Expression e6A = PhoenixRuntime.getTenantIdExpression(conn, \"I2\");\n assertNotNull(e6A);\n \n try {\n PhoenixRuntime.getTenantIdExpression(conn, \"NOT.ATABLE\");\n fail();\n } catch (TableNotFoundException e) {\n // Expected\n }\n \n Properties props = PropertiesUtil.deepCopy(TestUtil.TEST_PROPERTIES);\n props.setProperty(PhoenixRuntime.TENANT_ID_ATTRIB, \"t1\");\n Connection tsconn = DriverManager.getConnection(getUrl(), props);\n tsconn.createStatement().execute(\"CREATE VIEW V(V1 VARCHAR) AS SELECT * FROM BAS\");\n Expression e7 = PhoenixRuntime.getTenantIdExpression(tsconn, \"V\");\n assertNotNull(e7);\n tsconn.createStatement().execute(\"CREATE LOCAL INDEX I3 ON V (V1)\");\n try {\n PhoenixRuntime.getTenantIdExpression(tsconn, \"I3\");\n fail();\n } catch (SQLFeatureNotSupportedException e) {\n // Expected\n }\n }",
"class_method_signature": "PhoenixRuntimeTest.testGetTenantIdExpression()",
"constructor": false,
"full_signature": "@Test public void testGetTenantIdExpression()",
"identifier": "testGetTenantIdExpression",
"invocations": [
"getConnection",
"getUrl",
"getTenantIdExpression",
"assertNull",
"getTenantIdExpression",
"assertNotNull",
"getTenantIdExpression",
"assertNotNull",
"execute",
"createStatement",
"getTenantIdExpression",
"assertNull",
"execute",
"createStatement",
"getTenantIdExpression",
"assertNotNull",
"execute",
"createStatement",
"getTenantIdExpression",
"assertNotNull",
"execute",
"createStatement",
"getTenantIdExpression",
"assertNotNull",
"execute",
"createStatement",
"getTenantIdExpression",
"assertNotNull",
"getTenantIdExpression",
"fail",
"deepCopy",
"setProperty",
"getConnection",
"getUrl",
"execute",
"createStatement",
"getTenantIdExpression",
"assertNotNull",
"execute",
"createStatement",
"getTenantIdExpression",
"fail"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetTenantIdExpression()",
"testcase": true
} | {
"fields": [
{
"declarator": "JDBC_PROTOCOL = \"jdbc:phoenix\"",
"modifier": "public final static",
"original_string": "public final static String JDBC_PROTOCOL = \"jdbc:phoenix\";",
"type": "String",
"var_name": "JDBC_PROTOCOL"
},
{
"declarator": "JDBC_THIN_PROTOCOL = \"jdbc:phoenix:thin\"",
"modifier": "public final static",
"original_string": "public final static String JDBC_THIN_PROTOCOL = \"jdbc:phoenix:thin\";",
"type": "String",
"var_name": "JDBC_THIN_PROTOCOL"
},
{
"declarator": "JDBC_PROTOCOL_TERMINATOR = ';'",
"modifier": "public final static",
"original_string": "public final static char JDBC_PROTOCOL_TERMINATOR = ';';",
"type": "char",
"var_name": "JDBC_PROTOCOL_TERMINATOR"
},
{
"declarator": "JDBC_PROTOCOL_SEPARATOR = ':'",
"modifier": "public final static",
"original_string": "public final static char JDBC_PROTOCOL_SEPARATOR = ':';",
"type": "char",
"var_name": "JDBC_PROTOCOL_SEPARATOR"
},
{
"declarator": "EMBEDDED_JDBC_PROTOCOL = PhoenixRuntime.JDBC_PROTOCOL + PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR",
"modifier": "@Deprecated\n public final static",
"original_string": "@Deprecated\n public final static String EMBEDDED_JDBC_PROTOCOL = PhoenixRuntime.JDBC_PROTOCOL + PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR;",
"type": "String",
"var_name": "EMBEDDED_JDBC_PROTOCOL"
},
{
"declarator": "CURRENT_SCN_ATTRIB = \"CurrentSCN\"",
"modifier": "public static final",
"original_string": "public static final String CURRENT_SCN_ATTRIB = \"CurrentSCN\";",
"type": "String",
"var_name": "CURRENT_SCN_ATTRIB"
},
{
"declarator": "BUILD_INDEX_AT_ATTRIB = \"BuildIndexAt\"",
"modifier": "public static final",
"original_string": "public static final String BUILD_INDEX_AT_ATTRIB = \"BuildIndexAt\";",
"type": "String",
"var_name": "BUILD_INDEX_AT_ATTRIB"
},
{
"declarator": "TENANT_ID_ATTRIB = \"TenantId\"",
"modifier": "public static final",
"original_string": "public static final String TENANT_ID_ATTRIB = \"TenantId\";",
"type": "String",
"var_name": "TENANT_ID_ATTRIB"
},
{
"declarator": "NO_UPGRADE_ATTRIB = \"NoUpgrade\"",
"modifier": "public static final",
"original_string": "public static final String NO_UPGRADE_ATTRIB = \"NoUpgrade\";",
"type": "String",
"var_name": "NO_UPGRADE_ATTRIB"
},
{
"declarator": "UPSERT_BATCH_SIZE_ATTRIB = \"UpsertBatchSize\"",
"modifier": "public final static",
"original_string": "public final static String UPSERT_BATCH_SIZE_ATTRIB = \"UpsertBatchSize\";",
"type": "String",
"var_name": "UPSERT_BATCH_SIZE_ATTRIB"
},
{
"declarator": "UPSERT_BATCH_SIZE_BYTES_ATTRIB = \"UpsertBatchSizeBytes\"",
"modifier": "public final static",
"original_string": "public final static String UPSERT_BATCH_SIZE_BYTES_ATTRIB = \"UpsertBatchSizeBytes\";",
"type": "String",
"var_name": "UPSERT_BATCH_SIZE_BYTES_ATTRIB"
},
{
"declarator": "AUTO_COMMIT_ATTRIB = \"AutoCommit\"",
"modifier": "public static final",
"original_string": "public static final String AUTO_COMMIT_ATTRIB = \"AutoCommit\";",
"type": "String",
"var_name": "AUTO_COMMIT_ATTRIB"
},
{
"declarator": "CONSISTENCY_ATTRIB = \"Consistency\"",
"modifier": "public static final",
"original_string": "public static final String CONSISTENCY_ATTRIB = \"Consistency\";",
"type": "String",
"var_name": "CONSISTENCY_ATTRIB"
},
{
"declarator": "REQUEST_METRIC_ATTRIB = \"RequestMetric\"",
"modifier": "public static final",
"original_string": "public static final String REQUEST_METRIC_ATTRIB = \"RequestMetric\";",
"type": "String",
"var_name": "REQUEST_METRIC_ATTRIB"
},
{
"declarator": "EXPLAIN_PLAN_ESTIMATED_BYTES_READ_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_BYTES_ESTIMATE_COLUMN_ALIAS",
"modifier": "public static final",
"original_string": "public static final String EXPLAIN_PLAN_ESTIMATED_BYTES_READ_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_BYTES_ESTIMATE_COLUMN_ALIAS;",
"type": "String",
"var_name": "EXPLAIN_PLAN_ESTIMATED_BYTES_READ_COLUMN"
},
{
"declarator": "EXPLAIN_PLAN_ESTIMATED_ROWS_READ_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_ROWS_COLUMN_ALIAS",
"modifier": "public static final",
"original_string": "public static final String EXPLAIN_PLAN_ESTIMATED_ROWS_READ_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_ROWS_COLUMN_ALIAS;",
"type": "String",
"var_name": "EXPLAIN_PLAN_ESTIMATED_ROWS_READ_COLUMN"
},
{
"declarator": "EXPLAIN_PLAN_ESTIMATE_INFO_TS_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_ESTIMATE_INFO_TS_COLUMN_ALIAS",
"modifier": "public static final",
"original_string": "public static final String EXPLAIN_PLAN_ESTIMATE_INFO_TS_COLUMN =\n PhoenixStatement.EXPLAIN_PLAN_ESTIMATE_INFO_TS_COLUMN_ALIAS;",
"type": "String",
"var_name": "EXPLAIN_PLAN_ESTIMATE_INFO_TS_COLUMN"
},
{
"declarator": "CONNECTION_PROPERTIES = {\n CURRENT_SCN_ATTRIB,\n TENANT_ID_ATTRIB,\n UPSERT_BATCH_SIZE_ATTRIB,\n AUTO_COMMIT_ATTRIB,\n CONSISTENCY_ATTRIB,\n REQUEST_METRIC_ATTRIB,\n }",
"modifier": "public final static",
"original_string": "public final static String[] CONNECTION_PROPERTIES = {\n CURRENT_SCN_ATTRIB,\n TENANT_ID_ATTRIB,\n UPSERT_BATCH_SIZE_ATTRIB,\n AUTO_COMMIT_ATTRIB,\n CONSISTENCY_ATTRIB,\n REQUEST_METRIC_ATTRIB,\n };",
"type": "String[]",
"var_name": "CONNECTION_PROPERTIES"
},
{
"declarator": "CONNECTIONLESS = \"none\"",
"modifier": "public final static",
"original_string": "public final static String CONNECTIONLESS = \"none\";",
"type": "String",
"var_name": "CONNECTIONLESS"
},
{
"declarator": "ANNOTATION_ATTRIB_PREFIX = \"phoenix.annotation.\"",
"modifier": "public static final",
"original_string": "public static final String ANNOTATION_ATTRIB_PREFIX = \"phoenix.annotation.\";",
"type": "String",
"var_name": "ANNOTATION_ATTRIB_PREFIX"
},
{
"declarator": "HEADER_IN_LINE = \"in-line\"",
"modifier": "private static final",
"original_string": "private static final String HEADER_IN_LINE = \"in-line\";",
"type": "String",
"var_name": "HEADER_IN_LINE"
},
{
"declarator": "SQL_FILE_EXT = \".sql\"",
"modifier": "private static final",
"original_string": "private static final String SQL_FILE_EXT = \".sql\";",
"type": "String",
"var_name": "SQL_FILE_EXT"
},
{
"declarator": "CSV_FILE_EXT = \".csv\"",
"modifier": "private static final",
"original_string": "private static final String CSV_FILE_EXT = \".csv\";",
"type": "String",
"var_name": "CSV_FILE_EXT"
},
{
"declarator": "PHOENIX_TEST_DRIVER_URL_PARAM = \"test=true\"",
"modifier": "public static final",
"original_string": "public static final String PHOENIX_TEST_DRIVER_URL_PARAM = \"test=true\";",
"type": "String",
"var_name": "PHOENIX_TEST_DRIVER_URL_PARAM"
},
{
"declarator": "SCHEMA_ATTRIB = \"schema\"",
"modifier": "public static final",
"original_string": "public static final String SCHEMA_ATTRIB = \"schema\";",
"type": "String",
"var_name": "SCHEMA_ATTRIB"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixRuntime.java",
"identifier": "PhoenixRuntime",
"interfaces": "",
"methods": [
{
"class_method_signature": "PhoenixRuntime.main(String [] args)",
"constructor": false,
"full_signature": "public static void main(String [] args)",
"identifier": "main",
"modifiers": "public static",
"parameters": "(String [] args)",
"return": "void",
"signature": "void main(String [] args)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.PhoenixRuntime()",
"constructor": true,
"full_signature": "private PhoenixRuntime()",
"identifier": "PhoenixRuntime",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " PhoenixRuntime()",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.executeStatements(Connection conn, Reader reader, List<Object> binds)",
"constructor": false,
"full_signature": "public static int executeStatements(Connection conn, Reader reader, List<Object> binds)",
"identifier": "executeStatements",
"modifiers": "public static",
"parameters": "(Connection conn, Reader reader, List<Object> binds)",
"return": "int",
"signature": "int executeStatements(Connection conn, Reader reader, List<Object> binds)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getUncommittedData(Connection conn)",
"constructor": false,
"full_signature": "@Deprecated public static List<Cell> getUncommittedData(Connection conn)",
"identifier": "getUncommittedData",
"modifiers": "@Deprecated public static",
"parameters": "(Connection conn)",
"return": "List<Cell>",
"signature": "List<Cell> getUncommittedData(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getUncommittedDataIterator(Connection conn)",
"constructor": false,
"full_signature": "public static Iterator<Pair<byte[],List<Cell>>> getUncommittedDataIterator(Connection conn)",
"identifier": "getUncommittedDataIterator",
"modifiers": "public static",
"parameters": "(Connection conn)",
"return": "Iterator<Pair<byte[],List<Cell>>>",
"signature": "Iterator<Pair<byte[],List<Cell>>> getUncommittedDataIterator(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getUncommittedDataIterator(Connection conn, boolean includeMutableIndexes)",
"constructor": false,
"full_signature": "public static Iterator<Pair<byte[],List<Cell>>> getUncommittedDataIterator(Connection conn, boolean includeMutableIndexes)",
"identifier": "getUncommittedDataIterator",
"modifiers": "public static",
"parameters": "(Connection conn, boolean includeMutableIndexes)",
"return": "Iterator<Pair<byte[],List<Cell>>>",
"signature": "Iterator<Pair<byte[],List<Cell>>> getUncommittedDataIterator(Connection conn, boolean includeMutableIndexes)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getTableNoCache(Connection conn, String name)",
"constructor": false,
"full_signature": "public static PTable getTableNoCache(Connection conn, String name)",
"identifier": "getTableNoCache",
"modifiers": "public static",
"parameters": "(Connection conn, String name)",
"return": "PTable",
"signature": "PTable getTableNoCache(Connection conn, String name)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getTable(Connection conn, String name)",
"constructor": false,
"full_signature": "public static PTable getTable(Connection conn, String name)",
"identifier": "getTable",
"modifiers": "public static",
"parameters": "(Connection conn, String name)",
"return": "PTable",
"signature": "PTable getTable(Connection conn, String name)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getTable(Connection conn, String tenantId, String fullTableName)",
"constructor": false,
"full_signature": "public static PTable getTable(Connection conn, String tenantId, String fullTableName)",
"identifier": "getTable",
"modifiers": "public static",
"parameters": "(Connection conn, String tenantId, String fullTableName)",
"return": "PTable",
"signature": "PTable getTable(Connection conn, String tenantId, String fullTableName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getTable(Connection conn, @Nullable String tenantId, String fullTableName,\n @Nullable Long timestamp)",
"constructor": false,
"full_signature": "public static PTable getTable(Connection conn, @Nullable String tenantId, String fullTableName,\n @Nullable Long timestamp)",
"identifier": "getTable",
"modifiers": "public static",
"parameters": "(Connection conn, @Nullable String tenantId, String fullTableName,\n @Nullable Long timestamp)",
"return": "PTable",
"signature": "PTable getTable(Connection conn, @Nullable String tenantId, String fullTableName,\n @Nullable Long timestamp)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.generateColumnInfo(Connection conn,\n String tableName, List<String> columns)",
"constructor": false,
"full_signature": "public static List<ColumnInfo> generateColumnInfo(Connection conn,\n String tableName, List<String> columns)",
"identifier": "generateColumnInfo",
"modifiers": "public static",
"parameters": "(Connection conn,\n String tableName, List<String> columns)",
"return": "List<ColumnInfo>",
"signature": "List<ColumnInfo> generateColumnInfo(Connection conn,\n String tableName, List<String> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getColumnInfo(PTable table, String columnName)",
"constructor": false,
"full_signature": "public static ColumnInfo getColumnInfo(PTable table, String columnName)",
"identifier": "getColumnInfo",
"modifiers": "public static",
"parameters": "(PTable table, String columnName)",
"return": "ColumnInfo",
"signature": "ColumnInfo getColumnInfo(PTable table, String columnName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getColumnInfo(PColumn pColumn)",
"constructor": false,
"full_signature": "public static ColumnInfo getColumnInfo(PColumn pColumn)",
"identifier": "getColumnInfo",
"modifiers": "public static",
"parameters": "(PColumn pColumn)",
"return": "ColumnInfo",
"signature": "ColumnInfo getColumnInfo(PColumn pColumn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getOptimizedQueryPlan(PreparedStatement stmt)",
"constructor": false,
"full_signature": "public static QueryPlan getOptimizedQueryPlan(PreparedStatement stmt)",
"identifier": "getOptimizedQueryPlan",
"modifiers": "public static",
"parameters": "(PreparedStatement stmt)",
"return": "QueryPlan",
"signature": "QueryPlan getOptimizedQueryPlan(PreparedStatement stmt)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.hasOrderBy(QueryPlan plan)",
"constructor": false,
"full_signature": "public static boolean hasOrderBy(QueryPlan plan)",
"identifier": "hasOrderBy",
"modifiers": "public static",
"parameters": "(QueryPlan plan)",
"return": "boolean",
"signature": "boolean hasOrderBy(QueryPlan plan)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getLimit(QueryPlan plan)",
"constructor": false,
"full_signature": "public static int getLimit(QueryPlan plan)",
"identifier": "getLimit",
"modifiers": "public static",
"parameters": "(QueryPlan plan)",
"return": "int",
"signature": "int getLimit(QueryPlan plan)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.addQuotes(String str)",
"constructor": false,
"full_signature": "private static String addQuotes(String str)",
"identifier": "addQuotes",
"modifiers": "private static",
"parameters": "(String str)",
"return": "String",
"signature": "String addQuotes(String str)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPkColsForSql(Connection conn, QueryPlan plan)",
"constructor": false,
"full_signature": "public static List<Pair<String, String>> getPkColsForSql(Connection conn, QueryPlan plan)",
"identifier": "getPkColsForSql",
"modifiers": "public static",
"parameters": "(Connection conn, QueryPlan plan)",
"return": "List<Pair<String, String>>",
"signature": "List<Pair<String, String>> getPkColsForSql(Connection conn, QueryPlan plan)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPkColsForSql(List<Pair<String, String>> columns, QueryPlan plan, Connection conn, boolean forDataTable)",
"constructor": false,
"full_signature": "@Deprecated public static void getPkColsForSql(List<Pair<String, String>> columns, QueryPlan plan, Connection conn, boolean forDataTable)",
"identifier": "getPkColsForSql",
"modifiers": "@Deprecated public static",
"parameters": "(List<Pair<String, String>> columns, QueryPlan plan, Connection conn, boolean forDataTable)",
"return": "void",
"signature": "void getPkColsForSql(List<Pair<String, String>> columns, QueryPlan plan, Connection conn, boolean forDataTable)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPkColsDataTypesForSql(List<Pair<String, String>> columns, List<String> dataTypes, QueryPlan plan, Connection conn, boolean forDataTable)",
"constructor": false,
"full_signature": "@Deprecated public static void getPkColsDataTypesForSql(List<Pair<String, String>> columns, List<String> dataTypes, QueryPlan plan, Connection conn, boolean forDataTable)",
"identifier": "getPkColsDataTypesForSql",
"modifiers": "@Deprecated public static",
"parameters": "(List<Pair<String, String>> columns, List<String> dataTypes, QueryPlan plan, Connection conn, boolean forDataTable)",
"return": "void",
"signature": "void getPkColsDataTypesForSql(List<Pair<String, String>> columns, List<String> dataTypes, QueryPlan plan, Connection conn, boolean forDataTable)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getSqlTypeName(PColumn pCol)",
"constructor": false,
"full_signature": "public static String getSqlTypeName(PColumn pCol)",
"identifier": "getSqlTypeName",
"modifiers": "public static",
"parameters": "(PColumn pCol)",
"return": "String",
"signature": "String getSqlTypeName(PColumn pCol)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getSqlTypeName(PDataType dataType, Integer maxLength, Integer scale)",
"constructor": false,
"full_signature": "public static String getSqlTypeName(PDataType dataType, Integer maxLength, Integer scale)",
"identifier": "getSqlTypeName",
"modifiers": "public static",
"parameters": "(PDataType dataType, Integer maxLength, Integer scale)",
"return": "String",
"signature": "String getSqlTypeName(PDataType dataType, Integer maxLength, Integer scale)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getArraySqlTypeName(@Nullable Integer maxLength, @Nullable Integer scale, PDataType arrayType)",
"constructor": false,
"full_signature": "public static String getArraySqlTypeName(@Nullable Integer maxLength, @Nullable Integer scale, PDataType arrayType)",
"identifier": "getArraySqlTypeName",
"modifiers": "public static",
"parameters": "(@Nullable Integer maxLength, @Nullable Integer scale, PDataType arrayType)",
"return": "String",
"signature": "String getArraySqlTypeName(@Nullable Integer maxLength, @Nullable Integer scale, PDataType arrayType)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.appendMaxLengthAndScale(@Nullable Integer maxLength, @Nullable Integer scale, String sqlTypeName)",
"constructor": false,
"full_signature": "private static String appendMaxLengthAndScale(@Nullable Integer maxLength, @Nullable Integer scale, String sqlTypeName)",
"identifier": "appendMaxLengthAndScale",
"modifiers": "private static",
"parameters": "(@Nullable Integer maxLength, @Nullable Integer scale, String sqlTypeName)",
"return": "String",
"signature": "String appendMaxLengthAndScale(@Nullable Integer maxLength, @Nullable Integer scale, String sqlTypeName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPkColumns(PTable ptable, Connection conn, boolean forDataTable)",
"constructor": false,
"full_signature": "@Deprecated private static List<PColumn> getPkColumns(PTable ptable, Connection conn, boolean forDataTable)",
"identifier": "getPkColumns",
"modifiers": "@Deprecated private static",
"parameters": "(PTable ptable, Connection conn, boolean forDataTable)",
"return": "List<PColumn>",
"signature": "List<PColumn> getPkColumns(PTable ptable, Connection conn, boolean forDataTable)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPkColumns(PTable ptable, Connection conn)",
"constructor": false,
"full_signature": "private static List<PColumn> getPkColumns(PTable ptable, Connection conn)",
"identifier": "getPkColumns",
"modifiers": "private static",
"parameters": "(PTable ptable, Connection conn)",
"return": "List<PColumn>",
"signature": "List<PColumn> getPkColumns(PTable ptable, Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.encodeValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "@Deprecated public static byte[] encodeValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"identifier": "encodeValues",
"modifiers": "@Deprecated public static",
"parameters": "(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"return": "byte[]",
"signature": "byte[] encodeValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.decodeValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "@Deprecated public static Object[] decodeValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"identifier": "decodeValues",
"modifiers": "@Deprecated public static",
"parameters": "(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"return": "Object[]",
"signature": "Object[] decodeValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.encodeColumnValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "public static byte[] encodeColumnValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"identifier": "encodeColumnValues",
"modifiers": "public static",
"parameters": "(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"return": "byte[]",
"signature": "byte[] encodeColumnValues(Connection conn, String fullTableName, Object[] values, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.decodeColumnValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "public static Object[] decodeColumnValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"identifier": "decodeColumnValues",
"modifiers": "public static",
"parameters": "(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"return": "Object[]",
"signature": "Object[] decodeColumnValues(Connection conn, String fullTableName, byte[] value, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.buildKeyValueSchema(List<PColumn> columns)",
"constructor": false,
"full_signature": "public static KeyValueSchema buildKeyValueSchema(List<PColumn> columns)",
"identifier": "buildKeyValueSchema",
"modifiers": "public static",
"parameters": "(List<PColumn> columns)",
"return": "KeyValueSchema",
"signature": "KeyValueSchema buildKeyValueSchema(List<PColumn> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getMinNullableIndex(List<PColumn> columns)",
"constructor": false,
"full_signature": "private static int getMinNullableIndex(List<PColumn> columns)",
"identifier": "getMinNullableIndex",
"modifiers": "private static",
"parameters": "(List<PColumn> columns)",
"return": "int",
"signature": "int getMinNullableIndex(List<PColumn> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPColumns(PTable table, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "@Deprecated private static List<PColumn> getPColumns(PTable table, List<Pair<String, String>> columns)",
"identifier": "getPColumns",
"modifiers": "@Deprecated private static",
"parameters": "(PTable table, List<Pair<String, String>> columns)",
"return": "List<PColumn>",
"signature": "List<PColumn> getPColumns(PTable table, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getPColumn(PTable table, @Nullable String familyName, String columnName)",
"constructor": false,
"full_signature": "@Deprecated private static PColumn getPColumn(PTable table, @Nullable String familyName, String columnName)",
"identifier": "getPColumn",
"modifiers": "@Deprecated private static",
"parameters": "(PTable table, @Nullable String familyName, String columnName)",
"return": "PColumn",
"signature": "PColumn getPColumn(PTable table, @Nullable String familyName, String columnName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getColumns(PTable table, List<Pair<String, String>> columns)",
"constructor": false,
"full_signature": "private static List<PColumn> getColumns(PTable table, List<Pair<String, String>> columns)",
"identifier": "getColumns",
"modifiers": "private static",
"parameters": "(PTable table, List<Pair<String, String>> columns)",
"return": "List<PColumn>",
"signature": "List<PColumn> getColumns(PTable table, List<Pair<String, String>> columns)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getColumn(PTable table, @Nullable String familyName, String columnName)",
"constructor": false,
"full_signature": "private static PColumn getColumn(PTable table, @Nullable String familyName, String columnName)",
"identifier": "getColumn",
"modifiers": "private static",
"parameters": "(PTable table, @Nullable String familyName, String columnName)",
"return": "PColumn",
"signature": "PColumn getColumn(PTable table, @Nullable String familyName, String columnName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getTenantIdExpression(Connection conn, String fullTableName)",
"constructor": false,
"full_signature": "public static Expression getTenantIdExpression(Connection conn, String fullTableName)",
"identifier": "getTenantIdExpression",
"modifiers": "public static",
"parameters": "(Connection conn, String fullTableName)",
"return": "Expression",
"signature": "Expression getTenantIdExpression(Connection conn, String fullTableName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getFirstPKColumnExpression(Connection conn, String fullTableName)",
"constructor": false,
"full_signature": "public static Expression getFirstPKColumnExpression(Connection conn, String fullTableName)",
"identifier": "getFirstPKColumnExpression",
"modifiers": "public static",
"parameters": "(Connection conn, String fullTableName)",
"return": "Expression",
"signature": "Expression getFirstPKColumnExpression(Connection conn, String fullTableName)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getFirstPKColumnExpression(PTable table)",
"constructor": false,
"full_signature": "private static Expression getFirstPKColumnExpression(PTable table)",
"identifier": "getFirstPKColumnExpression",
"modifiers": "private static",
"parameters": "(PTable table)",
"return": "Expression",
"signature": "Expression getFirstPKColumnExpression(PTable table)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getGlobalPhoenixClientMetrics()",
"constructor": false,
"full_signature": "public static Collection<GlobalMetric> getGlobalPhoenixClientMetrics()",
"identifier": "getGlobalPhoenixClientMetrics",
"modifiers": "public static",
"parameters": "()",
"return": "Collection<GlobalMetric>",
"signature": "Collection<GlobalMetric> getGlobalPhoenixClientMetrics()",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.areGlobalClientMetricsBeingCollected()",
"constructor": false,
"full_signature": "public static boolean areGlobalClientMetricsBeingCollected()",
"identifier": "areGlobalClientMetricsBeingCollected",
"modifiers": "public static",
"parameters": "()",
"return": "boolean",
"signature": "boolean areGlobalClientMetricsBeingCollected()",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.createMetricMap(Map<MetricType, Long> metricInfoMap)",
"constructor": false,
"full_signature": "private static Map<String, Long> createMetricMap(Map<MetricType, Long> metricInfoMap)",
"identifier": "createMetricMap",
"modifiers": "private static",
"parameters": "(Map<MetricType, Long> metricInfoMap)",
"return": "Map<String, Long>",
"signature": "Map<String, Long> createMetricMap(Map<MetricType, Long> metricInfoMap)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.transformMetrics(Map<String, Map<MetricType, Long>> metricMap)",
"constructor": false,
"full_signature": "private static Map<String, Map<String, Long>> transformMetrics(Map<String, Map<MetricType, Long>> metricMap)",
"identifier": "transformMetrics",
"modifiers": "private static",
"parameters": "(Map<String, Map<MetricType, Long>> metricMap)",
"return": "Map<String, Map<String, Long>>",
"signature": "Map<String, Map<String, Long>> transformMetrics(Map<String, Map<MetricType, Long>> metricMap)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getRequestReadMetricInfo(ResultSet rs)",
"constructor": false,
"full_signature": "public static Map<String, Map<MetricType, Long>> getRequestReadMetricInfo(ResultSet rs)",
"identifier": "getRequestReadMetricInfo",
"modifiers": "public static",
"parameters": "(ResultSet rs)",
"return": "Map<String, Map<MetricType, Long>>",
"signature": "Map<String, Map<MetricType, Long>> getRequestReadMetricInfo(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getRequestReadMetrics(ResultSet rs)",
"constructor": false,
"full_signature": "@Deprecated // use getRequestReadMetricInfo public static Map<String, Map<String, Long>> getRequestReadMetrics(ResultSet rs)",
"identifier": "getRequestReadMetrics",
"modifiers": "@Deprecated // use getRequestReadMetricInfo public static",
"parameters": "(ResultSet rs)",
"return": "Map<String, Map<String, Long>>",
"signature": "Map<String, Map<String, Long>> getRequestReadMetrics(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getOverAllReadRequestMetricInfo(ResultSet rs)",
"constructor": false,
"full_signature": "public static Map<MetricType, Long> getOverAllReadRequestMetricInfo(ResultSet rs)",
"identifier": "getOverAllReadRequestMetricInfo",
"modifiers": "public static",
"parameters": "(ResultSet rs)",
"return": "Map<MetricType, Long>",
"signature": "Map<MetricType, Long> getOverAllReadRequestMetricInfo(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getOverAllReadRequestMetrics(ResultSet rs)",
"constructor": false,
"full_signature": "@Deprecated // use getOverAllReadRequestMetricInfo public static Map<String, Long> getOverAllReadRequestMetrics(ResultSet rs)",
"identifier": "getOverAllReadRequestMetrics",
"modifiers": "@Deprecated // use getOverAllReadRequestMetricInfo public static",
"parameters": "(ResultSet rs)",
"return": "Map<String, Long>",
"signature": "Map<String, Long> getOverAllReadRequestMetrics(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getWriteMetricInfoForMutationsSinceLastReset(Connection conn)",
"constructor": false,
"full_signature": "public static Map<String, Map<MetricType, Long>> getWriteMetricInfoForMutationsSinceLastReset(Connection conn)",
"identifier": "getWriteMetricInfoForMutationsSinceLastReset",
"modifiers": "public static",
"parameters": "(Connection conn)",
"return": "Map<String, Map<MetricType, Long>>",
"signature": "Map<String, Map<MetricType, Long>> getWriteMetricInfoForMutationsSinceLastReset(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getWriteMetricsForMutationsSinceLastReset(Connection conn)",
"constructor": false,
"full_signature": "@Deprecated // use getWriteMetricInfoForMutationsSinceLastReset public static Map<String, Map<String, Long>> getWriteMetricsForMutationsSinceLastReset(Connection conn)",
"identifier": "getWriteMetricsForMutationsSinceLastReset",
"modifiers": "@Deprecated // use getWriteMetricInfoForMutationsSinceLastReset public static",
"parameters": "(Connection conn)",
"return": "Map<String, Map<String, Long>>",
"signature": "Map<String, Map<String, Long>> getWriteMetricsForMutationsSinceLastReset(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getReadMetricInfoForMutationsSinceLastReset(Connection conn)",
"constructor": false,
"full_signature": "public static Map<String, Map<MetricType, Long>> getReadMetricInfoForMutationsSinceLastReset(Connection conn)",
"identifier": "getReadMetricInfoForMutationsSinceLastReset",
"modifiers": "public static",
"parameters": "(Connection conn)",
"return": "Map<String, Map<MetricType, Long>>",
"signature": "Map<String, Map<MetricType, Long>> getReadMetricInfoForMutationsSinceLastReset(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getReadMetricsForMutationsSinceLastReset(Connection conn)",
"constructor": false,
"full_signature": "@Deprecated // use getReadMetricInfoForMutationsSinceLastReset public static Map<String, Map<String, Long>> getReadMetricsForMutationsSinceLastReset(Connection conn)",
"identifier": "getReadMetricsForMutationsSinceLastReset",
"modifiers": "@Deprecated // use getReadMetricInfoForMutationsSinceLastReset public static",
"parameters": "(Connection conn)",
"return": "Map<String, Map<String, Long>>",
"signature": "Map<String, Map<String, Long>> getReadMetricsForMutationsSinceLastReset(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.resetMetrics(ResultSet rs)",
"constructor": false,
"full_signature": "public static void resetMetrics(ResultSet rs)",
"identifier": "resetMetrics",
"modifiers": "public static",
"parameters": "(ResultSet rs)",
"return": "void",
"signature": "void resetMetrics(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.resetMetrics(Connection conn)",
"constructor": false,
"full_signature": "public static void resetMetrics(Connection conn)",
"identifier": "resetMetrics",
"modifiers": "public static",
"parameters": "(Connection conn)",
"return": "void",
"signature": "void resetMetrics(Connection conn)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getWallClockTimeFromCellTimeStamp(long tsOfCell)",
"constructor": false,
"full_signature": "public static long getWallClockTimeFromCellTimeStamp(long tsOfCell)",
"identifier": "getWallClockTimeFromCellTimeStamp",
"modifiers": "public static",
"parameters": "(long tsOfCell)",
"return": "long",
"signature": "long getWallClockTimeFromCellTimeStamp(long tsOfCell)",
"testcase": false
},
{
"class_method_signature": "PhoenixRuntime.getCurrentScn(ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static long getCurrentScn(ReadOnlyProps props)",
"identifier": "getCurrentScn",
"modifiers": "public static",
"parameters": "(ReadOnlyProps props)",
"return": "long",
"signature": "long getCurrentScn(ReadOnlyProps props)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static Expression getTenantIdExpression(Connection conn, String fullTableName) throws SQLException {\n PTable table = getTable(conn, fullTableName);\n // TODO: consider setting MULTI_TENANT = true for SYSTEM.CATALOG and SYSTEM.SEQUENCE\n if (!SchemaUtil.isMetaTable(table) && !SchemaUtil.isSequenceTable(table) && !table.isMultiTenant()) {\n return null;\n }\n return getFirstPKColumnExpression(table);\n }",
"class_method_signature": "PhoenixRuntime.getTenantIdExpression(Connection conn, String fullTableName)",
"constructor": false,
"full_signature": "public static Expression getTenantIdExpression(Connection conn, String fullTableName)",
"identifier": "getTenantIdExpression",
"invocations": [
"getTable",
"isMetaTable",
"isSequenceTable",
"isMultiTenant",
"getFirstPKColumnExpression"
],
"modifiers": "public static",
"parameters": "(Connection conn, String fullTableName)",
"return": "Expression",
"signature": "Expression getTenantIdExpression(Connection conn, String fullTableName)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_41 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java",
"identifier": "JDBCUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetAutoCommit_NotSpecified_DefaultTrue() {\n assertTrue(JDBCUtil.getAutoCommit(\"localhost\", new Properties(), true));\n }",
"class_method_signature": "JDBCUtilTest.testGetAutoCommit_NotSpecified_DefaultTrue()",
"constructor": false,
"full_signature": "@Test public void testGetAutoCommit_NotSpecified_DefaultTrue()",
"identifier": "testGetAutoCommit_NotSpecified_DefaultTrue",
"invocations": [
"assertTrue",
"getAutoCommit"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetAutoCommit_NotSpecified_DefaultTrue()",
"testcase": true
} | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java",
"identifier": "JDBCUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "JDBCUtil.JDBCUtil()",
"constructor": true,
"full_signature": "private JDBCUtil()",
"identifier": "JDBCUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " JDBCUtil()",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.findProperty(String url, Properties info, String propName)",
"constructor": false,
"full_signature": "public static String findProperty(String url, Properties info, String propName)",
"identifier": "findProperty",
"modifiers": "public static",
"parameters": "(String url, Properties info, String propName)",
"return": "String",
"signature": "String findProperty(String url, Properties info, String propName)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.removeProperty(String url, String propName)",
"constructor": false,
"full_signature": "public static String removeProperty(String url, String propName)",
"identifier": "removeProperty",
"modifiers": "public static",
"parameters": "(String url, String propName)",
"return": "String",
"signature": "String removeProperty(String url, String propName)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getCombinedConnectionProperties(String url, Properties info)",
"constructor": false,
"full_signature": "private static Map<String, String> getCombinedConnectionProperties(String url, Properties info)",
"identifier": "getCombinedConnectionProperties",
"modifiers": "private static",
"parameters": "(String url, Properties info)",
"return": "Map<String, String>",
"signature": "Map<String, String> getCombinedConnectionProperties(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getAnnotations(@NonNull String url, @NonNull Properties info)",
"constructor": false,
"full_signature": "public static Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info)",
"identifier": "getAnnotations",
"modifiers": "public static",
"parameters": "(@NonNull String url, @NonNull Properties info)",
"return": "Map<String, String>",
"signature": "Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getCurrentSCN(String url, Properties info)",
"constructor": false,
"full_signature": "public static Long getCurrentSCN(String url, Properties info)",
"identifier": "getCurrentSCN",
"modifiers": "public static",
"parameters": "(String url, Properties info)",
"return": "Long",
"signature": "Long getCurrentSCN(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getBuildIndexSCN(String url, Properties info)",
"constructor": false,
"full_signature": "public static Long getBuildIndexSCN(String url, Properties info)",
"identifier": "getBuildIndexSCN",
"modifiers": "public static",
"parameters": "(String url, Properties info)",
"return": "Long",
"signature": "Long getBuildIndexSCN(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static int getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"identifier": "getMutateBatchSize",
"modifiers": "public static",
"parameters": "(String url, Properties info, ReadOnlyProps props)",
"return": "int",
"signature": "int getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"identifier": "getMutateBatchSizeBytes",
"modifiers": "public static",
"parameters": "(String url, Properties info, ReadOnlyProps props)",
"return": "long",
"signature": "long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getTenantId(String url, Properties info)",
"constructor": false,
"full_signature": "public static @Nullable PName getTenantId(String url, Properties info)",
"identifier": "getTenantId",
"modifiers": "public static @Nullable",
"parameters": "(String url, Properties info)",
"return": "PName",
"signature": "PName getTenantId(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getAutoCommit(String url, Properties info, boolean defaultValue)",
"constructor": false,
"full_signature": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"identifier": "getAutoCommit",
"modifiers": "public static",
"parameters": "(String url, Properties info, boolean defaultValue)",
"return": "boolean",
"signature": "boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getConsistencyLevel(String url, Properties info, String defaultValue)",
"constructor": false,
"full_signature": "public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"identifier": "getConsistencyLevel",
"modifiers": "public static",
"parameters": "(String url, Properties info, String defaultValue)",
"return": "Consistency",
"signature": "Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"constructor": false,
"full_signature": "public static boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"identifier": "isCollectingRequestLevelMetricsEnabled",
"modifiers": "public static",
"parameters": "(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"return": "boolean",
"signature": "boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getSchema(String url, Properties info, String defaultValue)",
"constructor": false,
"full_signature": "public static String getSchema(String url, Properties info, String defaultValue)",
"identifier": "getSchema",
"modifiers": "public static",
"parameters": "(String url, Properties info, String defaultValue)",
"return": "String",
"signature": "String getSchema(String url, Properties info, String defaultValue)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue) {\n String autoCommit = findProperty(url, info, PhoenixRuntime.AUTO_COMMIT_ATTRIB);\n if (autoCommit == null) {\n return defaultValue;\n }\n return Boolean.valueOf(autoCommit);\n }",
"class_method_signature": "JDBCUtil.getAutoCommit(String url, Properties info, boolean defaultValue)",
"constructor": false,
"full_signature": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"identifier": "getAutoCommit",
"invocations": [
"findProperty",
"valueOf"
],
"modifiers": "public static",
"parameters": "(String url, Properties info, boolean defaultValue)",
"return": "boolean",
"signature": "boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_154 | {
"fields": [
{
"declarator": "TABLE_NAME = TableName.create(null,\"TABLE1\")",
"modifier": "private static",
"original_string": "private static TableName TABLE_NAME = TableName.create(null,\"TABLE1\");",
"type": "TableName",
"var_name": "TABLE_NAME"
},
{
"declarator": "offsetCompiler",
"modifier": "",
"original_string": "RVCOffsetCompiler offsetCompiler;",
"type": "RVCOffsetCompiler",
"var_name": "offsetCompiler"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/compile/RVCOffsetCompilerTest.java",
"identifier": "RVCOffsetCompilerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void buildListOfColumnParseNodesTest() throws Exception {\n List<ParseNode> children = new ArrayList<>();\n ColumnParseNode col1 = new ColumnParseNode(TABLE_NAME,\"col1\");\n ColumnParseNode col2 = new ColumnParseNode(TABLE_NAME,\"col2\");\n\n children.add(col1);\n children.add(col2);\n RowValueConstructorParseNode rvc = new RowValueConstructorParseNode(children);\n\n List<ColumnParseNode>\n result =\n offsetCompiler.buildListOfColumnParseNodes(rvc, true);\n\n assertEquals(2,result.size());\n assertEquals(col1,result.get(0));\n assertEquals(col2,result.get(1));\n }",
"class_method_signature": "RVCOffsetCompilerTest.buildListOfColumnParseNodesTest()",
"constructor": false,
"full_signature": "@Test public void buildListOfColumnParseNodesTest()",
"identifier": "buildListOfColumnParseNodesTest",
"invocations": [
"add",
"add",
"buildListOfColumnParseNodes",
"assertEquals",
"size",
"assertEquals",
"get",
"assertEquals",
"get"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void buildListOfColumnParseNodesTest()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class)",
"modifier": "private final static",
"original_string": "private final static Logger LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "INSTANCE = new RVCOffsetCompiler()",
"modifier": "private final static",
"original_string": "private final static RVCOffsetCompiler INSTANCE = new RVCOffsetCompiler();",
"type": "RVCOffsetCompiler",
"var_name": "INSTANCE"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/compile/RVCOffsetCompiler.java",
"identifier": "RVCOffsetCompiler",
"interfaces": "",
"methods": [
{
"class_method_signature": "RVCOffsetCompiler.RVCOffsetCompiler()",
"constructor": true,
"full_signature": "private RVCOffsetCompiler()",
"identifier": "RVCOffsetCompiler",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " RVCOffsetCompiler()",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.getInstance()",
"constructor": false,
"full_signature": "public static RVCOffsetCompiler getInstance()",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "()",
"return": "RVCOffsetCompiler",
"signature": "RVCOffsetCompiler getInstance()",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"constructor": false,
"full_signature": "public CompiledOffset getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"identifier": "getRVCOffset",
"modifiers": "public",
"parameters": "(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"return": "CompiledOffset",
"signature": "CompiledOffset getRVCOffset(StatementContext context, FilterableStatement statement,\n boolean inJoin, boolean inUnion, OffsetNode offsetNode)",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"identifier": "buildListOfRowKeyColumnExpressions",
"modifiers": "@VisibleForTesting",
"parameters": "(\n Expression whereExpression, boolean isIndex)",
"return": "RowKeyColumnExpressionOutput",
"signature": "RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions(\n Expression whereExpression, boolean isIndex)",
"testcase": false
},
{
"class_method_signature": "RVCOffsetCompiler.buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"identifier": "buildListOfColumnParseNodes",
"modifiers": "@VisibleForTesting",
"parameters": "(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"return": "List<ColumnParseNode>",
"signature": "List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)\n throws RowValueConstructorOffsetNotCoercibleException {\n List<ColumnParseNode> nodes = new ArrayList<ColumnParseNode>();\n for (ParseNode node : rvcColumnsParseNode.getChildren()) {\n // Note that since we store indexes in variable length form there may be casts from fixed types to\n // variable length\n if (isIndex) {\n if (node instanceof CastParseNode) {\n // Cast today has 1 child\n node = node.getChildren().get(0);\n }\n }\n\n if (!(node instanceof ColumnParseNode)) {\n throw new RowValueConstructorOffsetNotCoercibleException(\n \"RVC Offset must specify the tables PKs.\");\n } else {\n nodes.add((ColumnParseNode) node);\n }\n }\n return nodes;\n }",
"class_method_signature": "RVCOffsetCompiler.buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"constructor": false,
"full_signature": "@VisibleForTesting List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"identifier": "buildListOfColumnParseNodes",
"invocations": [
"getChildren",
"get",
"getChildren",
"add"
],
"modifiers": "@VisibleForTesting",
"parameters": "(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"return": "List<ColumnParseNode>",
"signature": "List<ColumnParseNode> buildListOfColumnParseNodes(\n RowValueConstructorParseNode rvcColumnsParseNode, boolean isIndex)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_142 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/mapreduce/FormatToBytesWritableMapperTest.java",
"identifier": "FormatToBytesWritableMapperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildColumnInfoList() {\n List<ColumnInfo> columnInfoList = ImmutableList.of(\n new ColumnInfo(\"idCol\", PInteger.INSTANCE.getSqlType()),\n new ColumnInfo(\"unsignedIntCol\", PUnsignedInt.INSTANCE.getSqlType()),\n new ColumnInfo(\"stringArrayCol\", PIntegerArray.INSTANCE.getSqlType()));\n\n Configuration conf = new Configuration();\n FormatToBytesWritableMapper.configureColumnInfoList(conf, columnInfoList);\n List<ColumnInfo> fromConfig = FormatToBytesWritableMapper.buildColumnInfoList(conf);\n\n assertEquals(columnInfoList, fromConfig);\n }",
"class_method_signature": "FormatToBytesWritableMapperTest.testBuildColumnInfoList()",
"constructor": false,
"full_signature": "@Test public void testBuildColumnInfoList()",
"identifier": "testBuildColumnInfoList",
"invocations": [
"of",
"getSqlType",
"getSqlType",
"getSqlType",
"configureColumnInfoList",
"buildColumnInfoList",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testBuildColumnInfoList()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(FormatToBytesWritableMapper.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger LOGGER = LoggerFactory.getLogger(FormatToBytesWritableMapper.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "COUNTER_GROUP_NAME = \"Phoenix MapReduce Import\"",
"modifier": "protected static final",
"original_string": "protected static final String COUNTER_GROUP_NAME = \"Phoenix MapReduce Import\";",
"type": "String",
"var_name": "COUNTER_GROUP_NAME"
},
{
"declarator": "TABLE_NAME_CONFKEY = \"phoenix.mapreduce.import.tablename\"",
"modifier": "public static final",
"original_string": "public static final String TABLE_NAME_CONFKEY = \"phoenix.mapreduce.import.tablename\";",
"type": "String",
"var_name": "TABLE_NAME_CONFKEY"
},
{
"declarator": "COLUMN_INFO_CONFKEY = \"phoenix.mapreduce.import.columninfos\"",
"modifier": "public static final",
"original_string": "public static final String COLUMN_INFO_CONFKEY = \"phoenix.mapreduce.import.columninfos\";",
"type": "String",
"var_name": "COLUMN_INFO_CONFKEY"
},
{
"declarator": "IGNORE_INVALID_ROW_CONFKEY = \"phoenix.mapreduce.import.ignoreinvalidrow\"",
"modifier": "public static final",
"original_string": "public static final String IGNORE_INVALID_ROW_CONFKEY = \"phoenix.mapreduce.import.ignoreinvalidrow\";",
"type": "String",
"var_name": "IGNORE_INVALID_ROW_CONFKEY"
},
{
"declarator": "TABLE_NAMES_CONFKEY = \"phoenix.mapreduce.import.tablenames\"",
"modifier": "public static final",
"original_string": "public static final String TABLE_NAMES_CONFKEY = \"phoenix.mapreduce.import.tablenames\";",
"type": "String",
"var_name": "TABLE_NAMES_CONFKEY"
},
{
"declarator": "LOGICAL_NAMES_CONFKEY = \"phoenix.mapreduce.import.logicalnames\"",
"modifier": "public static final",
"original_string": "public static final String LOGICAL_NAMES_CONFKEY = \"phoenix.mapreduce.import.logicalnames\";",
"type": "String",
"var_name": "LOGICAL_NAMES_CONFKEY"
},
{
"declarator": "conn",
"modifier": "protected",
"original_string": "protected PhoenixConnection conn;",
"type": "PhoenixConnection",
"var_name": "conn"
},
{
"declarator": "upsertExecutor",
"modifier": "protected",
"original_string": "protected UpsertExecutor<RECORD, ?> upsertExecutor;",
"type": "UpsertExecutor<RECORD, ?>",
"var_name": "upsertExecutor"
},
{
"declarator": "preUpdateProcessor",
"modifier": "protected",
"original_string": "protected ImportPreUpsertKeyValueProcessor preUpdateProcessor;",
"type": "ImportPreUpsertKeyValueProcessor",
"var_name": "preUpdateProcessor"
},
{
"declarator": "tableNames",
"modifier": "protected",
"original_string": "protected List<String> tableNames;",
"type": "List<String>",
"var_name": "tableNames"
},
{
"declarator": "logicalNames",
"modifier": "protected",
"original_string": "protected List<String> logicalNames;",
"type": "List<String>",
"var_name": "logicalNames"
},
{
"declarator": "upsertListener",
"modifier": "protected",
"original_string": "protected MapperUpsertListener<RECORD> upsertListener;",
"type": "MapperUpsertListener<RECORD>",
"var_name": "upsertListener"
},
{
"declarator": "columnIndexes",
"modifier": "protected",
"original_string": "protected Map<byte[], Integer> columnIndexes;",
"type": "Map<byte[], Integer>",
"var_name": "columnIndexes"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/mapreduce/FormatToBytesWritableMapper.java",
"identifier": "FormatToBytesWritableMapper",
"interfaces": "",
"methods": [
{
"class_method_signature": "FormatToBytesWritableMapper.buildUpsertExecutor(Configuration conf)",
"constructor": false,
"full_signature": "protected abstract UpsertExecutor<RECORD,?> buildUpsertExecutor(Configuration conf)",
"identifier": "buildUpsertExecutor",
"modifiers": "protected abstract",
"parameters": "(Configuration conf)",
"return": "UpsertExecutor<RECORD,?>",
"signature": "UpsertExecutor<RECORD,?> buildUpsertExecutor(Configuration conf)",
"testcase": false
},
{
"class_method_signature": "FormatToBytesWritableMapper.getLineParser()",
"constructor": false,
"full_signature": "protected abstract LineParser<RECORD> getLineParser()",
"identifier": "getLineParser",
"modifiers": "protected abstract",
"parameters": "()",
"return": "LineParser<RECORD>",
"signature": "LineParser<RECORD> getLineParser()",
"testcase": false
},
{
"class_method_signature": "FormatToBytesWritableMapper.setup(Context context)",
"constructor": false,
"full_signature": "@Override protected void setup(Context context)",
"identifier": "setup",
"modifiers": "@Override protected",
"parameters": "(Context context)",
"return": "void",
"signature": "void setup(Context context)",
"testcase": false
},
{
"class_method_signature": "FormatToBytesWritableMapper.map(LongWritable key, Text value, Context context)",
"constructor": false,
"full_signature": "@Override protected void map(LongWritable key, Text value, Context context)",
"identifier": "map",
"modifiers": "@Override protected",
"parameters": "(LongWritable key, Text value, Context context)",
"return": "void",
"signature": "void map(LongWritable key, Text value, Context context)",
"testcase": false
},
{
"class_method_signature": "FormatToBytesWritableMapper.initColumnIndexes()",
"constructor": false,
"full_signature": "private void initColumnIndexes()",
"identifier": "initColumnIndexes",
"modifiers": "private",
"parameters": "()",
"return": "void",
"signature": "void initColumnIndexes()",
"testcase": false
},
{
"class_method_signature": "FormatToBytesWritableMapper.findIndex(Cell cell)",
"constructor": false,
"full_signature": "private int findIndex(Cell cell)",
"identifier": "findIndex",
"modifiers": "private",
"parameters": "(Cell cell)",
"return": "int",
"signature": "int findIndex(Cell cell)",
"testcase": false
},
{
"class_method_signature": "FormatToBytesWritableMapper.writeAggregatedRow(Context context, String tableName, List<Cell> lkv)",
"constructor": false,
"full_signature": "private void writeAggregatedRow(Context context, String tableName, List<Cell> lkv)",
"identifier": "writeAggregatedRow",
"modifiers": "private",
"parameters": "(Context context, String tableName, List<Cell> lkv)",
"return": "void",
"signature": "void writeAggregatedRow(Context context, String tableName, List<Cell> lkv)",
"testcase": false
},
{
"class_method_signature": "FormatToBytesWritableMapper.cleanup(Context context)",
"constructor": false,
"full_signature": "@Override protected void cleanup(Context context)",
"identifier": "cleanup",
"modifiers": "@Override protected",
"parameters": "(Context context)",
"return": "void",
"signature": "void cleanup(Context context)",
"testcase": false
},
{
"class_method_signature": "FormatToBytesWritableMapper.configureColumnInfoList(Configuration conf, List<ColumnInfo> columnInfoList)",
"constructor": false,
"full_signature": "@VisibleForTesting static void configureColumnInfoList(Configuration conf, List<ColumnInfo> columnInfoList)",
"identifier": "configureColumnInfoList",
"modifiers": "@VisibleForTesting static",
"parameters": "(Configuration conf, List<ColumnInfo> columnInfoList)",
"return": "void",
"signature": "void configureColumnInfoList(Configuration conf, List<ColumnInfo> columnInfoList)",
"testcase": false
},
{
"class_method_signature": "FormatToBytesWritableMapper.buildColumnInfoList(Configuration conf)",
"constructor": false,
"full_signature": "@VisibleForTesting static List<ColumnInfo> buildColumnInfoList(Configuration conf)",
"identifier": "buildColumnInfoList",
"modifiers": "@VisibleForTesting static",
"parameters": "(Configuration conf)",
"return": "List<ColumnInfo>",
"signature": "List<ColumnInfo> buildColumnInfoList(Configuration conf)",
"testcase": false
}
],
"superclass": "extends Mapper<LongWritable, Text, TableRowkeyPair,\n ImmutableBytesWritable>"
} | {
"body": "@VisibleForTesting\n static List<ColumnInfo> buildColumnInfoList(Configuration conf) {\n\n return Lists.newArrayList(\n Iterables.transform(\n Splitter.on(\"|\").split(conf.get(COLUMN_INFO_CONFKEY)),\n new Function<String, ColumnInfo>() {\n @Nullable\n @Override\n public ColumnInfo apply(@Nullable String input) {\n if (input == null || input.isEmpty()) {\n // An empty string represents a null that was passed in to\n // the configuration, which corresponds to an input column\n // which is to be skipped\n return null;\n }\n return ColumnInfo.fromString(input);\n }\n }));\n }",
"class_method_signature": "FormatToBytesWritableMapper.buildColumnInfoList(Configuration conf)",
"constructor": false,
"full_signature": "@VisibleForTesting static List<ColumnInfo> buildColumnInfoList(Configuration conf)",
"identifier": "buildColumnInfoList",
"invocations": [
"newArrayList",
"transform",
"split",
"on",
"get",
"isEmpty",
"fromString"
],
"modifiers": "@VisibleForTesting static",
"parameters": "(Configuration conf)",
"return": "List<ColumnInfo>",
"signature": "List<ColumnInfo> buildColumnInfoList(Configuration conf)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_57 | {
"fields": [
{
"declarator": "ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT)",
"modifier": "private static final",
"original_string": "private static final ColumnInfo ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT);",
"type": "ColumnInfo",
"var_name": "ID_COLUMN"
},
{
"declarator": "NAME_COLUMN = new ColumnInfo(\"NAME\", Types.VARCHAR)",
"modifier": "private static final",
"original_string": "private static final ColumnInfo NAME_COLUMN = new ColumnInfo(\"NAME\", Types.VARCHAR);",
"type": "ColumnInfo",
"var_name": "NAME_COLUMN"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/QueryUtilTest.java",
"identifier": "QueryUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConstructGenericUpsertStatement() {\n assertEquals(\n \"UPSERT INTO MYTAB VALUES (?, ?)\",\n QueryUtil.constructGenericUpsertStatement(\"MYTAB\", 2));\n }",
"class_method_signature": "QueryUtilTest.testConstructGenericUpsertStatement()",
"constructor": false,
"full_signature": "@Test public void testConstructGenericUpsertStatement()",
"identifier": "testConstructGenericUpsertStatement",
"invocations": [
"assertEquals",
"constructGenericUpsertStatement"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testConstructGenericUpsertStatement()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(QueryUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryUtil.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "COLUMN_FAMILY_POSITION = 25",
"modifier": "public static final",
"original_string": "public static final int COLUMN_FAMILY_POSITION = 25;",
"type": "int",
"var_name": "COLUMN_FAMILY_POSITION"
},
{
"declarator": "COLUMN_NAME_POSITION = 4",
"modifier": "public static final",
"original_string": "public static final int COLUMN_NAME_POSITION = 4;",
"type": "int",
"var_name": "COLUMN_NAME_POSITION"
},
{
"declarator": "DATA_TYPE_POSITION = 5",
"modifier": "public static final",
"original_string": "public static final int DATA_TYPE_POSITION = 5;",
"type": "int",
"var_name": "DATA_TYPE_POSITION"
},
{
"declarator": "DATA_TYPE_NAME_POSITION = 6",
"modifier": "public static final",
"original_string": "public static final int DATA_TYPE_NAME_POSITION = 6;",
"type": "int",
"var_name": "DATA_TYPE_NAME_POSITION"
},
{
"declarator": "IS_SERVER_CONNECTION = \"IS_SERVER_CONNECTION\"",
"modifier": "public static final",
"original_string": "public static final String IS_SERVER_CONNECTION = \"IS_SERVER_CONNECTION\";",
"type": "String",
"var_name": "IS_SERVER_CONNECTION"
},
{
"declarator": "SELECT = \"SELECT\"",
"modifier": "private static final",
"original_string": "private static final String SELECT = \"SELECT\";",
"type": "String",
"var_name": "SELECT"
},
{
"declarator": "FROM = \"FROM\"",
"modifier": "private static final",
"original_string": "private static final String FROM = \"FROM\";",
"type": "String",
"var_name": "FROM"
},
{
"declarator": "WHERE = \"WHERE\"",
"modifier": "private static final",
"original_string": "private static final String WHERE = \"WHERE\";",
"type": "String",
"var_name": "WHERE"
},
{
"declarator": "AND = \"AND\"",
"modifier": "private static final",
"original_string": "private static final String AND = \"AND\";",
"type": "String",
"var_name": "AND"
},
{
"declarator": "CompareOpString = new String[CompareOp.values().length]",
"modifier": "private static final",
"original_string": "private static final String[] CompareOpString = new String[CompareOp.values().length];",
"type": "String[]",
"var_name": "CompareOpString"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java",
"identifier": "QueryUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "QueryUtil.toSQL(CompareOp op)",
"constructor": false,
"full_signature": "public static String toSQL(CompareOp op)",
"identifier": "toSQL",
"modifiers": "public static",
"parameters": "(CompareOp op)",
"return": "String",
"signature": "String toSQL(CompareOp op)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.QueryUtil()",
"constructor": true,
"full_signature": "private QueryUtil()",
"identifier": "QueryUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " QueryUtil()",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"constructor": false,
"full_signature": "public static String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"identifier": "constructUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, List<ColumnInfo> columnInfos)",
"return": "String",
"signature": "String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"constructor": false,
"full_signature": "public static String constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"identifier": "constructUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, List<String> columns, Hint hint)",
"return": "String",
"signature": "String constructUpsertStatement(String tableName, List<String> columns, Hint hint)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructGenericUpsertStatement(String tableName, int numColumns)",
"constructor": false,
"full_signature": "public static String constructGenericUpsertStatement(String tableName, int numColumns)",
"identifier": "constructGenericUpsertStatement",
"modifiers": "public static",
"parameters": "(String tableName, int numColumns)",
"return": "String",
"signature": "String constructGenericUpsertStatement(String tableName, int numColumns)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"constructor": false,
"full_signature": "public static String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"identifier": "constructSelectStatement",
"modifiers": "public static",
"parameters": "(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"return": "String",
"signature": "String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"constructor": false,
"full_signature": "public static String constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"identifier": "constructSelectStatement",
"modifiers": "public static",
"parameters": "(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"return": "String",
"signature": "String constructSelectStatement(String fullTableName, List<String> columns,\n final String whereClause, Hint hint, boolean escapeCols)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.constructParameterizedInClause(int numWhereCols, int numBatches)",
"constructor": false,
"full_signature": "public static String constructParameterizedInClause(int numWhereCols, int numBatches)",
"identifier": "constructParameterizedInClause",
"modifiers": "public static",
"parameters": "(int numWhereCols, int numBatches)",
"return": "String",
"signature": "String constructParameterizedInClause(int numWhereCols, int numBatches)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum)",
"return": "String",
"signature": "String getUrl(String zkQuorum)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int clientPort)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int clientPort)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int clientPort)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int clientPort)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, int port, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, int port, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, int port, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, int port, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, Integer port, String znodeParent)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, Integer port, String znodeParent)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, Integer port, String znodeParent)",
"return": "String",
"signature": "String getUrl(String zkQuorum, Integer port, String znodeParent)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "public static String getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"identifier": "getUrl",
"modifiers": "public static",
"parameters": "(String zkQuorum, Integer port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrl(String zkQuorum, Integer port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"constructor": false,
"full_signature": "private static String getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"identifier": "getUrlInternal",
"modifiers": "private static",
"parameters": "(String zkQuorum, Integer port, String znodeParent, String principal)",
"return": "String",
"signature": "String getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getExplainPlan(ResultSet rs)",
"constructor": false,
"full_signature": "public static String getExplainPlan(ResultSet rs)",
"identifier": "getExplainPlan",
"modifiers": "public static",
"parameters": "(ResultSet rs)",
"return": "String",
"signature": "String getExplainPlan(ResultSet rs)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getExplainPlan(ResultIterator iterator)",
"constructor": false,
"full_signature": "public static String getExplainPlan(ResultIterator iterator)",
"identifier": "getExplainPlan",
"modifiers": "public static",
"parameters": "(ResultIterator iterator)",
"return": "String",
"signature": "String getExplainPlan(ResultIterator iterator)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServer(Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServer(Configuration conf)",
"identifier": "getConnectionOnServer",
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "Connection",
"signature": "Connection getConnectionOnServer(Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.setServerConnection(Properties props)",
"constructor": false,
"full_signature": "public static void setServerConnection(Properties props)",
"identifier": "setServerConnection",
"modifiers": "public static",
"parameters": "(Properties props)",
"return": "void",
"signature": "void setServerConnection(Properties props)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.isServerConnection(ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static boolean isServerConnection(ReadOnlyProps props)",
"identifier": "isServerConnection",
"modifiers": "public static",
"parameters": "(ReadOnlyProps props)",
"return": "boolean",
"signature": "boolean isServerConnection(ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServer(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServer(Properties props, Configuration conf)",
"identifier": "getConnectionOnServer",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf)",
"return": "Connection",
"signature": "Connection getConnectionOnServer(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"constructor": false,
"full_signature": "public static Connection getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"identifier": "getConnectionOnServerWithCustomUrl",
"modifiers": "public static",
"parameters": "(Properties props, String principal)",
"return": "Connection",
"signature": "Connection getConnectionOnServerWithCustomUrl(Properties props, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnection(Configuration conf)",
"constructor": false,
"full_signature": "public static Connection getConnection(Configuration conf)",
"identifier": "getConnection",
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "Connection",
"signature": "Connection getConnection(Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnection(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static Connection getConnection(Properties props, Configuration conf)",
"identifier": "getConnection",
"modifiers": "private static",
"parameters": "(Properties props, Configuration conf)",
"return": "Connection",
"signature": "Connection getConnection(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionUrl(Properties props, Configuration conf)",
"constructor": false,
"full_signature": "public static String getConnectionUrl(Properties props, Configuration conf)",
"identifier": "getConnectionUrl",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf)",
"return": "String",
"signature": "String getConnectionUrl(Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionUrl(Properties props, Configuration conf, String principal)",
"constructor": false,
"full_signature": "public static String getConnectionUrl(Properties props, Configuration conf, String principal)",
"identifier": "getConnectionUrl",
"modifiers": "public static",
"parameters": "(Properties props, Configuration conf, String principal)",
"return": "String",
"signature": "String getConnectionUrl(Properties props, Configuration conf, String principal)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getInt(String key, int defaultValue, Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static int getInt(String key, int defaultValue, Properties props, Configuration conf)",
"identifier": "getInt",
"modifiers": "private static",
"parameters": "(String key, int defaultValue, Properties props, Configuration conf)",
"return": "int",
"signature": "int getInt(String key, int defaultValue, Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getString(String key, String defaultValue, Properties props, Configuration conf)",
"constructor": false,
"full_signature": "private static String getString(String key, String defaultValue, Properties props, Configuration conf)",
"identifier": "getString",
"modifiers": "private static",
"parameters": "(String key, String defaultValue, Properties props, Configuration conf)",
"return": "String",
"signature": "String getString(String key, String defaultValue, Properties props, Configuration conf)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getViewStatement(String schemaName, String tableName, String where)",
"constructor": false,
"full_signature": "public static String getViewStatement(String schemaName, String tableName, String where)",
"identifier": "getViewStatement",
"modifiers": "public static",
"parameters": "(String schemaName, String tableName, String where)",
"return": "String",
"signature": "String getViewStatement(String schemaName, String tableName, String where)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getOffsetLimit(Integer limit, Integer offset)",
"constructor": false,
"full_signature": "public static Integer getOffsetLimit(Integer limit, Integer offset)",
"identifier": "getOffsetLimit",
"modifiers": "public static",
"parameters": "(Integer limit, Integer offset)",
"return": "Integer",
"signature": "Integer getOffsetLimit(Integer limit, Integer offset)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getRemainingOffset(Tuple offsetTuple)",
"constructor": false,
"full_signature": "public static Integer getRemainingOffset(Tuple offsetTuple)",
"identifier": "getRemainingOffset",
"modifiers": "public static",
"parameters": "(Tuple offsetTuple)",
"return": "Integer",
"signature": "Integer getRemainingOffset(Tuple offsetTuple)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"constructor": false,
"full_signature": "public static String getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"identifier": "getViewPartitionClause",
"modifiers": "public static",
"parameters": "(String partitionColumnName, long autoPartitionNum)",
"return": "String",
"signature": "String getViewPartitionClause(String partitionColumnName, long autoPartitionNum)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getConnectionForQueryLog(Configuration config)",
"constructor": false,
"full_signature": "public static Connection getConnectionForQueryLog(Configuration config)",
"identifier": "getConnectionForQueryLog",
"modifiers": "public static",
"parameters": "(Configuration config)",
"return": "Connection",
"signature": "Connection getConnectionForQueryLog(Configuration config)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getCatalogsStmt(PhoenixConnection connection)",
"constructor": false,
"full_signature": "public static PreparedStatement getCatalogsStmt(PhoenixConnection connection)",
"identifier": "getCatalogsStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection)",
"return": "PreparedStatement",
"signature": "PreparedStatement getCatalogsStmt(PhoenixConnection connection)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"constructor": false,
"full_signature": "public static PreparedStatement getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"identifier": "getSchemasStmt",
"modifiers": "public static",
"parameters": "(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"return": "PreparedStatement",
"signature": "PreparedStatement getSchemasStmt(\n PhoenixConnection connection, String catalog, String schemaPattern)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"constructor": false,
"full_signature": "public static PreparedStatement getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"identifier": "getSuperTablesStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"return": "PreparedStatement",
"signature": "PreparedStatement getSuperTablesStmt(PhoenixConnection connection,\n String catalog, String schemaPattern, String tableNamePattern)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"constructor": false,
"full_signature": "public static PreparedStatement getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"identifier": "getIndexInfoStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"return": "PreparedStatement",
"signature": "PreparedStatement getIndexInfoStmt(PhoenixConnection connection,\n String catalog, String schema, String table, boolean unique, boolean approximate)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"constructor": false,
"full_signature": "public static PreparedStatement getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"identifier": "getTablesStmt",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"return": "PreparedStatement",
"signature": "PreparedStatement getTablesStmt(PhoenixConnection connection, String catalog, String schemaPattern,\n String tableNamePattern, String[] types)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"constructor": false,
"full_signature": "public static void addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"identifier": "addTenantIdFilter",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"return": "void",
"signature": "void addTenantIdFilter(PhoenixConnection connection, StringBuilder buf, String tenantIdPattern,\n List<String> parameterValues)",
"testcase": false
},
{
"class_method_signature": "QueryUtil.appendConjunction(StringBuilder buf)",
"constructor": false,
"full_signature": "private static void appendConjunction(StringBuilder buf)",
"identifier": "appendConjunction",
"modifiers": "private static",
"parameters": "(StringBuilder buf)",
"return": "void",
"signature": "void appendConjunction(StringBuilder buf)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String constructGenericUpsertStatement(String tableName, int numColumns) {\n\n\n if (numColumns == 0) {\n throw new IllegalArgumentException(\"At least one column must be provided for upserts\");\n }\n\n List<String> parameterList = Lists.newArrayListWithCapacity(numColumns);\n for (int i = 0; i < numColumns; i++) {\n parameterList.add(\"?\");\n }\n return String.format(\"UPSERT INTO %s VALUES (%s)\", tableName, Joiner.on(\", \").join(parameterList));\n }",
"class_method_signature": "QueryUtil.constructGenericUpsertStatement(String tableName, int numColumns)",
"constructor": false,
"full_signature": "public static String constructGenericUpsertStatement(String tableName, int numColumns)",
"identifier": "constructGenericUpsertStatement",
"invocations": [
"newArrayListWithCapacity",
"add",
"format",
"join",
"on"
],
"modifiers": "public static",
"parameters": "(String tableName, int numColumns)",
"return": "String",
"signature": "String constructGenericUpsertStatement(String tableName, int numColumns)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_115 | {
"fields": [
{
"declarator": "testCache = null",
"modifier": "static",
"original_string": "static GuidePostsCache testCache = null;",
"type": "GuidePostsCache",
"var_name": "testCache"
},
{
"declarator": "phoenixStatsLoader = null",
"modifier": "static",
"original_string": "static PhoenixStatsLoader phoenixStatsLoader = null;",
"type": "PhoenixStatsLoader",
"var_name": "phoenixStatsLoader"
},
{
"declarator": "helper",
"modifier": "private",
"original_string": "private GuidePostsCacheProvider helper;",
"type": "GuidePostsCacheProvider",
"var_name": "helper"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/query/GuidePostsCacheProviderTest.java",
"identifier": "GuidePostsCacheProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getGuidePostsCacheWrapper(){\n testCache = Mockito.mock(GuidePostsCache.class);\n ConnectionQueryServices mockQueryServices = Mockito.mock(ConnectionQueryServices.class);\n Configuration mockConfiguration = Mockito.mock(Configuration.class);\n GuidePostsCacheWrapper\n value =\n helper.getGuidePostsCache(TestGuidePostsCacheFactory.class.getTypeName(),\n mockQueryServices, mockConfiguration);\n value.invalidateAll();\n Mockito.verify(testCache,Mockito.atLeastOnce()).invalidateAll();\n }",
"class_method_signature": "GuidePostsCacheProviderTest.getGuidePostsCacheWrapper()",
"constructor": false,
"full_signature": "@Test public void getGuidePostsCacheWrapper()",
"identifier": "getGuidePostsCacheWrapper",
"invocations": [
"mock",
"mock",
"mock",
"getGuidePostsCache",
"getTypeName",
"invalidateAll",
"invalidateAll",
"verify",
"atLeastOnce"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void getGuidePostsCacheWrapper()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "guidePostsCacheFactory = null",
"modifier": "",
"original_string": "GuidePostsCacheFactory guidePostsCacheFactory = null;",
"type": "GuidePostsCacheFactory",
"var_name": "guidePostsCacheFactory"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/query/GuidePostsCacheProvider.java",
"identifier": "GuidePostsCacheProvider",
"interfaces": "",
"methods": [
{
"class_method_signature": "GuidePostsCacheProvider.loadAndGetGuidePostsCacheFactory(String classString)",
"constructor": false,
"full_signature": "@VisibleForTesting GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString)",
"identifier": "loadAndGetGuidePostsCacheFactory",
"modifiers": "@VisibleForTesting",
"parameters": "(String classString)",
"return": "GuidePostsCacheFactory",
"signature": "GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString)",
"testcase": false
},
{
"class_method_signature": "GuidePostsCacheProvider.getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"constructor": false,
"full_signature": "public GuidePostsCacheWrapper getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"identifier": "getGuidePostsCache",
"modifiers": "public",
"parameters": "(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"return": "GuidePostsCacheWrapper",
"signature": "GuidePostsCacheWrapper getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public GuidePostsCacheWrapper getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config) {\n ReadOnlyProps props = null;\n if (queryServices != null) {\n props = queryServices.getProps();\n }\n GuidePostsCacheFactory guidePostCacheFactory = loadAndGetGuidePostsCacheFactory(classStr);\n PhoenixStatsLoader phoenixStatsLoader = guidePostsCacheFactory.getPhoenixStatsLoader(queryServices, props,\n config);\n GuidePostsCache guidePostsCache = guidePostCacheFactory.getGuidePostsCache(phoenixStatsLoader, config);\n return new GuidePostsCacheWrapper(guidePostsCache);\n }",
"class_method_signature": "GuidePostsCacheProvider.getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"constructor": false,
"full_signature": "public GuidePostsCacheWrapper getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"identifier": "getGuidePostsCache",
"invocations": [
"getProps",
"loadAndGetGuidePostsCacheFactory",
"getPhoenixStatsLoader",
"getGuidePostsCache"
],
"modifiers": "public",
"parameters": "(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"return": "GuidePostsCacheWrapper",
"signature": "GuidePostsCacheWrapper getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_181 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/schema/types/PDataTypeTest.java",
"identifier": "PDataTypeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIntVersusLong() {\n long l = -1L;\n int i = -1;\n assertTrue(PLong.INSTANCE.compareTo(l, i, PInteger.INSTANCE)==0);\n assertTrue(PInteger.INSTANCE.compareTo(i, l, PLong.INSTANCE)==0);\n }",
"class_method_signature": "PDataTypeTest.testIntVersusLong()",
"constructor": false,
"full_signature": "@Test public void testIntVersusLong()",
"identifier": "testIntVersusLong",
"invocations": [
"assertTrue",
"compareTo",
"assertTrue",
"compareTo"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testIntVersusLong()",
"testcase": true
} | {
"fields": [
{
"declarator": "sqlTypeName",
"modifier": "private final",
"original_string": "private final String sqlTypeName;",
"type": "String",
"var_name": "sqlTypeName"
},
{
"declarator": "sqlType",
"modifier": "private final",
"original_string": "private final int sqlType;",
"type": "int",
"var_name": "sqlType"
},
{
"declarator": "clazz",
"modifier": "private final",
"original_string": "private final Class clazz;",
"type": "Class",
"var_name": "clazz"
},
{
"declarator": "clazzNameBytes",
"modifier": "private final",
"original_string": "private final byte[] clazzNameBytes;",
"type": "byte[]",
"var_name": "clazzNameBytes"
},
{
"declarator": "sqlTypeNameBytes",
"modifier": "private final",
"original_string": "private final byte[] sqlTypeNameBytes;",
"type": "byte[]",
"var_name": "sqlTypeNameBytes"
},
{
"declarator": "codec",
"modifier": "private final",
"original_string": "private final PDataCodec codec;",
"type": "PDataCodec",
"var_name": "codec"
},
{
"declarator": "ordinal",
"modifier": "private final",
"original_string": "private final int ordinal;",
"type": "int",
"var_name": "ordinal"
},
{
"declarator": "MAX_PRECISION = 38",
"modifier": "public static final",
"original_string": "public static final int MAX_PRECISION = 38;",
"type": "int",
"var_name": "MAX_PRECISION"
},
{
"declarator": "MIN_DECIMAL_AVG_SCALE = 4",
"modifier": "public static final",
"original_string": "public static final int MIN_DECIMAL_AVG_SCALE = 4;",
"type": "int",
"var_name": "MIN_DECIMAL_AVG_SCALE"
},
{
"declarator": "DEFAULT_MATH_CONTEXT = new MathContext(MAX_PRECISION, RoundingMode.HALF_UP)",
"modifier": "public static final",
"original_string": "public static final MathContext DEFAULT_MATH_CONTEXT = new MathContext(MAX_PRECISION, RoundingMode.HALF_UP);",
"type": "MathContext",
"var_name": "DEFAULT_MATH_CONTEXT"
},
{
"declarator": "DEFAULT_SCALE = 0",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_SCALE = 0;",
"type": "int",
"var_name": "DEFAULT_SCALE"
},
{
"declarator": "MAX_BIG_DECIMAL_BYTES = 21",
"modifier": "protected static final",
"original_string": "protected static final Integer MAX_BIG_DECIMAL_BYTES = 21;",
"type": "Integer",
"var_name": "MAX_BIG_DECIMAL_BYTES"
},
{
"declarator": "MAX_TIMESTAMP_BYTES = Bytes.SIZEOF_LONG + Bytes.SIZEOF_INT",
"modifier": "protected static final",
"original_string": "protected static final Integer MAX_TIMESTAMP_BYTES = Bytes.SIZEOF_LONG + Bytes.SIZEOF_INT;",
"type": "Integer",
"var_name": "MAX_TIMESTAMP_BYTES"
},
{
"declarator": "ZERO_BYTE = (byte)0x80",
"modifier": "protected static final",
"original_string": "protected static final byte ZERO_BYTE = (byte)0x80;",
"type": "byte",
"var_name": "ZERO_BYTE"
},
{
"declarator": "NEG_TERMINAL_BYTE = (byte)102",
"modifier": "protected static final",
"original_string": "protected static final byte NEG_TERMINAL_BYTE = (byte)102;",
"type": "byte",
"var_name": "NEG_TERMINAL_BYTE"
},
{
"declarator": "EXP_BYTE_OFFSET = 65",
"modifier": "protected static final",
"original_string": "protected static final int EXP_BYTE_OFFSET = 65;",
"type": "int",
"var_name": "EXP_BYTE_OFFSET"
},
{
"declarator": "POS_DIGIT_OFFSET = 1",
"modifier": "protected static final",
"original_string": "protected static final int POS_DIGIT_OFFSET = 1;",
"type": "int",
"var_name": "POS_DIGIT_OFFSET"
},
{
"declarator": "NEG_DIGIT_OFFSET = 101",
"modifier": "protected static final",
"original_string": "protected static final int NEG_DIGIT_OFFSET = 101;",
"type": "int",
"var_name": "NEG_DIGIT_OFFSET"
},
{
"declarator": "MAX_LONG = BigInteger.valueOf(Long.MAX_VALUE)",
"modifier": "protected static final",
"original_string": "protected static final BigInteger MAX_LONG = BigInteger.valueOf(Long.MAX_VALUE);",
"type": "BigInteger",
"var_name": "MAX_LONG"
},
{
"declarator": "MIN_LONG = BigInteger.valueOf(Long.MIN_VALUE)",
"modifier": "protected static final",
"original_string": "protected static final BigInteger MIN_LONG = BigInteger.valueOf(Long.MIN_VALUE);",
"type": "BigInteger",
"var_name": "MIN_LONG"
},
{
"declarator": "MAX_LONG_FOR_DESERIALIZE = Long.MAX_VALUE / 1000",
"modifier": "protected static final",
"original_string": "protected static final long MAX_LONG_FOR_DESERIALIZE = Long.MAX_VALUE / 1000;",
"type": "long",
"var_name": "MAX_LONG_FOR_DESERIALIZE"
},
{
"declarator": "ONE_HUNDRED = BigInteger.valueOf(100)",
"modifier": "protected static final",
"original_string": "protected static final BigInteger ONE_HUNDRED = BigInteger.valueOf(100);",
"type": "BigInteger",
"var_name": "ONE_HUNDRED"
},
{
"declarator": "FALSE_BYTE = 0",
"modifier": "protected static final",
"original_string": "protected static final byte FALSE_BYTE = 0;",
"type": "byte",
"var_name": "FALSE_BYTE"
},
{
"declarator": "TRUE_BYTE = 1",
"modifier": "protected static final",
"original_string": "protected static final byte TRUE_BYTE = 1;",
"type": "byte",
"var_name": "TRUE_BYTE"
},
{
"declarator": "FALSE_BYTES = new byte[] { FALSE_BYTE }",
"modifier": "public static final",
"original_string": "public static final byte[] FALSE_BYTES = new byte[] { FALSE_BYTE };",
"type": "byte[]",
"var_name": "FALSE_BYTES"
},
{
"declarator": "TRUE_BYTES = new byte[] { TRUE_BYTE }",
"modifier": "public static final",
"original_string": "public static final byte[] TRUE_BYTES = new byte[] { TRUE_BYTE };",
"type": "byte[]",
"var_name": "TRUE_BYTES"
},
{
"declarator": "NULL_BYTES = ByteUtil.EMPTY_BYTE_ARRAY",
"modifier": "public static final",
"original_string": "public static final byte[] NULL_BYTES = ByteUtil.EMPTY_BYTE_ARRAY;",
"type": "byte[]",
"var_name": "NULL_BYTES"
},
{
"declarator": "BOOLEAN_LENGTH = 1",
"modifier": "protected static final",
"original_string": "protected static final Integer BOOLEAN_LENGTH = 1;",
"type": "Integer",
"var_name": "BOOLEAN_LENGTH"
},
{
"declarator": "ZERO = 0",
"modifier": "public final static",
"original_string": "public final static Integer ZERO = 0;",
"type": "Integer",
"var_name": "ZERO"
},
{
"declarator": "INT_PRECISION = 10",
"modifier": "public final static",
"original_string": "public final static Integer INT_PRECISION = 10;",
"type": "Integer",
"var_name": "INT_PRECISION"
},
{
"declarator": "LONG_PRECISION = 19",
"modifier": "public final static",
"original_string": "public final static Integer LONG_PRECISION = 19;",
"type": "Integer",
"var_name": "LONG_PRECISION"
},
{
"declarator": "SHORT_PRECISION = 5",
"modifier": "public final static",
"original_string": "public final static Integer SHORT_PRECISION = 5;",
"type": "Integer",
"var_name": "SHORT_PRECISION"
},
{
"declarator": "BYTE_PRECISION = 3",
"modifier": "public final static",
"original_string": "public final static Integer BYTE_PRECISION = 3;",
"type": "Integer",
"var_name": "BYTE_PRECISION"
},
{
"declarator": "DOUBLE_PRECISION = 15",
"modifier": "public final static",
"original_string": "public final static Integer DOUBLE_PRECISION = 15;",
"type": "Integer",
"var_name": "DOUBLE_PRECISION"
},
{
"declarator": "ARRAY_TYPE_BASE = 3000",
"modifier": "public static final",
"original_string": "public static final int ARRAY_TYPE_BASE = 3000;",
"type": "int",
"var_name": "ARRAY_TYPE_BASE"
},
{
"declarator": "ARRAY_TYPE_SUFFIX = \"ARRAY\"",
"modifier": "public static final",
"original_string": "public static final String ARRAY_TYPE_SUFFIX = \"ARRAY\";",
"type": "String",
"var_name": "ARRAY_TYPE_SUFFIX"
},
{
"declarator": "RANDOM = new ThreadLocal<Random>() {\n @Override\n protected Random initialValue() {\n return new Random();\n }\n }",
"modifier": "protected static final",
"original_string": "protected static final ThreadLocal<Random> RANDOM = new ThreadLocal<Random>() {\n @Override\n protected Random initialValue() {\n return new Random();\n }\n };",
"type": "ThreadLocal<Random>",
"var_name": "RANDOM"
},
{
"declarator": "DEFAULT_ARRAY_FACTORY = new PhoenixArrayFactory() {\n @Override\n public PhoenixArray newArray(PDataType type, Object[] elements) {\n return new PhoenixArray(type, elements);\n }\n }",
"modifier": "private static final",
"original_string": "private static final PhoenixArrayFactory DEFAULT_ARRAY_FACTORY = new PhoenixArrayFactory() {\n @Override\n public PhoenixArray newArray(PDataType type, Object[] elements) {\n return new PhoenixArray(type, elements);\n }\n };",
"type": "PhoenixArrayFactory",
"var_name": "DEFAULT_ARRAY_FACTORY"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/schema/types/PDataType.java",
"identifier": "PDataType",
"interfaces": "implements DataType<T>, Comparable<PDataType<?>>",
"methods": [
{
"class_method_signature": "PDataType.PDataType(String sqlTypeName, int sqlType, Class clazz, PDataCodec codec, int ordinal)",
"constructor": true,
"full_signature": "protected PDataType(String sqlTypeName, int sqlType, Class clazz, PDataCodec codec, int ordinal)",
"identifier": "PDataType",
"modifiers": "protected",
"parameters": "(String sqlTypeName, int sqlType, Class clazz, PDataCodec codec, int ordinal)",
"return": "",
"signature": " PDataType(String sqlTypeName, int sqlType, Class clazz, PDataCodec codec, int ordinal)",
"testcase": false
},
{
"class_method_signature": "PDataType.values()",
"constructor": false,
"full_signature": "public static PDataType[] values()",
"identifier": "values",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType[]",
"signature": "PDataType[] values()",
"testcase": false
},
{
"class_method_signature": "PDataType.ordinal()",
"constructor": false,
"full_signature": "public int ordinal()",
"identifier": "ordinal",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int ordinal()",
"testcase": false
},
{
"class_method_signature": "PDataType.encodedClass()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") @Override public Class<T> encodedClass()",
"identifier": "encodedClass",
"modifiers": "@SuppressWarnings(\"unchecked\") @Override public",
"parameters": "()",
"return": "Class<T>",
"signature": "Class<T> encodedClass()",
"testcase": false
},
{
"class_method_signature": "PDataType.isCastableTo(PDataType targetType)",
"constructor": false,
"full_signature": "public boolean isCastableTo(PDataType targetType)",
"identifier": "isCastableTo",
"modifiers": "public",
"parameters": "(PDataType targetType)",
"return": "boolean",
"signature": "boolean isCastableTo(PDataType targetType)",
"testcase": false
},
{
"class_method_signature": "PDataType.getCodec()",
"constructor": false,
"full_signature": "public final PDataCodec getCodec()",
"identifier": "getCodec",
"modifiers": "public final",
"parameters": "()",
"return": "PDataCodec",
"signature": "PDataCodec getCodec()",
"testcase": false
},
{
"class_method_signature": "PDataType.isBytesComparableWith(PDataType otherType)",
"constructor": false,
"full_signature": "public boolean isBytesComparableWith(PDataType otherType)",
"identifier": "isBytesComparableWith",
"modifiers": "public",
"parameters": "(PDataType otherType)",
"return": "boolean",
"signature": "boolean isBytesComparableWith(PDataType otherType)",
"testcase": false
},
{
"class_method_signature": "PDataType.estimateByteSize(Object o)",
"constructor": false,
"full_signature": "public int estimateByteSize(Object o)",
"identifier": "estimateByteSize",
"modifiers": "public",
"parameters": "(Object o)",
"return": "int",
"signature": "int estimateByteSize(Object o)",
"testcase": false
},
{
"class_method_signature": "PDataType.getMaxLength(Object o)",
"constructor": false,
"full_signature": "public Integer getMaxLength(Object o)",
"identifier": "getMaxLength",
"modifiers": "public",
"parameters": "(Object o)",
"return": "Integer",
"signature": "Integer getMaxLength(Object o)",
"testcase": false
},
{
"class_method_signature": "PDataType.getScale(Object o)",
"constructor": false,
"full_signature": "public Integer getScale(Object o)",
"identifier": "getScale",
"modifiers": "public",
"parameters": "(Object o)",
"return": "Integer",
"signature": "Integer getScale(Object o)",
"testcase": false
},
{
"class_method_signature": "PDataType.estimateByteSizeFromLength(Integer length)",
"constructor": false,
"full_signature": "public Integer estimateByteSizeFromLength(Integer length)",
"identifier": "estimateByteSizeFromLength",
"modifiers": "public",
"parameters": "(Integer length)",
"return": "Integer",
"signature": "Integer estimateByteSizeFromLength(Integer length)",
"testcase": false
},
{
"class_method_signature": "PDataType.getSqlTypeName()",
"constructor": false,
"full_signature": "public final String getSqlTypeName()",
"identifier": "getSqlTypeName",
"modifiers": "public final",
"parameters": "()",
"return": "String",
"signature": "String getSqlTypeName()",
"testcase": false
},
{
"class_method_signature": "PDataType.getSqlType()",
"constructor": false,
"full_signature": "public final int getSqlType()",
"identifier": "getSqlType",
"modifiers": "public final",
"parameters": "()",
"return": "int",
"signature": "int getSqlType()",
"testcase": false
},
{
"class_method_signature": "PDataType.getJavaClass()",
"constructor": false,
"full_signature": "public final Class getJavaClass()",
"identifier": "getJavaClass",
"modifiers": "public final",
"parameters": "()",
"return": "Class",
"signature": "Class getJavaClass()",
"testcase": false
},
{
"class_method_signature": "PDataType.isArrayType()",
"constructor": false,
"full_signature": "public boolean isArrayType()",
"identifier": "isArrayType",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isArrayType()",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"constructor": false,
"full_signature": "public final int compareTo(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"identifier": "compareTo",
"modifiers": "public final",
"parameters": "(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"return": "int",
"signature": "int compareTo(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"testcase": false
},
{
"class_method_signature": "PDataType.isDoubleOrFloat(PDataType type)",
"constructor": false,
"full_signature": "public static boolean isDoubleOrFloat(PDataType type)",
"identifier": "isDoubleOrFloat",
"modifiers": "public static",
"parameters": "(PDataType type)",
"return": "boolean",
"signature": "boolean isDoubleOrFloat(PDataType type)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareFloatToLong(float f, long l)",
"constructor": false,
"full_signature": "private static int compareFloatToLong(float f, long l)",
"identifier": "compareFloatToLong",
"modifiers": "private static",
"parameters": "(float f, long l)",
"return": "int",
"signature": "int compareFloatToLong(float f, long l)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareDoubleToLong(double d, long l)",
"constructor": false,
"full_signature": "private static int compareDoubleToLong(double d, long l)",
"identifier": "compareDoubleToLong",
"modifiers": "private static",
"parameters": "(double d, long l)",
"return": "int",
"signature": "int compareDoubleToLong(double d, long l)",
"testcase": false
},
{
"class_method_signature": "PDataType.checkForSufficientLength(byte[] b, int offset, int requiredLength)",
"constructor": false,
"full_signature": "protected static void checkForSufficientLength(byte[] b, int offset, int requiredLength)",
"identifier": "checkForSufficientLength",
"modifiers": "protected static",
"parameters": "(byte[] b, int offset, int requiredLength)",
"return": "void",
"signature": "void checkForSufficientLength(byte[] b, int offset, int requiredLength)",
"testcase": false
},
{
"class_method_signature": "PDataType.throwConstraintViolationException(PDataType source, PDataType target)",
"constructor": false,
"full_signature": "protected static Void throwConstraintViolationException(PDataType source, PDataType target)",
"identifier": "throwConstraintViolationException",
"modifiers": "protected static",
"parameters": "(PDataType source, PDataType target)",
"return": "Void",
"signature": "Void throwConstraintViolationException(PDataType source, PDataType target)",
"testcase": false
},
{
"class_method_signature": "PDataType.newIllegalDataException()",
"constructor": false,
"full_signature": "protected static RuntimeException newIllegalDataException()",
"identifier": "newIllegalDataException",
"modifiers": "protected static",
"parameters": "()",
"return": "RuntimeException",
"signature": "RuntimeException newIllegalDataException()",
"testcase": false
},
{
"class_method_signature": "PDataType.newIllegalDataException(String msg)",
"constructor": false,
"full_signature": "protected static RuntimeException newIllegalDataException(String msg)",
"identifier": "newIllegalDataException",
"modifiers": "protected static",
"parameters": "(String msg)",
"return": "RuntimeException",
"signature": "RuntimeException newIllegalDataException(String msg)",
"testcase": false
},
{
"class_method_signature": "PDataType.newIllegalDataException(Exception e)",
"constructor": false,
"full_signature": "protected static RuntimeException newIllegalDataException(Exception e)",
"identifier": "newIllegalDataException",
"modifiers": "protected static",
"parameters": "(Exception e)",
"return": "RuntimeException",
"signature": "RuntimeException newIllegalDataException(Exception e)",
"testcase": false
},
{
"class_method_signature": "PDataType.equals(Object o)",
"constructor": false,
"full_signature": "@Override public boolean equals(Object o)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(Object o)",
"return": "boolean",
"signature": "boolean equals(Object o)",
"testcase": false
},
{
"class_method_signature": "PDataType.equalsAny(PDataType lhs, PDataType... rhs)",
"constructor": false,
"full_signature": "public static boolean equalsAny(PDataType lhs, PDataType... rhs)",
"identifier": "equalsAny",
"modifiers": "public static",
"parameters": "(PDataType lhs, PDataType... rhs)",
"return": "boolean",
"signature": "boolean equalsAny(PDataType lhs, PDataType... rhs)",
"testcase": false
},
{
"class_method_signature": "PDataType.toBytes(BigDecimal v, byte[] result, final int offset, int length)",
"constructor": false,
"full_signature": "protected static int toBytes(BigDecimal v, byte[] result, final int offset, int length)",
"identifier": "toBytes",
"modifiers": "protected static",
"parameters": "(BigDecimal v, byte[] result, final int offset, int length)",
"return": "int",
"signature": "int toBytes(BigDecimal v, byte[] result, final int offset, int length)",
"testcase": false
},
{
"class_method_signature": "PDataType.toBigDecimal(byte[] bytes, int offset, int length)",
"constructor": false,
"full_signature": "protected static BigDecimal toBigDecimal(byte[] bytes, int offset, int length)",
"identifier": "toBigDecimal",
"modifiers": "protected static",
"parameters": "(byte[] bytes, int offset, int length)",
"return": "BigDecimal",
"signature": "BigDecimal toBigDecimal(byte[] bytes, int offset, int length)",
"testcase": false
},
{
"class_method_signature": "PDataType.getDecimalPrecisionAndScale(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"constructor": false,
"full_signature": "protected static int[] getDecimalPrecisionAndScale(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"identifier": "getDecimalPrecisionAndScale",
"modifiers": "protected static",
"parameters": "(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"return": "int[]",
"signature": "int[] getDecimalPrecisionAndScale(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.isCoercibleTo(PDataType targetType)",
"constructor": false,
"full_signature": "public boolean isCoercibleTo(PDataType targetType)",
"identifier": "isCoercibleTo",
"modifiers": "public",
"parameters": "(PDataType targetType)",
"return": "boolean",
"signature": "boolean isCoercibleTo(PDataType targetType)",
"testcase": false
},
{
"class_method_signature": "PDataType.isComparableTo(PDataType targetType)",
"constructor": false,
"full_signature": "public boolean isComparableTo(PDataType targetType)",
"identifier": "isComparableTo",
"modifiers": "public",
"parameters": "(PDataType targetType)",
"return": "boolean",
"signature": "boolean isComparableTo(PDataType targetType)",
"testcase": false
},
{
"class_method_signature": "PDataType.isCoercibleTo(PDataType targetType, Object value)",
"constructor": false,
"full_signature": "public boolean isCoercibleTo(PDataType targetType, Object value)",
"identifier": "isCoercibleTo",
"modifiers": "public",
"parameters": "(PDataType targetType, Object value)",
"return": "boolean",
"signature": "boolean isCoercibleTo(PDataType targetType, Object value)",
"testcase": false
},
{
"class_method_signature": "PDataType.isSizeCompatible(ImmutableBytesWritable ptr, Object value, PDataType srcType, SortOrder sortOrder,\n Integer maxLength, Integer scale, Integer desiredMaxLength, Integer desiredScale)",
"constructor": false,
"full_signature": "public boolean isSizeCompatible(ImmutableBytesWritable ptr, Object value, PDataType srcType, SortOrder sortOrder,\n Integer maxLength, Integer scale, Integer desiredMaxLength, Integer desiredScale)",
"identifier": "isSizeCompatible",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, Object value, PDataType srcType, SortOrder sortOrder,\n Integer maxLength, Integer scale, Integer desiredMaxLength, Integer desiredScale)",
"return": "boolean",
"signature": "boolean isSizeCompatible(ImmutableBytesWritable ptr, Object value, PDataType srcType, SortOrder sortOrder,\n Integer maxLength, Integer scale, Integer desiredMaxLength, Integer desiredScale)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(byte[] b1, byte[] b2)",
"constructor": false,
"full_signature": "public int compareTo(byte[] b1, byte[] b2)",
"identifier": "compareTo",
"modifiers": "public",
"parameters": "(byte[] b1, byte[] b2)",
"return": "int",
"signature": "int compareTo(byte[] b1, byte[] b2)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(ImmutableBytesWritable ptr1, ImmutableBytesWritable ptr2)",
"constructor": false,
"full_signature": "public final int compareTo(ImmutableBytesWritable ptr1, ImmutableBytesWritable ptr2)",
"identifier": "compareTo",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr1, ImmutableBytesWritable ptr2)",
"return": "int",
"signature": "int compareTo(ImmutableBytesWritable ptr1, ImmutableBytesWritable ptr2)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(byte[] ba1, int offset1, int length1, SortOrder so1, byte[] ba2, int offset2,\n int length2, SortOrder so2)",
"constructor": false,
"full_signature": "public final int compareTo(byte[] ba1, int offset1, int length1, SortOrder so1, byte[] ba2, int offset2,\n int length2, SortOrder so2)",
"identifier": "compareTo",
"modifiers": "public final",
"parameters": "(byte[] ba1, int offset1, int length1, SortOrder so1, byte[] ba2, int offset2,\n int length2, SortOrder so2)",
"return": "int",
"signature": "int compareTo(byte[] ba1, int offset1, int length1, SortOrder so1, byte[] ba2, int offset2,\n int length2, SortOrder so2)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(ImmutableBytesWritable ptr1, SortOrder ptr1SortOrder, ImmutableBytesWritable ptr2,\n SortOrder ptr2SortOrder, PDataType type2)",
"constructor": false,
"full_signature": "public final int compareTo(ImmutableBytesWritable ptr1, SortOrder ptr1SortOrder, ImmutableBytesWritable ptr2,\n SortOrder ptr2SortOrder, PDataType type2)",
"identifier": "compareTo",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr1, SortOrder ptr1SortOrder, ImmutableBytesWritable ptr2,\n SortOrder ptr2SortOrder, PDataType type2)",
"return": "int",
"signature": "int compareTo(ImmutableBytesWritable ptr1, SortOrder ptr1SortOrder, ImmutableBytesWritable ptr2,\n SortOrder ptr2SortOrder, PDataType type2)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(Object lhs, Object rhs)",
"constructor": false,
"full_signature": "public int compareTo(Object lhs, Object rhs)",
"identifier": "compareTo",
"modifiers": "public",
"parameters": "(Object lhs, Object rhs)",
"return": "int",
"signature": "int compareTo(Object lhs, Object rhs)",
"testcase": false
},
{
"class_method_signature": "PDataType.isNull(byte[] value)",
"constructor": false,
"full_signature": "public final boolean isNull(byte[] value)",
"identifier": "isNull",
"modifiers": "public final",
"parameters": "(byte[] value)",
"return": "boolean",
"signature": "boolean isNull(byte[] value)",
"testcase": false
},
{
"class_method_signature": "PDataType.toBytes(Object object, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public byte[] toBytes(Object object, SortOrder sortOrder)",
"identifier": "toBytes",
"modifiers": "public",
"parameters": "(Object object, SortOrder sortOrder)",
"return": "byte[]",
"signature": "byte[] toBytes(Object object, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier, boolean expectedRowKeyOrderOptimizable)",
"constructor": false,
"full_signature": "public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier, boolean expectedRowKeyOrderOptimizable)",
"identifier": "coerceBytes",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier, boolean expectedRowKeyOrderOptimizable)",
"return": "void",
"signature": "void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier, boolean expectedRowKeyOrderOptimizable)",
"testcase": false
},
{
"class_method_signature": "PDataType.coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier)",
"constructor": false,
"full_signature": "public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier)",
"identifier": "coerceBytes",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier)",
"return": "void",
"signature": "void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier)",
"testcase": false
},
{
"class_method_signature": "PDataType.coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier)",
"constructor": false,
"full_signature": "public final void coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier)",
"identifier": "coerceBytes",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier)",
"return": "void",
"signature": "void coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier)",
"testcase": false
},
{
"class_method_signature": "PDataType.coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier, Integer desiredMaxLength)",
"constructor": false,
"full_signature": "public final void coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier, Integer desiredMaxLength)",
"identifier": "coerceBytes",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier, Integer desiredMaxLength)",
"return": "void",
"signature": "void coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier, Integer desiredMaxLength)",
"testcase": false
},
{
"class_method_signature": "PDataType.isNonNegativeDate(java.util.Date date)",
"constructor": false,
"full_signature": "protected static boolean isNonNegativeDate(java.util.Date date)",
"identifier": "isNonNegativeDate",
"modifiers": "protected static",
"parameters": "(java.util.Date date)",
"return": "boolean",
"signature": "boolean isNonNegativeDate(java.util.Date date)",
"testcase": false
},
{
"class_method_signature": "PDataType.throwIfNonNegativeDate(java.util.Date date)",
"constructor": false,
"full_signature": "protected static void throwIfNonNegativeDate(java.util.Date date)",
"identifier": "throwIfNonNegativeDate",
"modifiers": "protected static",
"parameters": "(java.util.Date date)",
"return": "void",
"signature": "void throwIfNonNegativeDate(java.util.Date date)",
"testcase": false
},
{
"class_method_signature": "PDataType.isNonNegativeNumber(Number v)",
"constructor": false,
"full_signature": "protected static boolean isNonNegativeNumber(Number v)",
"identifier": "isNonNegativeNumber",
"modifiers": "protected static",
"parameters": "(Number v)",
"return": "boolean",
"signature": "boolean isNonNegativeNumber(Number v)",
"testcase": false
},
{
"class_method_signature": "PDataType.throwIfNonNegativeNumber(Number v)",
"constructor": false,
"full_signature": "protected static void throwIfNonNegativeNumber(Number v)",
"identifier": "throwIfNonNegativeNumber",
"modifiers": "protected static",
"parameters": "(Number v)",
"return": "void",
"signature": "void throwIfNonNegativeNumber(Number v)",
"testcase": false
},
{
"class_method_signature": "PDataType.isNullable()",
"constructor": false,
"full_signature": "@Override public boolean isNullable()",
"identifier": "isNullable",
"modifiers": "@Override public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isNullable()",
"testcase": false
},
{
"class_method_signature": "PDataType.getByteSize()",
"constructor": false,
"full_signature": "public abstract Integer getByteSize()",
"identifier": "getByteSize",
"modifiers": "public abstract",
"parameters": "()",
"return": "Integer",
"signature": "Integer getByteSize()",
"testcase": false
},
{
"class_method_signature": "PDataType.encodedLength(T val)",
"constructor": false,
"full_signature": "@Override public int encodedLength(T val)",
"identifier": "encodedLength",
"modifiers": "@Override public",
"parameters": "(T val)",
"return": "int",
"signature": "int encodedLength(T val)",
"testcase": false
},
{
"class_method_signature": "PDataType.skip(PositionedByteRange pbr)",
"constructor": false,
"full_signature": "@Override public int skip(PositionedByteRange pbr)",
"identifier": "skip",
"modifiers": "@Override public",
"parameters": "(PositionedByteRange pbr)",
"return": "int",
"signature": "int skip(PositionedByteRange pbr)",
"testcase": false
},
{
"class_method_signature": "PDataType.isOrderPreserving()",
"constructor": false,
"full_signature": "@Override public boolean isOrderPreserving()",
"identifier": "isOrderPreserving",
"modifiers": "@Override public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isOrderPreserving()",
"testcase": false
},
{
"class_method_signature": "PDataType.isSkippable()",
"constructor": false,
"full_signature": "@Override public boolean isSkippable()",
"identifier": "isSkippable",
"modifiers": "@Override public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isSkippable()",
"testcase": false
},
{
"class_method_signature": "PDataType.getOrder()",
"constructor": false,
"full_signature": "@Override public Order getOrder()",
"identifier": "getOrder",
"modifiers": "@Override public",
"parameters": "()",
"return": "Order",
"signature": "Order getOrder()",
"testcase": false
},
{
"class_method_signature": "PDataType.isFixedWidth()",
"constructor": false,
"full_signature": "public abstract boolean isFixedWidth()",
"identifier": "isFixedWidth",
"modifiers": "public abstract",
"parameters": "()",
"return": "boolean",
"signature": "boolean isFixedWidth()",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(Object lhs, Object rhs, PDataType rhsType)",
"constructor": false,
"full_signature": "public abstract int compareTo(Object lhs, Object rhs, PDataType rhsType)",
"identifier": "compareTo",
"modifiers": "public abstract",
"parameters": "(Object lhs, Object rhs, PDataType rhsType)",
"return": "int",
"signature": "int compareTo(Object lhs, Object rhs, PDataType rhsType)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(PDataType<?> other)",
"constructor": false,
"full_signature": "@Override public int compareTo(PDataType<?> other)",
"identifier": "compareTo",
"modifiers": "@Override public",
"parameters": "(PDataType<?> other)",
"return": "int",
"signature": "int compareTo(PDataType<?> other)",
"testcase": false
},
{
"class_method_signature": "PDataType.toBytes(Object object, byte[] bytes, int offset)",
"constructor": false,
"full_signature": "public abstract int toBytes(Object object, byte[] bytes, int offset)",
"identifier": "toBytes",
"modifiers": "public abstract",
"parameters": "(Object object, byte[] bytes, int offset)",
"return": "int",
"signature": "int toBytes(Object object, byte[] bytes, int offset)",
"testcase": false
},
{
"class_method_signature": "PDataType.encode(PositionedByteRange pbr, T val)",
"constructor": false,
"full_signature": "@Override public int encode(PositionedByteRange pbr, T val)",
"identifier": "encode",
"modifiers": "@Override public",
"parameters": "(PositionedByteRange pbr, T val)",
"return": "int",
"signature": "int encode(PositionedByteRange pbr, T val)",
"testcase": false
},
{
"class_method_signature": "PDataType.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "PDataType.toBytes(Object object)",
"constructor": false,
"full_signature": "public abstract byte[] toBytes(Object object)",
"identifier": "toBytes",
"modifiers": "public abstract",
"parameters": "(Object object)",
"return": "byte[]",
"signature": "byte[] toBytes(Object object)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(String value)",
"constructor": false,
"full_signature": "public abstract Object toObject(String value)",
"identifier": "toObject",
"modifiers": "public abstract",
"parameters": "(String value)",
"return": "Object",
"signature": "Object toObject(String value)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(Object object, PDataType actualType)",
"constructor": false,
"full_signature": "public abstract Object toObject(Object object, PDataType actualType)",
"identifier": "toObject",
"modifiers": "public abstract",
"parameters": "(Object object, PDataType actualType)",
"return": "Object",
"signature": "Object toObject(Object object, PDataType actualType)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"constructor": false,
"full_signature": "public abstract Object toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"identifier": "toObject",
"modifiers": "public abstract",
"parameters": "(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"testcase": false
},
{
"class_method_signature": "PDataType.decode(PositionedByteRange pbr)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") @Override public T decode(PositionedByteRange pbr)",
"identifier": "decode",
"modifiers": "@SuppressWarnings(\"unchecked\") @Override public",
"parameters": "(PositionedByteRange pbr)",
"return": "T",
"signature": "T decode(PositionedByteRange pbr)",
"testcase": false
},
{
"class_method_signature": "PDataType.getSampleValue(Integer maxLength, Integer arrayLength)",
"constructor": false,
"full_signature": "public abstract Object getSampleValue(Integer maxLength, Integer arrayLength)",
"identifier": "getSampleValue",
"modifiers": "public abstract",
"parameters": "(Integer maxLength, Integer arrayLength)",
"return": "Object",
"signature": "Object getSampleValue(Integer maxLength, Integer arrayLength)",
"testcase": false
},
{
"class_method_signature": "PDataType.getSampleValue()",
"constructor": false,
"full_signature": "public final Object getSampleValue()",
"identifier": "getSampleValue",
"modifiers": "public final",
"parameters": "()",
"return": "Object",
"signature": "Object getSampleValue()",
"testcase": false
},
{
"class_method_signature": "PDataType.getSampleValue(Integer maxLength)",
"constructor": false,
"full_signature": "public final Object getSampleValue(Integer maxLength)",
"identifier": "getSampleValue",
"modifiers": "public final",
"parameters": "(Integer maxLength)",
"return": "Object",
"signature": "Object getSampleValue(Integer maxLength)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, int offset, int length, PDataType actualType)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes, int offset, int length, PDataType actualType)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes, int offset, int length, PDataType actualType)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, int offset, int length, PDataType actualType)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr, PDataType actualType)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr, PDataType actualType)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, PDataType actualType)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr, PDataType actualType)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr, SortOrder sortOrder, Integer maxLength, Integer scale)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr, SortOrder sortOrder, Integer maxLength, Integer scale)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, SortOrder sortOrder, Integer maxLength, Integer scale)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr, SortOrder sortOrder, Integer maxLength, Integer scale)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, int offset, int length)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes, int offset, int length)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes, int offset, int length)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, int offset, int length)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes)",
"return": "Object",
"signature": "Object toObject(byte[] bytes)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes, SortOrder sortOrder)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes, SortOrder sortOrder)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, SortOrder sortOrder, PDataType actualType)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes, SortOrder sortOrder, PDataType actualType)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes, SortOrder sortOrder, PDataType actualType)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, SortOrder sortOrder, PDataType actualType)",
"testcase": false
},
{
"class_method_signature": "PDataType.fromSqlTypeName(String sqlTypeName)",
"constructor": false,
"full_signature": "public static PDataType fromSqlTypeName(String sqlTypeName)",
"identifier": "fromSqlTypeName",
"modifiers": "public static",
"parameters": "(String sqlTypeName)",
"return": "PDataType",
"signature": "PDataType fromSqlTypeName(String sqlTypeName)",
"testcase": false
},
{
"class_method_signature": "PDataType.sqlArrayType(String sqlTypeName)",
"constructor": false,
"full_signature": "public static int sqlArrayType(String sqlTypeName)",
"identifier": "sqlArrayType",
"modifiers": "public static",
"parameters": "(String sqlTypeName)",
"return": "int",
"signature": "int sqlArrayType(String sqlTypeName)",
"testcase": false
},
{
"class_method_signature": "PDataType.fromTypeId(int typeId)",
"constructor": false,
"full_signature": "public static PDataType fromTypeId(int typeId)",
"identifier": "fromTypeId",
"modifiers": "public static",
"parameters": "(int typeId)",
"return": "PDataType",
"signature": "PDataType fromTypeId(int typeId)",
"testcase": false
},
{
"class_method_signature": "PDataType.getJavaClassName()",
"constructor": false,
"full_signature": "public String getJavaClassName()",
"identifier": "getJavaClassName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getJavaClassName()",
"testcase": false
},
{
"class_method_signature": "PDataType.getJavaClassNameBytes()",
"constructor": false,
"full_signature": "public byte[] getJavaClassNameBytes()",
"identifier": "getJavaClassNameBytes",
"modifiers": "public",
"parameters": "()",
"return": "byte[]",
"signature": "byte[] getJavaClassNameBytes()",
"testcase": false
},
{
"class_method_signature": "PDataType.getSqlTypeNameBytes()",
"constructor": false,
"full_signature": "public byte[] getSqlTypeNameBytes()",
"identifier": "getSqlTypeNameBytes",
"modifiers": "public",
"parameters": "()",
"return": "byte[]",
"signature": "byte[] getSqlTypeNameBytes()",
"testcase": false
},
{
"class_method_signature": "PDataType.getResultSetSqlType()",
"constructor": false,
"full_signature": "public int getResultSetSqlType()",
"identifier": "getResultSetSqlType",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getResultSetSqlType()",
"testcase": false
},
{
"class_method_signature": "PDataType.getKeyRange(byte[] point)",
"constructor": false,
"full_signature": "public KeyRange getKeyRange(byte[] point)",
"identifier": "getKeyRange",
"modifiers": "public",
"parameters": "(byte[] point)",
"return": "KeyRange",
"signature": "KeyRange getKeyRange(byte[] point)",
"testcase": false
},
{
"class_method_signature": "PDataType.toStringLiteral(ImmutableBytesWritable ptr, Format formatter)",
"constructor": false,
"full_signature": "public final String toStringLiteral(ImmutableBytesWritable ptr, Format formatter)",
"identifier": "toStringLiteral",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, Format formatter)",
"return": "String",
"signature": "String toStringLiteral(ImmutableBytesWritable ptr, Format formatter)",
"testcase": false
},
{
"class_method_signature": "PDataType.toStringLiteral(byte[] b, Format formatter)",
"constructor": false,
"full_signature": "public final String toStringLiteral(byte[] b, Format formatter)",
"identifier": "toStringLiteral",
"modifiers": "public final",
"parameters": "(byte[] b, Format formatter)",
"return": "String",
"signature": "String toStringLiteral(byte[] b, Format formatter)",
"testcase": false
},
{
"class_method_signature": "PDataType.toStringLiteral(byte[] b, int offset, int length, Format formatter)",
"constructor": false,
"full_signature": "public String toStringLiteral(byte[] b, int offset, int length, Format formatter)",
"identifier": "toStringLiteral",
"modifiers": "public",
"parameters": "(byte[] b, int offset, int length, Format formatter)",
"return": "String",
"signature": "String toStringLiteral(byte[] b, int offset, int length, Format formatter)",
"testcase": false
},
{
"class_method_signature": "PDataType.toStringLiteral(Object o, Format formatter)",
"constructor": false,
"full_signature": "public String toStringLiteral(Object o, Format formatter)",
"identifier": "toStringLiteral",
"modifiers": "public",
"parameters": "(Object o, Format formatter)",
"return": "String",
"signature": "String toStringLiteral(Object o, Format formatter)",
"testcase": false
},
{
"class_method_signature": "PDataType.toStringLiteral(Object o)",
"constructor": false,
"full_signature": "public String toStringLiteral(Object o)",
"identifier": "toStringLiteral",
"modifiers": "public",
"parameters": "(Object o)",
"return": "String",
"signature": "String toStringLiteral(Object o)",
"testcase": false
},
{
"class_method_signature": "PDataType.getArrayFactory()",
"constructor": false,
"full_signature": "public PhoenixArrayFactory getArrayFactory()",
"identifier": "getArrayFactory",
"modifiers": "public",
"parameters": "()",
"return": "PhoenixArrayFactory",
"signature": "PhoenixArrayFactory getArrayFactory()",
"testcase": false
},
{
"class_method_signature": "PDataType.instantiatePhoenixArray(PDataType actualType, Object[] elements)",
"constructor": false,
"full_signature": "public static PhoenixArray instantiatePhoenixArray(PDataType actualType, Object[] elements)",
"identifier": "instantiatePhoenixArray",
"modifiers": "public static",
"parameters": "(PDataType actualType, Object[] elements)",
"return": "PhoenixArray",
"signature": "PhoenixArray instantiatePhoenixArray(PDataType actualType, Object[] elements)",
"testcase": false
},
{
"class_method_signature": "PDataType.getKeyRange(byte[] lowerRange, boolean lowerInclusive, byte[] upperRange, boolean upperInclusive)",
"constructor": false,
"full_signature": "public KeyRange getKeyRange(byte[] lowerRange, boolean lowerInclusive, byte[] upperRange, boolean upperInclusive)",
"identifier": "getKeyRange",
"modifiers": "public",
"parameters": "(byte[] lowerRange, boolean lowerInclusive, byte[] upperRange, boolean upperInclusive)",
"return": "KeyRange",
"signature": "KeyRange getKeyRange(byte[] lowerRange, boolean lowerInclusive, byte[] upperRange, boolean upperInclusive)",
"testcase": false
},
{
"class_method_signature": "PDataType.fromLiteral(Object value)",
"constructor": false,
"full_signature": "public static PDataType fromLiteral(Object value)",
"identifier": "fromLiteral",
"modifiers": "public static",
"parameters": "(Object value)",
"return": "PDataType",
"signature": "PDataType fromLiteral(Object value)",
"testcase": false
},
{
"class_method_signature": "PDataType.getNanos(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public int getNanos(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"identifier": "getNanos",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"return": "int",
"signature": "int getNanos(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.getMillis(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public long getMillis(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"identifier": "getMillis",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"return": "long",
"signature": "long getMillis(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.pad(Object object, Integer maxLength)",
"constructor": false,
"full_signature": "public Object pad(Object object, Integer maxLength)",
"identifier": "pad",
"modifiers": "public",
"parameters": "(Object object, Integer maxLength)",
"return": "Object",
"signature": "Object pad(Object object, Integer maxLength)",
"testcase": false
},
{
"class_method_signature": "PDataType.pad(ImmutableBytesWritable ptr, Integer maxLength, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public void pad(ImmutableBytesWritable ptr, Integer maxLength, SortOrder sortOrder)",
"identifier": "pad",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, Integer maxLength, SortOrder sortOrder)",
"return": "void",
"signature": "void pad(ImmutableBytesWritable ptr, Integer maxLength, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.pad(byte[] b, Integer maxLength, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public byte[] pad(byte[] b, Integer maxLength, SortOrder sortOrder)",
"identifier": "pad",
"modifiers": "public",
"parameters": "(byte[] b, Integer maxLength, SortOrder sortOrder)",
"return": "byte[]",
"signature": "byte[] pad(byte[] b, Integer maxLength, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.arrayBaseType(PDataType arrayType)",
"constructor": false,
"full_signature": "public static PDataType arrayBaseType(PDataType arrayType)",
"identifier": "arrayBaseType",
"modifiers": "public static",
"parameters": "(PDataType arrayType)",
"return": "PDataType",
"signature": "PDataType arrayBaseType(PDataType arrayType)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public final int compareTo(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType) {\n Preconditions.checkNotNull(lhsSortOrder);\n Preconditions.checkNotNull(rhsSortOrder);\n if (this.isBytesComparableWith(rhsType)) { // directly compare the bytes\n // Special case as we may be comparing two arrays that have different separator characters due to PHOENIX-2067\n if (!this.isArrayType() || !rhsType.isArrayType() || \n PArrayDataType.isRowKeyOrderOptimized(this, lhsSortOrder, lhs, lhsOffset, lhsLength) == PArrayDataType.isRowKeyOrderOptimized(rhsType, rhsSortOrder, rhs, rhsOffset, rhsLength)) {\n // Ignore trailing zero bytes if fixed byte length (for example TIMESTAMP compared to DATE)\n if (lhsLength != rhsLength && this.isFixedWidth() && rhsType.isFixedWidth() && this.getByteSize() != null && rhsType.getByteSize() != null) {\n if (lhsLength > rhsLength) {\n int minOffset = lhsOffset + rhsLength;\n for (int i = lhsOffset + lhsLength - 1; i >= minOffset && lhsSortOrder.normalize(lhs[i]) == 0; i--,lhsLength--) {\n }\n } else {\n int minOffset = rhsOffset + lhsLength;\n for (int i = rhsOffset + rhsLength - 1; i >= minOffset && rhsSortOrder.normalize(rhs[i]) == 0; i--,rhsLength--) {\n }\n }\n }\n return compareTo(lhs, lhsOffset, lhsLength, lhsSortOrder, rhs, rhsOffset, rhsLength, rhsSortOrder);\n }\n }\n PDataCodec lhsCodec = this.getCodec();\n if ( lhsCodec == null ) {\n byte[] rhsConverted;\n Object o = this.toObject(rhs, rhsOffset, rhsLength, rhsType, rhsSortOrder);\n \n // No lhs native type representation, so convert rhsType to bytes representation of lhs type\n // Due to PHOENIX-2067, favor the array that is already in the new format so we don't have to convert both.\n if ( this.isArrayType() && PArrayDataType.isRowKeyOrderOptimized(this, lhsSortOrder, lhs, lhsOffset, lhsLength) == PArrayDataType.isRowKeyOrderOptimized(rhsType, rhsSortOrder, rhs, rhsOffset, rhsLength)) {\n rhsConverted = ((PArrayDataType)this).toBytes(o, PArrayDataType.arrayBaseType(this), lhsSortOrder, PArrayDataType.isRowKeyOrderOptimized(this, lhsSortOrder, lhs, lhsOffset, lhsLength));\n } else {\n rhsConverted = this.toBytes(o);\n if (rhsSortOrder == SortOrder.DESC) {\n rhsSortOrder = SortOrder.ASC;\n }\n if (lhsSortOrder == SortOrder.DESC) {\n lhs = SortOrder.invert(lhs, lhsOffset, new byte[lhsLength], 0, lhsLength);\n lhsOffset = 0;\n }\n }\n return Bytes.compareTo(lhs, lhsOffset, lhsLength, rhsConverted, 0, rhsConverted.length);\n }\n PDataCodec rhsCodec = rhsType.getCodec();\n if (rhsCodec == null) {\n byte[] lhsConverted;\n Object o = rhsType.toObject(lhs, lhsOffset, lhsLength, this, lhsSortOrder);\n \n // No rhs native type representation, so convert lhsType to bytes representation of rhs type\n // Due to PHOENIX-2067, favor the array that is already in the new format so we don't have to convert both.\n if ( rhsType.isArrayType() && PArrayDataType.isRowKeyOrderOptimized(rhsType, rhsSortOrder, rhs, rhsOffset, rhsLength) == PArrayDataType.isRowKeyOrderOptimized(this, lhsSortOrder, lhs, lhsOffset, lhsLength)) {\n lhsConverted = ((PArrayDataType)rhsType).toBytes(o, PArrayDataType.arrayBaseType(rhsType), rhsSortOrder, PArrayDataType.isRowKeyOrderOptimized(rhsType, rhsSortOrder, rhs, rhsOffset, rhsLength));\n } else {\n lhsConverted = rhsType.toBytes(o);\n if (lhsSortOrder == SortOrder.DESC) {\n lhsSortOrder = SortOrder.ASC;\n }\n if (rhsSortOrder == SortOrder.DESC) {\n rhs = SortOrder.invert(rhs, rhsOffset, new byte[rhsLength], 0, rhsLength);\n }\n }\n return Bytes.compareTo(lhsConverted, 0, lhsConverted.length, rhs, rhsOffset, rhsLength);\n }\n // convert to native and compare\n if ( (this.isCoercibleTo(PLong.INSTANCE) || this.isCoercibleTo(PDate.INSTANCE)) && \n (rhsType.isCoercibleTo(PLong.INSTANCE) || rhsType.isCoercibleTo(PDate.INSTANCE)) ) {\n return Longs.compare(this.getCodec().decodeLong(lhs, lhsOffset, lhsSortOrder), rhsType.getCodec()\n .decodeLong(rhs, rhsOffset, rhsSortOrder));\n } else if (isDoubleOrFloat(this) && isDoubleOrFloat(rhsType)) { // native double to double comparison\n return Doubles.compare(this.getCodec().decodeDouble(lhs, lhsOffset, lhsSortOrder), rhsType.getCodec()\n .decodeDouble(rhs, rhsOffset, rhsSortOrder));\n } else { // native float/double to long comparison\n float fvalue = 0.0F;\n double dvalue = 0.0;\n long lvalue = 0;\n boolean isFloat = false;\n int invert = 1;\n\n if (this.isCoercibleTo(PLong.INSTANCE)) {\n lvalue = this.getCodec().decodeLong(lhs, lhsOffset, lhsSortOrder);\n } else if (this.getClass() == PFloat.class) {\n isFloat = true;\n fvalue = this.getCodec().decodeFloat(lhs, lhsOffset, lhsSortOrder);\n } else if (this.isCoercibleTo(PDouble.INSTANCE)) {\n dvalue = this.getCodec().decodeDouble(lhs, lhsOffset, lhsSortOrder);\n }\n if (rhsType.isCoercibleTo(PLong.INSTANCE)) {\n lvalue = rhsType.getCodec().decodeLong(rhs, rhsOffset, rhsSortOrder);\n } else if (rhsType == PFloat.INSTANCE) {\n invert = -1;\n isFloat = true;\n fvalue = rhsType.getCodec().decodeFloat(rhs, rhsOffset, rhsSortOrder);\n } else if (rhsType.isCoercibleTo(PDouble.INSTANCE)) {\n invert = -1;\n dvalue = rhsType.getCodec().decodeDouble(rhs, rhsOffset, rhsSortOrder);\n }\n // Invert the comparison if float/double value is on the RHS\n return invert * (isFloat ? compareFloatToLong(fvalue, lvalue) : compareDoubleToLong(dvalue, lvalue));\n }\n }",
"class_method_signature": "PDataType.compareTo(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"constructor": false,
"full_signature": "public final int compareTo(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"identifier": "compareTo",
"invocations": [
"checkNotNull",
"checkNotNull",
"isBytesComparableWith",
"isArrayType",
"isArrayType",
"isRowKeyOrderOptimized",
"isRowKeyOrderOptimized",
"isFixedWidth",
"isFixedWidth",
"getByteSize",
"getByteSize",
"normalize",
"normalize",
"compareTo",
"getCodec",
"toObject",
"isArrayType",
"isRowKeyOrderOptimized",
"isRowKeyOrderOptimized",
"toBytes",
"arrayBaseType",
"isRowKeyOrderOptimized",
"toBytes",
"invert",
"compareTo",
"getCodec",
"toObject",
"isArrayType",
"isRowKeyOrderOptimized",
"isRowKeyOrderOptimized",
"toBytes",
"arrayBaseType",
"isRowKeyOrderOptimized",
"toBytes",
"invert",
"compareTo",
"isCoercibleTo",
"isCoercibleTo",
"isCoercibleTo",
"isCoercibleTo",
"compare",
"decodeLong",
"getCodec",
"decodeLong",
"getCodec",
"isDoubleOrFloat",
"isDoubleOrFloat",
"compare",
"decodeDouble",
"getCodec",
"decodeDouble",
"getCodec",
"isCoercibleTo",
"decodeLong",
"getCodec",
"getClass",
"decodeFloat",
"getCodec",
"isCoercibleTo",
"decodeDouble",
"getCodec",
"isCoercibleTo",
"decodeLong",
"getCodec",
"decodeFloat",
"getCodec",
"isCoercibleTo",
"decodeDouble",
"getCodec",
"compareFloatToLong",
"compareDoubleToLong"
],
"modifiers": "public final",
"parameters": "(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"return": "int",
"signature": "int compareTo(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_94 | {
"fields": [
{
"declarator": "ROW = Bytes.toBytes(\"row\")",
"modifier": "private static final",
"original_string": "private static final byte[] ROW = Bytes.toBytes(\"row\");",
"type": "byte[]",
"var_name": "ROW"
},
{
"declarator": "QUALIFIER = Bytes.toBytes(\"qual\")",
"modifier": "private static final",
"original_string": "private static final byte[] QUALIFIER = Bytes.toBytes(\"qual\");",
"type": "byte[]",
"var_name": "QUALIFIER"
},
{
"declarator": "ORIGINAL_VALUE = Bytes.toBytes(\"generic-value\")",
"modifier": "private static final",
"original_string": "private static final byte[] ORIGINAL_VALUE = Bytes.toBytes(\"generic-value\");",
"type": "byte[]",
"var_name": "ORIGINAL_VALUE"
},
{
"declarator": "DUMMY_TAGS = Bytes.toBytes(\"tags\")",
"modifier": "private static final",
"original_string": "private static final byte[] DUMMY_TAGS = Bytes.toBytes(\"tags\");",
"type": "byte[]",
"var_name": "DUMMY_TAGS"
},
{
"declarator": "mockBuilder = Mockito.mock(ExtendedCellBuilder.class)",
"modifier": "private final",
"original_string": "private final ExtendedCellBuilder mockBuilder = Mockito.mock(ExtendedCellBuilder.class);",
"type": "ExtendedCellBuilder",
"var_name": "mockBuilder"
},
{
"declarator": "mockCellWithTags = Mockito.mock(ExtendedCell.class)",
"modifier": "private final",
"original_string": "private final ExtendedCell mockCellWithTags = Mockito.mock(ExtendedCell.class);",
"type": "ExtendedCell",
"var_name": "mockCellWithTags"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/MetaDataUtilTest.java",
"identifier": "MetaDataUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConditionallyAddTagsToPutCells( ) {\n List<Tag> tags = TagUtil.asList(VIEW_MODIFIED_PROPERTY_BYTES, 0, VIEW_MODIFIED_PROPERTY_BYTES.length);\n assertEquals(tags.size(), 1);\n Tag expectedTag = tags.get(0);\n\n String version = VersionInfo.getVersion();\n KeyValueBuilder builder = KeyValueBuilder.get(version);\n KeyValue kv = builder.buildPut(wrap(ROW), wrap(TABLE_FAMILY_BYTES), wrap(UPDATE_CACHE_FREQUENCY_BYTES), wrap(\n PLong.INSTANCE.toBytes(0)));\n Put put = new Put(ROW);\n KeyValueBuilder.addQuietly(put, kv);\n\n ExtendedCellBuilder cellBuilder = (ExtendedCellBuilder) RawCellBuilderFactory.create();\n MetaDataUtil.conditionallyAddTagsToPutCells(put, TABLE_FAMILY_BYTES, UPDATE_CACHE_FREQUENCY_BYTES, cellBuilder,\n PInteger.INSTANCE.toBytes(1), VIEW_MODIFIED_PROPERTY_BYTES);\n\n Cell cell = put.getFamilyCellMap().get(TABLE_FAMILY_BYTES).get(0);\n\n // To check the cell tag whether view has modified this property\n assertTrue(Bytes.compareTo(expectedTag.getValueArray(), TagUtil.concatTags(EMPTY_BYTE_ARRAY, cell)) == 0);\n assertTrue(Bytes.contains(TagUtil.concatTags(EMPTY_BYTE_ARRAY, cell), expectedTag.getValueArray()));\n\n // To check tag data can be correctly deserialized\n Iterator<Tag> tagIterator = PrivateCellUtil.tagsIterator(cell);\n assertTrue(tagIterator.hasNext());\n Tag actualTag = tagIterator.next();\n assertTrue(Bytes.compareTo(actualTag.getValueArray(), actualTag.getValueOffset(), actualTag.getValueLength(),\n expectedTag.getValueArray(), expectedTag.getValueOffset(), expectedTag.getValueLength()) == 0);\n assertFalse(tagIterator.hasNext());\n }",
"class_method_signature": "MetaDataUtilTest.testConditionallyAddTagsToPutCells( )",
"constructor": false,
"full_signature": "@Test public void testConditionallyAddTagsToPutCells( )",
"identifier": "testConditionallyAddTagsToPutCells",
"invocations": [
"asList",
"assertEquals",
"size",
"get",
"getVersion",
"get",
"buildPut",
"wrap",
"wrap",
"wrap",
"wrap",
"toBytes",
"addQuietly",
"create",
"conditionallyAddTagsToPutCells",
"toBytes",
"get",
"get",
"getFamilyCellMap",
"assertTrue",
"compareTo",
"getValueArray",
"concatTags",
"assertTrue",
"contains",
"concatTags",
"getValueArray",
"tagsIterator",
"assertTrue",
"hasNext",
"next",
"assertTrue",
"compareTo",
"getValueArray",
"getValueOffset",
"getValueLength",
"getValueArray",
"getValueOffset",
"getValueLength",
"assertFalse",
"hasNext"
],
"modifiers": "@Test public",
"parameters": "( )",
"return": "void",
"signature": "void testConditionallyAddTagsToPutCells( )",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MetaDataUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataUtil.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "VIEW_INDEX_TABLE_PREFIX = \"_IDX_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_TABLE_PREFIX = \"_IDX_\";",
"type": "String",
"var_name": "VIEW_INDEX_TABLE_PREFIX"
},
{
"declarator": "LOCAL_INDEX_TABLE_PREFIX = \"_LOCAL_IDX_\"",
"modifier": "public static final",
"original_string": "public static final String LOCAL_INDEX_TABLE_PREFIX = \"_LOCAL_IDX_\";",
"type": "String",
"var_name": "LOCAL_INDEX_TABLE_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_PREFIX = \"_SEQ_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_SEQUENCE_PREFIX = \"_SEQ_\";",
"type": "String",
"var_name": "VIEW_INDEX_SEQUENCE_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_NAME_PREFIX = \"_ID_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_SEQUENCE_NAME_PREFIX = \"_ID_\";",
"type": "String",
"var_name": "VIEW_INDEX_SEQUENCE_NAME_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_PREFIX_BYTES = Bytes.toBytes(VIEW_INDEX_SEQUENCE_PREFIX)",
"modifier": "public static final",
"original_string": "public static final byte[] VIEW_INDEX_SEQUENCE_PREFIX_BYTES = Bytes.toBytes(VIEW_INDEX_SEQUENCE_PREFIX);",
"type": "byte[]",
"var_name": "VIEW_INDEX_SEQUENCE_PREFIX_BYTES"
},
{
"declarator": "VIEW_INDEX_ID_COLUMN_NAME = \"_INDEX_ID\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_ID_COLUMN_NAME = \"_INDEX_ID\";",
"type": "String",
"var_name": "VIEW_INDEX_ID_COLUMN_NAME"
},
{
"declarator": "PARENT_TABLE_KEY = \"PARENT_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String PARENT_TABLE_KEY = \"PARENT_TABLE\";",
"type": "String",
"var_name": "PARENT_TABLE_KEY"
},
{
"declarator": "IS_VIEW_INDEX_TABLE_PROP_NAME = \"IS_VIEW_INDEX_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String IS_VIEW_INDEX_TABLE_PROP_NAME = \"IS_VIEW_INDEX_TABLE\";",
"type": "String",
"var_name": "IS_VIEW_INDEX_TABLE_PROP_NAME"
},
{
"declarator": "IS_VIEW_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_VIEW_INDEX_TABLE_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] IS_VIEW_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_VIEW_INDEX_TABLE_PROP_NAME);",
"type": "byte[]",
"var_name": "IS_VIEW_INDEX_TABLE_PROP_BYTES"
},
{
"declarator": "IS_LOCAL_INDEX_TABLE_PROP_NAME = \"IS_LOCAL_INDEX_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String IS_LOCAL_INDEX_TABLE_PROP_NAME = \"IS_LOCAL_INDEX_TABLE\";",
"type": "String",
"var_name": "IS_LOCAL_INDEX_TABLE_PROP_NAME"
},
{
"declarator": "IS_LOCAL_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_LOCAL_INDEX_TABLE_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] IS_LOCAL_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_LOCAL_INDEX_TABLE_PROP_NAME);",
"type": "byte[]",
"var_name": "IS_LOCAL_INDEX_TABLE_PROP_BYTES"
},
{
"declarator": "DATA_TABLE_NAME_PROP_NAME = \"DATA_TABLE_NAME\"",
"modifier": "public static final",
"original_string": "public static final String DATA_TABLE_NAME_PROP_NAME = \"DATA_TABLE_NAME\";",
"type": "String",
"var_name": "DATA_TABLE_NAME_PROP_NAME"
},
{
"declarator": "DATA_TABLE_NAME_PROP_BYTES = Bytes.toBytes(DATA_TABLE_NAME_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] DATA_TABLE_NAME_PROP_BYTES = Bytes.toBytes(DATA_TABLE_NAME_PROP_NAME);",
"type": "byte[]",
"var_name": "DATA_TABLE_NAME_PROP_BYTES"
},
{
"declarator": "SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES = ImmutableList.of(\n ColumnFamilyDescriptorBuilder.TTL,\n ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS,\n ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE)",
"modifier": "public static final",
"original_string": "public static final List<String> SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES = ImmutableList.of(\n ColumnFamilyDescriptorBuilder.TTL,\n ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS,\n ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE);",
"type": "List<String>",
"var_name": "SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/MetaDataUtil.java",
"identifier": "MetaDataUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "MetaDataUtil.areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"constructor": false,
"full_signature": "public static ClientServerCompatibility areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"identifier": "areClientAndServerCompatible",
"modifiers": "public static",
"parameters": "(long serverHBaseAndPhoenixVersion)",
"return": "ClientServerCompatibility",
"signature": "ClientServerCompatibility areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"constructor": false,
"full_signature": "@VisibleForTesting static ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"identifier": "areClientAndServerCompatible",
"modifiers": "@VisibleForTesting static",
"parameters": "(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"return": "ClientServerCompatibility",
"signature": "ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodePhoenixVersion(long version)",
"constructor": false,
"full_signature": "public static int decodePhoenixVersion(long version)",
"identifier": "decodePhoenixVersion",
"modifiers": "public static",
"parameters": "(long version)",
"return": "int",
"signature": "int decodePhoenixVersion(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.encodeHasIndexWALCodec(long version, boolean isValid)",
"constructor": false,
"full_signature": "public static long encodeHasIndexWALCodec(long version, boolean isValid)",
"identifier": "encodeHasIndexWALCodec",
"modifiers": "public static",
"parameters": "(long version, boolean isValid)",
"return": "long",
"signature": "long encodeHasIndexWALCodec(long version, boolean isValid)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHasIndexWALCodec(long version)",
"constructor": false,
"full_signature": "public static boolean decodeHasIndexWALCodec(long version)",
"identifier": "decodeHasIndexWALCodec",
"modifiers": "public static",
"parameters": "(long version)",
"return": "boolean",
"signature": "boolean decodeHasIndexWALCodec(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHBaseVersion(long version)",
"constructor": false,
"full_signature": "public static int decodeHBaseVersion(long version)",
"identifier": "decodeHBaseVersion",
"modifiers": "public static",
"parameters": "(long version)",
"return": "int",
"signature": "int decodeHBaseVersion(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHBaseVersionAsString(int version)",
"constructor": false,
"full_signature": "public static String decodeHBaseVersionAsString(int version)",
"identifier": "decodeHBaseVersionAsString",
"modifiers": "public static",
"parameters": "(int version)",
"return": "String",
"signature": "String decodeHBaseVersionAsString(int version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeTableNamespaceMappingEnabled(long version)",
"constructor": false,
"full_signature": "public static boolean decodeTableNamespaceMappingEnabled(long version)",
"identifier": "decodeTableNamespaceMappingEnabled",
"modifiers": "public static",
"parameters": "(long version)",
"return": "boolean",
"signature": "boolean decodeTableNamespaceMappingEnabled(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.encodeVersion(String hbaseVersionStr, Configuration config)",
"constructor": false,
"full_signature": "public static long encodeVersion(String hbaseVersionStr, Configuration config)",
"identifier": "encodeVersion",
"modifiers": "public static",
"parameters": "(String hbaseVersionStr, Configuration config)",
"return": "long",
"signature": "long encodeVersion(String hbaseVersionStr, Configuration config)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(Mutation someRow)",
"constructor": false,
"full_signature": "public static byte[] getTenantIdAndSchemaAndTableName(Mutation someRow)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(Mutation someRow)",
"return": "byte[]",
"signature": "byte[] getTenantIdAndSchemaAndTableName(Mutation someRow)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(Result result)",
"constructor": false,
"full_signature": "public static byte[] getTenantIdAndSchemaAndTableName(Result result)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(Result result)",
"return": "byte[]",
"signature": "byte[] getTenantIdAndSchemaAndTableName(Result result)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"constructor": false,
"full_signature": "public static void getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"return": "void",
"signature": "void getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getBaseColumnCount(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static int getBaseColumnCount(List<Mutation> tableMetadata)",
"identifier": "getBaseColumnCount",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "int",
"signature": "int getBaseColumnCount(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"constructor": false,
"full_signature": "public static void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"identifier": "mutatePutValue",
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"return": "void",
"signature": "void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"constructor": false,
"full_signature": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"identifier": "conditionallyAddTagsToPutCells",
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"return": "void",
"signature": "void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"constructor": false,
"full_signature": "public static Put cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"identifier": "cloneDeleteToPutAndAddColumn",
"modifiers": "public static",
"parameters": "(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"return": "Put",
"signature": "Put cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"constructor": false,
"full_signature": "public static void getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"identifier": "getTenantIdAndFunctionName",
"modifiers": "public static",
"parameters": "(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"return": "void",
"signature": "void getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentTableName(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static byte[] getParentTableName(List<Mutation> tableMetadata)",
"identifier": "getParentTableName",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "byte[]",
"signature": "byte[] getParentTableName(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSequenceNumber(Mutation tableMutation)",
"constructor": false,
"full_signature": "public static long getSequenceNumber(Mutation tableMutation)",
"identifier": "getSequenceNumber",
"modifiers": "public static",
"parameters": "(Mutation tableMutation)",
"return": "long",
"signature": "long getSequenceNumber(Mutation tableMutation)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSequenceNumber(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static long getSequenceNumber(List<Mutation> tableMetaData)",
"identifier": "getSequenceNumber",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "long",
"signature": "long getSequenceNumber(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static PTableType getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getTableType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "PTableType",
"signature": "PTableType getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static boolean isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "isNameSpaceMapped",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "boolean",
"signature": "boolean isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static int getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getSaltBuckets",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "int",
"signature": "int getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentSequenceNumber(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static long getParentSequenceNumber(List<Mutation> tableMetaData)",
"identifier": "getParentSequenceNumber",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "long",
"signature": "long getParentSequenceNumber(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Mutation getTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Mutation",
"signature": "Mutation getTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "getMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"constructor": false,
"full_signature": "public static KeyValue getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"identifier": "getMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"return": "KeyValue",
"signature": "KeyValue getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"constructor": false,
"full_signature": "public static boolean setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"identifier": "setMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"return": "boolean",
"signature": "boolean setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Put getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getPutOnlyTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Put",
"signature": "Put getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Put getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"identifier": "getPutOnlyAutoPartitionColumn",
"modifiers": "public static",
"parameters": "(PTable parentTable, List<Mutation> tableMetaData)",
"return": "Put",
"signature": "Put getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Mutation getParentTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getParentTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Mutation",
"signature": "Mutation getParentTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getClientTimeStamp(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static long getClientTimeStamp(List<Mutation> tableMetadata)",
"identifier": "getClientTimeStamp",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "long",
"signature": "long getClientTimeStamp(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getClientTimeStamp(Mutation m)",
"constructor": false,
"full_signature": "public static long getClientTimeStamp(Mutation m)",
"identifier": "getClientTimeStamp",
"modifiers": "public static",
"parameters": "(Mutation m)",
"return": "long",
"signature": "long getClientTimeStamp(Mutation m)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"constructor": false,
"full_signature": "public static byte[] getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"identifier": "getParentLinkKey",
"modifiers": "public static",
"parameters": "(String tenantId, String schemaName, String tableName, String indexName)",
"return": "byte[]",
"signature": "byte[] getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"constructor": false,
"full_signature": "public static byte[] getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"identifier": "getParentLinkKey",
"modifiers": "public static",
"parameters": "(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"return": "byte[]",
"signature": "byte[] getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"constructor": false,
"full_signature": "public static byte[] getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"identifier": "getChildLinkKey",
"modifiers": "public static",
"parameters": "(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"return": "byte[]",
"signature": "byte[] getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getCell(List<Cell> cells, byte[] cq)",
"constructor": false,
"full_signature": "public static Cell getCell(List<Cell> cells, byte[] cq)",
"identifier": "getCell",
"modifiers": "public static",
"parameters": "(List<Cell> cells, byte[] cq)",
"return": "Cell",
"signature": "Cell getCell(List<Cell> cells, byte[] cq)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isMultiTenant",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isTransactional",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isSalted",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexPhysicalName(byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static byte[] getViewIndexPhysicalName(byte[] physicalTableName)",
"identifier": "getViewIndexPhysicalName",
"modifiers": "public static",
"parameters": "(byte[] physicalTableName)",
"return": "byte[]",
"signature": "byte[] getViewIndexPhysicalName(byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexPhysicalName(String physicalTableName)",
"constructor": false,
"full_signature": "public static String getViewIndexPhysicalName(String physicalTableName)",
"identifier": "getViewIndexPhysicalName",
"modifiers": "public static",
"parameters": "(String physicalTableName)",
"return": "String",
"signature": "String getViewIndexPhysicalName(String physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"constructor": false,
"full_signature": "private static byte[] getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"identifier": "getIndexPhysicalName",
"modifiers": "private static",
"parameters": "(byte[] physicalTableName, String indexPrefix)",
"return": "byte[]",
"signature": "byte[] getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"constructor": false,
"full_signature": "private static String getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"identifier": "getIndexPhysicalName",
"modifiers": "private static",
"parameters": "(String physicalTableName, String indexPrefix)",
"return": "String",
"signature": "String getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexPhysicalName(byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static byte[] getLocalIndexPhysicalName(byte[] physicalTableName)",
"identifier": "getLocalIndexPhysicalName",
"modifiers": "public static",
"parameters": "(byte[] physicalTableName)",
"return": "byte[]",
"signature": "byte[] getLocalIndexPhysicalName(byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexTableName(String tableName)",
"constructor": false,
"full_signature": "public static String getLocalIndexTableName(String tableName)",
"identifier": "getLocalIndexTableName",
"modifiers": "public static",
"parameters": "(String tableName)",
"return": "String",
"signature": "String getLocalIndexTableName(String tableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexSchemaName(String schemaName)",
"constructor": false,
"full_signature": "public static String getLocalIndexSchemaName(String schemaName)",
"identifier": "getLocalIndexSchemaName",
"modifiers": "public static",
"parameters": "(String schemaName)",
"return": "String",
"signature": "String getLocalIndexSchemaName(String schemaName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexUserTableName(String localIndexTableName)",
"constructor": false,
"full_signature": "public static String getLocalIndexUserTableName(String localIndexTableName)",
"identifier": "getLocalIndexUserTableName",
"modifiers": "public static",
"parameters": "(String localIndexTableName)",
"return": "String",
"signature": "String getLocalIndexUserTableName(String localIndexTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexUserTableName(String viewIndexTableName)",
"constructor": false,
"full_signature": "public static String getViewIndexUserTableName(String viewIndexTableName)",
"identifier": "getViewIndexUserTableName",
"modifiers": "public static",
"parameters": "(String viewIndexTableName)",
"return": "String",
"signature": "String getViewIndexUserTableName(String viewIndexTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceSchemaName",
"modifiers": "public static",
"parameters": "(PName physicalName, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceName",
"modifiers": "public static",
"parameters": "(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static SequenceKey getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceKey",
"modifiers": "public static",
"parameters": "(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"return": "SequenceKey",
"signature": "SequenceKey getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceSchemaName",
"modifiers": "public static",
"parameters": "(PName physicalName, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceName",
"modifiers": "public static",
"parameters": "(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static SequenceKey getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceKey",
"modifiers": "public static",
"parameters": "(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"return": "SequenceKey",
"signature": "SequenceKey getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexIdDataType()",
"constructor": false,
"full_signature": "public static PDataType getViewIndexIdDataType()",
"identifier": "getViewIndexIdDataType",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getViewIndexIdDataType()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLegacyViewIndexIdDataType()",
"constructor": false,
"full_signature": "public static PDataType getLegacyViewIndexIdDataType()",
"identifier": "getLegacyViewIndexIdDataType",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getLegacyViewIndexIdDataType()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexIdColumnName()",
"constructor": false,
"full_signature": "public static String getViewIndexIdColumnName()",
"identifier": "getViewIndexIdColumnName",
"modifiers": "public static",
"parameters": "()",
"return": "String",
"signature": "String getViewIndexIdColumnName()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"constructor": false,
"full_signature": "public static boolean hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"identifier": "hasViewIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName physicalName)",
"return": "boolean",
"signature": "boolean hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static boolean hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"identifier": "hasViewIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, byte[] physicalTableName)",
"return": "boolean",
"signature": "boolean hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"identifier": "hasLocalIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName physicalName)",
"return": "boolean",
"signature": "boolean hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"identifier": "hasLocalIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, byte[] physicalTableName)",
"return": "boolean",
"signature": "boolean hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexColumnFamily(TableDescriptor desc)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexColumnFamily(TableDescriptor desc)",
"identifier": "hasLocalIndexColumnFamily",
"modifiers": "public static",
"parameters": "(TableDescriptor desc)",
"return": "boolean",
"signature": "boolean hasLocalIndexColumnFamily(TableDescriptor desc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"constructor": false,
"full_signature": "public static List<byte[]> getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"identifier": "getNonLocalIndexColumnFamilies",
"modifiers": "public static",
"parameters": "(TableDescriptor desc)",
"return": "List<byte[]>",
"signature": "List<byte[]> getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static List<byte[]> getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"identifier": "getLocalIndexColumnFamilies",
"modifiers": "public static",
"parameters": "(PhoenixConnection conn, byte[] physicalTableName)",
"return": "List<byte[]>",
"signature": "List<byte[]> getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static void deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"identifier": "deleteViewIndexSequences",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"return": "void",
"signature": "void deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.tableRegionsOnline(Configuration conf, PTable table)",
"constructor": false,
"full_signature": "public static boolean tableRegionsOnline(Configuration conf, PTable table)",
"identifier": "tableRegionsOnline",
"modifiers": "public static",
"parameters": "(Configuration conf, PTable table)",
"return": "boolean",
"signature": "boolean tableRegionsOnline(Configuration conf, PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.propertyNotAllowedToBeOutOfSync(String colFamProp)",
"constructor": false,
"full_signature": "public static boolean propertyNotAllowedToBeOutOfSync(String colFamProp)",
"identifier": "propertyNotAllowedToBeOutOfSync",
"modifiers": "public static",
"parameters": "(String colFamProp)",
"return": "boolean",
"signature": "boolean propertyNotAllowedToBeOutOfSync(String colFamProp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"constructor": false,
"full_signature": "public static Map<String, Object> getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"identifier": "getSyncedProps",
"modifiers": "public static",
"parameters": "(ColumnFamilyDescriptor defaultCFDesc)",
"return": "Map<String, Object>",
"signature": "Map<String, Object> getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"constructor": false,
"full_signature": "public static Scan newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"identifier": "newTableRowsScan",
"modifiers": "public static",
"parameters": "(byte[] key, long startTimeStamp, long stopTimeStamp)",
"return": "Scan",
"signature": "Scan newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"constructor": false,
"full_signature": "public static Scan newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"identifier": "newTableRowsScan",
"modifiers": "public static",
"parameters": "(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"return": "Scan",
"signature": "Scan newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLinkType(Mutation tableMutation)",
"constructor": false,
"full_signature": "public static LinkType getLinkType(Mutation tableMutation)",
"identifier": "getLinkType",
"modifiers": "public static",
"parameters": "(Mutation tableMutation)",
"return": "LinkType",
"signature": "LinkType getLinkType(Mutation tableMutation)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLinkType(Collection<Cell> kvs)",
"constructor": false,
"full_signature": "public static LinkType getLinkType(Collection<Cell> kvs)",
"identifier": "getLinkType",
"modifiers": "public static",
"parameters": "(Collection<Cell> kvs)",
"return": "LinkType",
"signature": "LinkType getLinkType(Collection<Cell> kvs)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndex(String physicalName)",
"constructor": false,
"full_signature": "public static boolean isLocalIndex(String physicalName)",
"identifier": "isLocalIndex",
"modifiers": "public static",
"parameters": "(String physicalName)",
"return": "boolean",
"signature": "boolean isLocalIndex(String physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isViewIndex(String physicalName)",
"constructor": false,
"full_signature": "public static boolean isViewIndex(String physicalName)",
"identifier": "isViewIndex",
"modifiers": "public static",
"parameters": "(String physicalName)",
"return": "boolean",
"signature": "boolean isViewIndex(String physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getAutoPartitionColumnName(PTable parentTable)",
"constructor": false,
"full_signature": "public static String getAutoPartitionColumnName(PTable parentTable)",
"identifier": "getAutoPartitionColumnName",
"modifiers": "public static",
"parameters": "(PTable parentTable)",
"return": "String",
"signature": "String getAutoPartitionColumnName(PTable parentTable)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getAutoPartitionColIndex(PTable parentTable)",
"constructor": false,
"full_signature": "public static int getAutoPartitionColIndex(PTable parentTable)",
"identifier": "getAutoPartitionColIndex",
"modifiers": "public static",
"parameters": "(PTable parentTable)",
"return": "int",
"signature": "int getAutoPartitionColIndex(PTable parentTable)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getJdbcUrl(RegionCoprocessorEnvironment env)",
"constructor": false,
"full_signature": "public static String getJdbcUrl(RegionCoprocessorEnvironment env)",
"identifier": "getJdbcUrl",
"modifiers": "public static",
"parameters": "(RegionCoprocessorEnvironment env)",
"return": "String",
"signature": "String getJdbcUrl(RegionCoprocessorEnvironment env)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isHColumnProperty(String propName)",
"constructor": false,
"full_signature": "public static boolean isHColumnProperty(String propName)",
"identifier": "isHColumnProperty",
"modifiers": "public static",
"parameters": "(String propName)",
"return": "boolean",
"signature": "boolean isHColumnProperty(String propName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isHTableProperty(String propName)",
"constructor": false,
"full_signature": "public static boolean isHTableProperty(String propName)",
"identifier": "isHTableProperty",
"modifiers": "public static",
"parameters": "(String propName)",
"return": "boolean",
"signature": "boolean isHTableProperty(String propName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"constructor": false,
"full_signature": "public static boolean isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"identifier": "isLocalIndexFamily",
"modifiers": "public static",
"parameters": "(ImmutableBytesPtr cfPtr)",
"return": "boolean",
"signature": "boolean isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndexFamily(byte[] cf)",
"constructor": false,
"full_signature": "public static boolean isLocalIndexFamily(byte[] cf)",
"identifier": "isLocalIndexFamily",
"modifiers": "public static",
"parameters": "(byte[] cf)",
"return": "boolean",
"signature": "boolean isLocalIndexFamily(byte[] cf)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPhysicalTableRowForView(PTable view)",
"constructor": false,
"full_signature": "public static final byte[] getPhysicalTableRowForView(PTable view)",
"identifier": "getPhysicalTableRowForView",
"modifiers": "public static final",
"parameters": "(PTable view)",
"return": "byte[]",
"signature": "byte[] getPhysicalTableRowForView(PTable view)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.removeChildLinkMutations(List<Mutation> metadataMutations)",
"constructor": false,
"full_signature": "public static List<Mutation> removeChildLinkMutations(List<Mutation> metadataMutations)",
"identifier": "removeChildLinkMutations",
"modifiers": "public static",
"parameters": "(List<Mutation> metadataMutations)",
"return": "List<Mutation>",
"signature": "List<Mutation> removeChildLinkMutations(List<Mutation> metadataMutations)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static IndexType getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getIndexType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "IndexType",
"signature": "IndexType getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static PDataType<?> getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"identifier": "getIndexDataType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"return": "PDataType<?>",
"signature": "PDataType<?> getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"constructor": false,
"full_signature": "public static PColumn getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"identifier": "getColumn",
"modifiers": "public static",
"parameters": "(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"return": "PColumn",
"signature": "PColumn getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"constructor": false,
"full_signature": "public static void deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"identifier": "deleteFromStatsTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"return": "void",
"signature": "void deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray) {\n NavigableMap<byte[], List<Cell>> familyCellMap = somePut.getFamilyCellMap();\n List<Cell> cells = familyCellMap.get(family);\n List<Cell> newCells = Lists.newArrayList();\n if (cells != null) {\n for (Cell cell : cells) {\n if (Bytes.compareTo(cell.getQualifierArray(), cell.getQualifierOffset(),\n cell.getQualifierLength(), qualifier, 0, qualifier.length) == 0 &&\n (valueArray == null || !CellUtil.matchingValue(cell, valueArray))) {\n ExtendedCell extendedCell = cellBuilder\n .setRow(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength())\n .setFamily(cell.getFamilyArray(), cell.getFamilyOffset(),\n cell.getFamilyLength())\n .setQualifier(cell.getQualifierArray(), cell.getQualifierOffset(),\n cell.getQualifierLength())\n .setValue(cell.getValueArray(), cell.getValueOffset(),\n cell.getValueLength())\n .setTimestamp(cell.getTimestamp())\n .setType(cell.getType())\n .setTags(TagUtil.concatTags(tagArray, cell))\n .build();\n // Replace existing cell with a cell that has the custom tags list\n newCells.add(extendedCell);\n } else {\n // Add cell as is\n newCells.add(cell);\n }\n }\n familyCellMap.put(family, newCells);\n }\n }",
"class_method_signature": "MetaDataUtil.conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"constructor": false,
"full_signature": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"identifier": "conditionallyAddTagsToPutCells",
"invocations": [
"getFamilyCellMap",
"get",
"newArrayList",
"compareTo",
"getQualifierArray",
"getQualifierOffset",
"getQualifierLength",
"matchingValue",
"build",
"setTags",
"setType",
"setTimestamp",
"setValue",
"setQualifier",
"setFamily",
"setRow",
"getRowArray",
"getRowOffset",
"getRowLength",
"getFamilyArray",
"getFamilyOffset",
"getFamilyLength",
"getQualifierArray",
"getQualifierOffset",
"getQualifierLength",
"getValueArray",
"getValueOffset",
"getValueLength",
"getTimestamp",
"getType",
"concatTags",
"add",
"add",
"put"
],
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"return": "void",
"signature": "void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_139 | {
"fields": [
{
"declarator": "exceptionRule = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException exceptionRule = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exceptionRule"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/execute/MutationStateTest.java",
"identifier": "MutationStateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testJoinIntArrays() {\n // simple case\n int[] a = new int[] {1};\n int[] b = new int[] {2};\n int[] result = joinSortedIntArrays(a, b);\n \n assertEquals(2, result.length);\n assertArrayEquals(new int[] {1,2}, result);\n \n // empty arrays\n a = new int[0];\n b = new int[0];\n result = joinSortedIntArrays(a, b);\n \n assertEquals(0, result.length);\n assertArrayEquals(new int[] {}, result);\n \n // dupes between arrays\n a = new int[] {1,2,3};\n b = new int[] {1,2,4};\n result = joinSortedIntArrays(a, b);\n \n assertEquals(4, result.length);\n assertArrayEquals(new int[] {1,2,3,4}, result);\n \n // dupes within arrays\n a = new int[] {1,2,2,3};\n b = new int[] {1,2,4};\n result = joinSortedIntArrays(a, b);\n \n assertEquals(4, result.length);\n assertArrayEquals(new int[] {1,2,3,4}, result);\n }",
"class_method_signature": "MutationStateTest.testJoinIntArrays()",
"constructor": false,
"full_signature": "@Test public void testJoinIntArrays()",
"identifier": "testJoinIntArrays",
"invocations": [
"joinSortedIntArrays",
"assertEquals",
"assertArrayEquals",
"joinSortedIntArrays",
"assertEquals",
"assertArrayEquals",
"joinSortedIntArrays",
"assertEquals",
"assertArrayEquals",
"joinSortedIntArrays",
"assertEquals",
"assertArrayEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testJoinIntArrays()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MutationState.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MutationState.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "EMPTY_STATEMENT_INDEX_ARRAY = new int[0]",
"modifier": "private static final",
"original_string": "private static final int[] EMPTY_STATEMENT_INDEX_ARRAY = new int[0];",
"type": "int[]",
"var_name": "EMPTY_STATEMENT_INDEX_ARRAY"
},
{
"declarator": "MAX_COMMIT_RETRIES = 3",
"modifier": "private static final",
"original_string": "private static final int MAX_COMMIT_RETRIES = 3;",
"type": "int",
"var_name": "MAX_COMMIT_RETRIES"
},
{
"declarator": "connection",
"modifier": "private final",
"original_string": "private final PhoenixConnection connection;",
"type": "PhoenixConnection",
"var_name": "connection"
},
{
"declarator": "maxSize",
"modifier": "private final",
"original_string": "private final int maxSize;",
"type": "int",
"var_name": "maxSize"
},
{
"declarator": "maxSizeBytes",
"modifier": "private final",
"original_string": "private final long maxSizeBytes;",
"type": "long",
"var_name": "maxSizeBytes"
},
{
"declarator": "batchSize",
"modifier": "private final",
"original_string": "private final long batchSize;",
"type": "long",
"var_name": "batchSize"
},
{
"declarator": "batchSizeBytes",
"modifier": "private final",
"original_string": "private final long batchSizeBytes;",
"type": "long",
"var_name": "batchSizeBytes"
},
{
"declarator": "batchCount = 0L",
"modifier": "private",
"original_string": "private long batchCount = 0L;",
"type": "long",
"var_name": "batchCount"
},
{
"declarator": "mutations",
"modifier": "private final",
"original_string": "private final Map<TableRef, MultiRowMutationState> mutations;",
"type": "Map<TableRef, MultiRowMutationState>",
"var_name": "mutations"
},
{
"declarator": "uncommittedPhysicalNames = Sets.newHashSetWithExpectedSize(10)",
"modifier": "private final",
"original_string": "private final Set<String> uncommittedPhysicalNames = Sets.newHashSetWithExpectedSize(10);",
"type": "Set<String>",
"var_name": "uncommittedPhysicalNames"
},
{
"declarator": "sizeOffset",
"modifier": "private",
"original_string": "private long sizeOffset;",
"type": "long",
"var_name": "sizeOffset"
},
{
"declarator": "numRows = 0",
"modifier": "private",
"original_string": "private int numRows = 0;",
"type": "int",
"var_name": "numRows"
},
{
"declarator": "estimatedSize = 0",
"modifier": "private",
"original_string": "private long estimatedSize = 0;",
"type": "long",
"var_name": "estimatedSize"
},
{
"declarator": "uncommittedStatementIndexes = EMPTY_STATEMENT_INDEX_ARRAY",
"modifier": "private",
"original_string": "private int[] uncommittedStatementIndexes = EMPTY_STATEMENT_INDEX_ARRAY;",
"type": "int[]",
"var_name": "uncommittedStatementIndexes"
},
{
"declarator": "isExternalTxContext = false",
"modifier": "private",
"original_string": "private boolean isExternalTxContext = false;",
"type": "boolean",
"var_name": "isExternalTxContext"
},
{
"declarator": "txMutations = Collections.emptyMap()",
"modifier": "private",
"original_string": "private Map<TableRef, MultiRowMutationState> txMutations = Collections.emptyMap();",
"type": "Map<TableRef, MultiRowMutationState>",
"var_name": "txMutations"
},
{
"declarator": "phoenixTransactionContext = PhoenixTransactionContext.NULL_CONTEXT",
"modifier": "private",
"original_string": "private PhoenixTransactionContext phoenixTransactionContext = PhoenixTransactionContext.NULL_CONTEXT;",
"type": "PhoenixTransactionContext",
"var_name": "phoenixTransactionContext"
},
{
"declarator": "mutationMetricQueue",
"modifier": "private final",
"original_string": "private final MutationMetricQueue mutationMetricQueue;",
"type": "MutationMetricQueue",
"var_name": "mutationMetricQueue"
},
{
"declarator": "readMetricQueue",
"modifier": "private",
"original_string": "private ReadMetricQueue readMetricQueue;",
"type": "ReadMetricQueue",
"var_name": "readMetricQueue"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java",
"identifier": "MutationState",
"interfaces": "implements SQLCloseable",
"methods": [
{
"class_method_signature": "MutationState.MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection)",
"constructor": true,
"full_signature": "public MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection)",
"identifier": "MutationState",
"modifiers": "public",
"parameters": "(int maxSize, long maxSizeBytes, PhoenixConnection connection)",
"return": "",
"signature": " MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection)",
"testcase": false
},
{
"class_method_signature": "MutationState.MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n PhoenixTransactionContext txContext)",
"constructor": true,
"full_signature": "public MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n PhoenixTransactionContext txContext)",
"identifier": "MutationState",
"modifiers": "public",
"parameters": "(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n PhoenixTransactionContext txContext)",
"return": "",
"signature": " MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n PhoenixTransactionContext txContext)",
"testcase": false
},
{
"class_method_signature": "MutationState.MutationState(MutationState mutationState)",
"constructor": true,
"full_signature": "public MutationState(MutationState mutationState)",
"identifier": "MutationState",
"modifiers": "public",
"parameters": "(MutationState mutationState)",
"return": "",
"signature": " MutationState(MutationState mutationState)",
"testcase": false
},
{
"class_method_signature": "MutationState.MutationState(MutationState mutationState, PhoenixConnection connection)",
"constructor": true,
"full_signature": "public MutationState(MutationState mutationState, PhoenixConnection connection)",
"identifier": "MutationState",
"modifiers": "public",
"parameters": "(MutationState mutationState, PhoenixConnection connection)",
"return": "",
"signature": " MutationState(MutationState mutationState, PhoenixConnection connection)",
"testcase": false
},
{
"class_method_signature": "MutationState.MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n long sizeOffset)",
"constructor": true,
"full_signature": "public MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n long sizeOffset)",
"identifier": "MutationState",
"modifiers": "public",
"parameters": "(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n long sizeOffset)",
"return": "",
"signature": " MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n long sizeOffset)",
"testcase": false
},
{
"class_method_signature": "MutationState.MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n boolean subTask, PhoenixTransactionContext txContext)",
"constructor": true,
"full_signature": "private MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n boolean subTask, PhoenixTransactionContext txContext)",
"identifier": "MutationState",
"modifiers": "private",
"parameters": "(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n boolean subTask, PhoenixTransactionContext txContext)",
"return": "",
"signature": " MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n boolean subTask, PhoenixTransactionContext txContext)",
"testcase": false
},
{
"class_method_signature": "MutationState.MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n boolean subTask, PhoenixTransactionContext txContext, long sizeOffset)",
"constructor": true,
"full_signature": "private MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n boolean subTask, PhoenixTransactionContext txContext, long sizeOffset)",
"identifier": "MutationState",
"modifiers": "private",
"parameters": "(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n boolean subTask, PhoenixTransactionContext txContext, long sizeOffset)",
"return": "",
"signature": " MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n boolean subTask, PhoenixTransactionContext txContext, long sizeOffset)",
"testcase": false
},
{
"class_method_signature": "MutationState.MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n Map<TableRef, MultiRowMutationState> mutations, boolean subTask, PhoenixTransactionContext txContext)",
"constructor": true,
"full_signature": " MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n Map<TableRef, MultiRowMutationState> mutations, boolean subTask, PhoenixTransactionContext txContext)",
"identifier": "MutationState",
"modifiers": "",
"parameters": "(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n Map<TableRef, MultiRowMutationState> mutations, boolean subTask, PhoenixTransactionContext txContext)",
"return": "",
"signature": " MutationState(int maxSize, long maxSizeBytes, PhoenixConnection connection,\n Map<TableRef, MultiRowMutationState> mutations, boolean subTask, PhoenixTransactionContext txContext)",
"testcase": false
},
{
"class_method_signature": "MutationState.MutationState(TableRef table, MultiRowMutationState mutations, long sizeOffset,\n int maxSize, long maxSizeBytes, PhoenixConnection connection)",
"constructor": true,
"full_signature": "public MutationState(TableRef table, MultiRowMutationState mutations, long sizeOffset,\n int maxSize, long maxSizeBytes, PhoenixConnection connection)",
"identifier": "MutationState",
"modifiers": "public",
"parameters": "(TableRef table, MultiRowMutationState mutations, long sizeOffset,\n int maxSize, long maxSizeBytes, PhoenixConnection connection)",
"return": "",
"signature": " MutationState(TableRef table, MultiRowMutationState mutations, long sizeOffset,\n int maxSize, long maxSizeBytes, PhoenixConnection connection)",
"testcase": false
},
{
"class_method_signature": "MutationState.getEstimatedSize()",
"constructor": false,
"full_signature": "public long getEstimatedSize()",
"identifier": "getEstimatedSize",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long getEstimatedSize()",
"testcase": false
},
{
"class_method_signature": "MutationState.getMaxSize()",
"constructor": false,
"full_signature": "public int getMaxSize()",
"identifier": "getMaxSize",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getMaxSize()",
"testcase": false
},
{
"class_method_signature": "MutationState.getMaxSizeBytes()",
"constructor": false,
"full_signature": "public long getMaxSizeBytes()",
"identifier": "getMaxSizeBytes",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long getMaxSizeBytes()",
"testcase": false
},
{
"class_method_signature": "MutationState.getPhoenixTransactionContext()",
"constructor": false,
"full_signature": "public PhoenixTransactionContext getPhoenixTransactionContext()",
"identifier": "getPhoenixTransactionContext",
"modifiers": "public",
"parameters": "()",
"return": "PhoenixTransactionContext",
"signature": "PhoenixTransactionContext getPhoenixTransactionContext()",
"testcase": false
},
{
"class_method_signature": "MutationState.commitDDLFence(PTable dataTable)",
"constructor": false,
"full_signature": "public void commitDDLFence(PTable dataTable)",
"identifier": "commitDDLFence",
"modifiers": "public",
"parameters": "(PTable dataTable)",
"return": "void",
"signature": "void commitDDLFence(PTable dataTable)",
"testcase": false
},
{
"class_method_signature": "MutationState.checkpointIfNeccessary(MutationPlan plan)",
"constructor": false,
"full_signature": "public boolean checkpointIfNeccessary(MutationPlan plan)",
"identifier": "checkpointIfNeccessary",
"modifiers": "public",
"parameters": "(MutationPlan plan)",
"return": "boolean",
"signature": "boolean checkpointIfNeccessary(MutationPlan plan)",
"testcase": false
},
{
"class_method_signature": "MutationState.getHTable(PTable table)",
"constructor": false,
"full_signature": "public Table getHTable(PTable table)",
"identifier": "getHTable",
"modifiers": "public",
"parameters": "(PTable table)",
"return": "Table",
"signature": "Table getHTable(PTable table)",
"testcase": false
},
{
"class_method_signature": "MutationState.getConnection()",
"constructor": false,
"full_signature": "public PhoenixConnection getConnection()",
"identifier": "getConnection",
"modifiers": "public",
"parameters": "()",
"return": "PhoenixConnection",
"signature": "PhoenixConnection getConnection()",
"testcase": false
},
{
"class_method_signature": "MutationState.isTransactionStarted()",
"constructor": false,
"full_signature": "public boolean isTransactionStarted()",
"identifier": "isTransactionStarted",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isTransactionStarted()",
"testcase": false
},
{
"class_method_signature": "MutationState.getInitialWritePointer()",
"constructor": false,
"full_signature": "public long getInitialWritePointer()",
"identifier": "getInitialWritePointer",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long getInitialWritePointer()",
"testcase": false
},
{
"class_method_signature": "MutationState.getWritePointer()",
"constructor": false,
"full_signature": "public long getWritePointer()",
"identifier": "getWritePointer",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long getWritePointer()",
"testcase": false
},
{
"class_method_signature": "MutationState.getVisibilityLevel()",
"constructor": false,
"full_signature": "public PhoenixVisibilityLevel getVisibilityLevel()",
"identifier": "getVisibilityLevel",
"modifiers": "public",
"parameters": "()",
"return": "PhoenixVisibilityLevel",
"signature": "PhoenixVisibilityLevel getVisibilityLevel()",
"testcase": false
},
{
"class_method_signature": "MutationState.startTransaction(Provider provider)",
"constructor": false,
"full_signature": "public boolean startTransaction(Provider provider)",
"identifier": "startTransaction",
"modifiers": "public",
"parameters": "(Provider provider)",
"return": "boolean",
"signature": "boolean startTransaction(Provider provider)",
"testcase": false
},
{
"class_method_signature": "MutationState.emptyMutationState(int maxSize, long maxSizeBytes,\n PhoenixConnection connection)",
"constructor": false,
"full_signature": "public static MutationState emptyMutationState(int maxSize, long maxSizeBytes,\n PhoenixConnection connection)",
"identifier": "emptyMutationState",
"modifiers": "public static",
"parameters": "(int maxSize, long maxSizeBytes,\n PhoenixConnection connection)",
"return": "MutationState",
"signature": "MutationState emptyMutationState(int maxSize, long maxSizeBytes,\n PhoenixConnection connection)",
"testcase": false
},
{
"class_method_signature": "MutationState.throwIfTooBig()",
"constructor": false,
"full_signature": "private void throwIfTooBig()",
"identifier": "throwIfTooBig",
"modifiers": "private",
"parameters": "()",
"return": "void",
"signature": "void throwIfTooBig()",
"testcase": false
},
{
"class_method_signature": "MutationState.getUpdateCount()",
"constructor": false,
"full_signature": "public long getUpdateCount()",
"identifier": "getUpdateCount",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long getUpdateCount()",
"testcase": false
},
{
"class_method_signature": "MutationState.getNumRows()",
"constructor": false,
"full_signature": "public int getNumRows()",
"identifier": "getNumRows",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getNumRows()",
"testcase": false
},
{
"class_method_signature": "MutationState.joinMutationState(TableRef tableRef, MultiRowMutationState srcRows,\n Map<TableRef, MultiRowMutationState> dstMutations)",
"constructor": false,
"full_signature": "private void joinMutationState(TableRef tableRef, MultiRowMutationState srcRows,\n Map<TableRef, MultiRowMutationState> dstMutations)",
"identifier": "joinMutationState",
"modifiers": "private",
"parameters": "(TableRef tableRef, MultiRowMutationState srcRows,\n Map<TableRef, MultiRowMutationState> dstMutations)",
"return": "void",
"signature": "void joinMutationState(TableRef tableRef, MultiRowMutationState srcRows,\n Map<TableRef, MultiRowMutationState> dstMutations)",
"testcase": false
},
{
"class_method_signature": "MutationState.joinMutationState(Map<TableRef, MultiRowMutationState> srcMutations,\n Map<TableRef, MultiRowMutationState> dstMutations)",
"constructor": false,
"full_signature": "private void joinMutationState(Map<TableRef, MultiRowMutationState> srcMutations,\n Map<TableRef, MultiRowMutationState> dstMutations)",
"identifier": "joinMutationState",
"modifiers": "private",
"parameters": "(Map<TableRef, MultiRowMutationState> srcMutations,\n Map<TableRef, MultiRowMutationState> dstMutations)",
"return": "void",
"signature": "void joinMutationState(Map<TableRef, MultiRowMutationState> srcMutations,\n Map<TableRef, MultiRowMutationState> dstMutations)",
"testcase": false
},
{
"class_method_signature": "MutationState.join(MutationState newMutationState)",
"constructor": false,
"full_signature": "public void join(MutationState newMutationState)",
"identifier": "join",
"modifiers": "public",
"parameters": "(MutationState newMutationState)",
"return": "void",
"signature": "void join(MutationState newMutationState)",
"testcase": false
},
{
"class_method_signature": "MutationState.getNewRowKeyWithRowTimestamp(ImmutableBytesPtr ptr, long rowTimestamp, PTable table)",
"constructor": false,
"full_signature": "private static ImmutableBytesPtr getNewRowKeyWithRowTimestamp(ImmutableBytesPtr ptr, long rowTimestamp, PTable table)",
"identifier": "getNewRowKeyWithRowTimestamp",
"modifiers": "private static",
"parameters": "(ImmutableBytesPtr ptr, long rowTimestamp, PTable table)",
"return": "ImmutableBytesPtr",
"signature": "ImmutableBytesPtr getNewRowKeyWithRowTimestamp(ImmutableBytesPtr ptr, long rowTimestamp, PTable table)",
"testcase": false
},
{
"class_method_signature": "MutationState.addRowMutations(final TableRef tableRef,\n final MultiRowMutationState values, final long mutationTimestamp, final long serverTimestamp,\n boolean includeAllIndexes, final boolean sendAll)",
"constructor": false,
"full_signature": "private Iterator<Pair<PTable, List<Mutation>>> addRowMutations(final TableRef tableRef,\n final MultiRowMutationState values, final long mutationTimestamp, final long serverTimestamp,\n boolean includeAllIndexes, final boolean sendAll)",
"identifier": "addRowMutations",
"modifiers": "private",
"parameters": "(final TableRef tableRef,\n final MultiRowMutationState values, final long mutationTimestamp, final long serverTimestamp,\n boolean includeAllIndexes, final boolean sendAll)",
"return": "Iterator<Pair<PTable, List<Mutation>>>",
"signature": "Iterator<Pair<PTable, List<Mutation>>> addRowMutations(final TableRef tableRef,\n final MultiRowMutationState values, final long mutationTimestamp, final long serverTimestamp,\n boolean includeAllIndexes, final boolean sendAll)",
"testcase": false
},
{
"class_method_signature": "MutationState.generateMutations(final TableRef tableRef, final long mutationTimestamp, final long serverTimestamp,\n final MultiRowMutationState values, final List<Mutation> mutationList,\n final List<Mutation> mutationsPertainingToIndex)",
"constructor": false,
"full_signature": "private void generateMutations(final TableRef tableRef, final long mutationTimestamp, final long serverTimestamp,\n final MultiRowMutationState values, final List<Mutation> mutationList,\n final List<Mutation> mutationsPertainingToIndex)",
"identifier": "generateMutations",
"modifiers": "private",
"parameters": "(final TableRef tableRef, final long mutationTimestamp, final long serverTimestamp,\n final MultiRowMutationState values, final List<Mutation> mutationList,\n final List<Mutation> mutationsPertainingToIndex)",
"return": "void",
"signature": "void generateMutations(final TableRef tableRef, final long mutationTimestamp, final long serverTimestamp,\n final MultiRowMutationState values, final List<Mutation> mutationList,\n final List<Mutation> mutationsPertainingToIndex)",
"testcase": false
},
{
"class_method_signature": "MutationState.toMutations(Long timestamp)",
"constructor": false,
"full_signature": "public Iterator<Pair<byte[], List<Mutation>>> toMutations(Long timestamp)",
"identifier": "toMutations",
"modifiers": "public",
"parameters": "(Long timestamp)",
"return": "Iterator<Pair<byte[], List<Mutation>>>",
"signature": "Iterator<Pair<byte[], List<Mutation>>> toMutations(Long timestamp)",
"testcase": false
},
{
"class_method_signature": "MutationState.toMutations()",
"constructor": false,
"full_signature": "public Iterator<Pair<byte[], List<Mutation>>> toMutations()",
"identifier": "toMutations",
"modifiers": "public",
"parameters": "()",
"return": "Iterator<Pair<byte[], List<Mutation>>>",
"signature": "Iterator<Pair<byte[], List<Mutation>>> toMutations()",
"testcase": false
},
{
"class_method_signature": "MutationState.toMutations(final boolean includeMutableIndexes)",
"constructor": false,
"full_signature": "public Iterator<Pair<byte[], List<Mutation>>> toMutations(final boolean includeMutableIndexes)",
"identifier": "toMutations",
"modifiers": "public",
"parameters": "(final boolean includeMutableIndexes)",
"return": "Iterator<Pair<byte[], List<Mutation>>>",
"signature": "Iterator<Pair<byte[], List<Mutation>>> toMutations(final boolean includeMutableIndexes)",
"testcase": false
},
{
"class_method_signature": "MutationState.toMutations(final boolean includeMutableIndexes,\n final Long tableTimestamp)",
"constructor": false,
"full_signature": "public Iterator<Pair<byte[], List<Mutation>>> toMutations(final boolean includeMutableIndexes,\n final Long tableTimestamp)",
"identifier": "toMutations",
"modifiers": "public",
"parameters": "(final boolean includeMutableIndexes,\n final Long tableTimestamp)",
"return": "Iterator<Pair<byte[], List<Mutation>>>",
"signature": "Iterator<Pair<byte[], List<Mutation>>> toMutations(final boolean includeMutableIndexes,\n final Long tableTimestamp)",
"testcase": false
},
{
"class_method_signature": "MutationState.getTableTimestamp(final Long tableTimestamp, Long scn)",
"constructor": false,
"full_signature": "public static long getTableTimestamp(final Long tableTimestamp, Long scn)",
"identifier": "getTableTimestamp",
"modifiers": "public static",
"parameters": "(final Long tableTimestamp, Long scn)",
"return": "long",
"signature": "long getTableTimestamp(final Long tableTimestamp, Long scn)",
"testcase": false
},
{
"class_method_signature": "MutationState.getMutationTimestamp(final Long scn)",
"constructor": false,
"full_signature": "public static long getMutationTimestamp(final Long scn)",
"identifier": "getMutationTimestamp",
"modifiers": "public static",
"parameters": "(final Long scn)",
"return": "long",
"signature": "long getMutationTimestamp(final Long scn)",
"testcase": false
},
{
"class_method_signature": "MutationState.validateAll()",
"constructor": false,
"full_signature": "private long[] validateAll()",
"identifier": "validateAll",
"modifiers": "private",
"parameters": "()",
"return": "long[]",
"signature": "long[] validateAll()",
"testcase": false
},
{
"class_method_signature": "MutationState.validateAndGetServerTimestamp(TableRef tableRef, MultiRowMutationState rowKeyToColumnMap)",
"constructor": false,
"full_signature": "private long validateAndGetServerTimestamp(TableRef tableRef, MultiRowMutationState rowKeyToColumnMap)",
"identifier": "validateAndGetServerTimestamp",
"modifiers": "private",
"parameters": "(TableRef tableRef, MultiRowMutationState rowKeyToColumnMap)",
"return": "long",
"signature": "long validateAndGetServerTimestamp(TableRef tableRef, MultiRowMutationState rowKeyToColumnMap)",
"testcase": false
},
{
"class_method_signature": "MutationState.calculateMutationSize(List<Mutation> mutations)",
"constructor": false,
"full_signature": "private static long calculateMutationSize(List<Mutation> mutations)",
"identifier": "calculateMutationSize",
"modifiers": "private static",
"parameters": "(List<Mutation> mutations)",
"return": "long",
"signature": "long calculateMutationSize(List<Mutation> mutations)",
"testcase": false
},
{
"class_method_signature": "MutationState.getBatchSizeBytes()",
"constructor": false,
"full_signature": "public long getBatchSizeBytes()",
"identifier": "getBatchSizeBytes",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long getBatchSizeBytes()",
"testcase": false
},
{
"class_method_signature": "MutationState.getBatchCount()",
"constructor": false,
"full_signature": "public long getBatchCount()",
"identifier": "getBatchCount",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long getBatchCount()",
"testcase": false
},
{
"class_method_signature": "MutationState.send(Iterator<TableRef> tableRefIterator)",
"constructor": false,
"full_signature": "private void send(Iterator<TableRef> tableRefIterator)",
"identifier": "send",
"modifiers": "private",
"parameters": "(Iterator<TableRef> tableRefIterator)",
"return": "void",
"signature": "void send(Iterator<TableRef> tableRefIterator)",
"testcase": false
},
{
"class_method_signature": "MutationState.sendMutations(Iterator<Entry<TableInfo, List<Mutation>>> mutationsIterator, Span span, ImmutableBytesWritable indexMetaDataPtr, boolean isVerifiedPhase)",
"constructor": false,
"full_signature": "private void sendMutations(Iterator<Entry<TableInfo, List<Mutation>>> mutationsIterator, Span span, ImmutableBytesWritable indexMetaDataPtr, boolean isVerifiedPhase)",
"identifier": "sendMutations",
"modifiers": "private",
"parameters": "(Iterator<Entry<TableInfo, List<Mutation>>> mutationsIterator, Span span, ImmutableBytesWritable indexMetaDataPtr, boolean isVerifiedPhase)",
"return": "void",
"signature": "void sendMutations(Iterator<Entry<TableInfo, List<Mutation>>> mutationsIterator, Span span, ImmutableBytesWritable indexMetaDataPtr, boolean isVerifiedPhase)",
"testcase": false
},
{
"class_method_signature": "MutationState.filterIndexCheckerMutations(Map<TableInfo, List<Mutation>> mutationMap,\n Map<TableInfo, List<Mutation>> unverifiedIndexMutations,\n Map<TableInfo, List<Mutation>> verifiedOrDeletedIndexMutations)",
"constructor": false,
"full_signature": "private void filterIndexCheckerMutations(Map<TableInfo, List<Mutation>> mutationMap,\n Map<TableInfo, List<Mutation>> unverifiedIndexMutations,\n Map<TableInfo, List<Mutation>> verifiedOrDeletedIndexMutations)",
"identifier": "filterIndexCheckerMutations",
"modifiers": "private",
"parameters": "(Map<TableInfo, List<Mutation>> mutationMap,\n Map<TableInfo, List<Mutation>> unverifiedIndexMutations,\n Map<TableInfo, List<Mutation>> verifiedOrDeletedIndexMutations)",
"return": "void",
"signature": "void filterIndexCheckerMutations(Map<TableInfo, List<Mutation>> mutationMap,\n Map<TableInfo, List<Mutation>> unverifiedIndexMutations,\n Map<TableInfo, List<Mutation>> verifiedOrDeletedIndexMutations)",
"testcase": false
},
{
"class_method_signature": "MutationState.addToMap(Map<TableInfo, List<Mutation>> map, TableInfo tableInfo, Mutation mutation)",
"constructor": false,
"full_signature": "private void addToMap(Map<TableInfo, List<Mutation>> map, TableInfo tableInfo, Mutation mutation)",
"identifier": "addToMap",
"modifiers": "private",
"parameters": "(Map<TableInfo, List<Mutation>> map, TableInfo tableInfo, Mutation mutation)",
"return": "void",
"signature": "void addToMap(Map<TableInfo, List<Mutation>> map, TableInfo tableInfo, Mutation mutation)",
"testcase": false
},
{
"class_method_signature": "MutationState.getMutationBatchList(long batchSize, long batchSizeBytes, List<Mutation> allMutationList)",
"constructor": false,
"full_signature": "public static List<List<Mutation>> getMutationBatchList(long batchSize, long batchSizeBytes, List<Mutation> allMutationList)",
"identifier": "getMutationBatchList",
"modifiers": "public static",
"parameters": "(long batchSize, long batchSizeBytes, List<Mutation> allMutationList)",
"return": "List<List<Mutation>>",
"signature": "List<List<Mutation>> getMutationBatchList(long batchSize, long batchSizeBytes, List<Mutation> allMutationList)",
"testcase": false
},
{
"class_method_signature": "MutationState.encodeTransaction()",
"constructor": false,
"full_signature": "public byte[] encodeTransaction()",
"identifier": "encodeTransaction",
"modifiers": "public",
"parameters": "()",
"return": "byte[]",
"signature": "byte[] encodeTransaction()",
"testcase": false
},
{
"class_method_signature": "MutationState.addUncommittedStatementIndexes(Collection<RowMutationState> rowMutations)",
"constructor": false,
"full_signature": "private void addUncommittedStatementIndexes(Collection<RowMutationState> rowMutations)",
"identifier": "addUncommittedStatementIndexes",
"modifiers": "private",
"parameters": "(Collection<RowMutationState> rowMutations)",
"return": "void",
"signature": "void addUncommittedStatementIndexes(Collection<RowMutationState> rowMutations)",
"testcase": false
},
{
"class_method_signature": "MutationState.getUncommittedStatementIndexes()",
"constructor": false,
"full_signature": "private int[] getUncommittedStatementIndexes()",
"identifier": "getUncommittedStatementIndexes",
"modifiers": "private",
"parameters": "()",
"return": "int[]",
"signature": "int[] getUncommittedStatementIndexes()",
"testcase": false
},
{
"class_method_signature": "MutationState.close()",
"constructor": false,
"full_signature": "@Override public void close()",
"identifier": "close",
"modifiers": "@Override public",
"parameters": "()",
"return": "void",
"signature": "void close()",
"testcase": false
},
{
"class_method_signature": "MutationState.resetState()",
"constructor": false,
"full_signature": "private void resetState()",
"identifier": "resetState",
"modifiers": "private",
"parameters": "()",
"return": "void",
"signature": "void resetState()",
"testcase": false
},
{
"class_method_signature": "MutationState.resetTransactionalState()",
"constructor": false,
"full_signature": "private void resetTransactionalState()",
"identifier": "resetTransactionalState",
"modifiers": "private",
"parameters": "()",
"return": "void",
"signature": "void resetTransactionalState()",
"testcase": false
},
{
"class_method_signature": "MutationState.rollback()",
"constructor": false,
"full_signature": "public void rollback()",
"identifier": "rollback",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void rollback()",
"testcase": false
},
{
"class_method_signature": "MutationState.commit()",
"constructor": false,
"full_signature": "public void commit()",
"identifier": "commit",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void commit()",
"testcase": false
},
{
"class_method_signature": "MutationState.shouldResubmitTransaction(Set<TableRef> txTableRefs)",
"constructor": false,
"full_signature": "private boolean shouldResubmitTransaction(Set<TableRef> txTableRefs)",
"identifier": "shouldResubmitTransaction",
"modifiers": "private",
"parameters": "(Set<TableRef> txTableRefs)",
"return": "boolean",
"signature": "boolean shouldResubmitTransaction(Set<TableRef> txTableRefs)",
"testcase": false
},
{
"class_method_signature": "MutationState.sendUncommitted()",
"constructor": false,
"full_signature": "public boolean sendUncommitted()",
"identifier": "sendUncommitted",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean sendUncommitted()",
"testcase": false
},
{
"class_method_signature": "MutationState.sendUncommitted(Iterator<TableRef> tableRefs)",
"constructor": false,
"full_signature": "public boolean sendUncommitted(Iterator<TableRef> tableRefs)",
"identifier": "sendUncommitted",
"modifiers": "public",
"parameters": "(Iterator<TableRef> tableRefs)",
"return": "boolean",
"signature": "boolean sendUncommitted(Iterator<TableRef> tableRefs)",
"testcase": false
},
{
"class_method_signature": "MutationState.send()",
"constructor": false,
"full_signature": "public void send()",
"identifier": "send",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void send()",
"testcase": false
},
{
"class_method_signature": "MutationState.joinSortedIntArrays(int[] a, int[] b)",
"constructor": false,
"full_signature": "public static int[] joinSortedIntArrays(int[] a, int[] b)",
"identifier": "joinSortedIntArrays",
"modifiers": "public static",
"parameters": "(int[] a, int[] b)",
"return": "int[]",
"signature": "int[] joinSortedIntArrays(int[] a, int[] b)",
"testcase": false
},
{
"class_method_signature": "MutationState.getReadMetricQueue()",
"constructor": false,
"full_signature": "public ReadMetricQueue getReadMetricQueue()",
"identifier": "getReadMetricQueue",
"modifiers": "public",
"parameters": "()",
"return": "ReadMetricQueue",
"signature": "ReadMetricQueue getReadMetricQueue()",
"testcase": false
},
{
"class_method_signature": "MutationState.setReadMetricQueue(ReadMetricQueue readMetricQueue)",
"constructor": false,
"full_signature": "public void setReadMetricQueue(ReadMetricQueue readMetricQueue)",
"identifier": "setReadMetricQueue",
"modifiers": "public",
"parameters": "(ReadMetricQueue readMetricQueue)",
"return": "void",
"signature": "void setReadMetricQueue(ReadMetricQueue readMetricQueue)",
"testcase": false
},
{
"class_method_signature": "MutationState.getMutationMetricQueue()",
"constructor": false,
"full_signature": "public MutationMetricQueue getMutationMetricQueue()",
"identifier": "getMutationMetricQueue",
"modifiers": "public",
"parameters": "()",
"return": "MutationMetricQueue",
"signature": "MutationMetricQueue getMutationMetricQueue()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static int[] joinSortedIntArrays(int[] a, int[] b) {\n int[] result = new int[a.length + b.length];\n int i = 0, j = 0, k = 0, current;\n while (i < a.length && j < b.length) {\n current = a[i] < b[j] ? a[i++] : b[j++];\n for (; i < a.length && a[i] == current; i++)\n ;\n for (; j < b.length && b[j] == current; j++)\n ;\n result[k++] = current;\n }\n while (i < a.length) {\n for (current = a[i++]; i < a.length && a[i] == current; i++)\n ;\n result[k++] = current;\n }\n while (j < b.length) {\n for (current = b[j++]; j < b.length && b[j] == current; j++)\n ;\n result[k++] = current;\n }\n return Arrays.copyOf(result, k);\n }",
"class_method_signature": "MutationState.joinSortedIntArrays(int[] a, int[] b)",
"constructor": false,
"full_signature": "public static int[] joinSortedIntArrays(int[] a, int[] b)",
"identifier": "joinSortedIntArrays",
"invocations": [
"copyOf"
],
"modifiers": "public static",
"parameters": "(int[] a, int[] b)",
"return": "int[]",
"signature": "int[] joinSortedIntArrays(int[] a, int[] b)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_9 | {
"fields": [
{
"declarator": "exit = ExpectedSystemExit.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedSystemExit exit = ExpectedSystemExit.none();",
"type": "ExpectedSystemExit",
"var_name": "exit"
}
],
"file": "phoenix-pherf/src/test/java/org/apache/phoenix/pherf/PherfTest.java",
"identifier": "PherfTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCustomizedLogPerNRowsArgument() throws Exception {\n Long customizedPerNRows = 15l;\n String[] args = {\"-listFiles\", \"-log_per_nrows\", customizedPerNRows.toString()};\n assertEquals(customizedPerNRows,\n getLogPerNRowsValue(new Pherf(args).getProperties()));\n }",
"class_method_signature": "PherfTest.testCustomizedLogPerNRowsArgument()",
"constructor": false,
"full_signature": "@Test public void testCustomizedLogPerNRowsArgument()",
"identifier": "testCustomizedLogPerNRowsArgument",
"invocations": [
"toString",
"assertEquals",
"getLogPerNRowsValue",
"getProperties"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCustomizedLogPerNRowsArgument()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(Pherf.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Pherf.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "options = new Options()",
"modifier": "private static final",
"original_string": "private static final Options options = new Options();",
"type": "Options",
"var_name": "options"
},
{
"declarator": "phoenixUtil = PhoenixUtil.create()",
"modifier": "private final",
"original_string": "private final PhoenixUtil phoenixUtil = PhoenixUtil.create();",
"type": "PhoenixUtil",
"var_name": "phoenixUtil"
},
{
"declarator": "zookeeper",
"modifier": "private final",
"original_string": "private final String zookeeper;",
"type": "String",
"var_name": "zookeeper"
},
{
"declarator": "scenarioFile",
"modifier": "private final",
"original_string": "private final String scenarioFile;",
"type": "String",
"var_name": "scenarioFile"
},
{
"declarator": "schemaFile",
"modifier": "private final",
"original_string": "private final String schemaFile;",
"type": "String",
"var_name": "schemaFile"
},
{
"declarator": "queryHint",
"modifier": "private final",
"original_string": "private final String queryHint;",
"type": "String",
"var_name": "queryHint"
},
{
"declarator": "properties",
"modifier": "private final",
"original_string": "private final Properties properties;",
"type": "Properties",
"var_name": "properties"
},
{
"declarator": "preLoadData",
"modifier": "private final",
"original_string": "private final boolean preLoadData;",
"type": "boolean",
"var_name": "preLoadData"
},
{
"declarator": "dropPherfTablesRegEx",
"modifier": "private final",
"original_string": "private final String dropPherfTablesRegEx;",
"type": "String",
"var_name": "dropPherfTablesRegEx"
},
{
"declarator": "executeQuerySets",
"modifier": "private final",
"original_string": "private final boolean executeQuerySets;",
"type": "boolean",
"var_name": "executeQuerySets"
},
{
"declarator": "isFunctional",
"modifier": "private final",
"original_string": "private final boolean isFunctional;",
"type": "boolean",
"var_name": "isFunctional"
},
{
"declarator": "monitor",
"modifier": "private final",
"original_string": "private final boolean monitor;",
"type": "boolean",
"var_name": "monitor"
},
{
"declarator": "rowCountOverride",
"modifier": "private final",
"original_string": "private final int rowCountOverride;",
"type": "int",
"var_name": "rowCountOverride"
},
{
"declarator": "listFiles",
"modifier": "private final",
"original_string": "private final boolean listFiles;",
"type": "boolean",
"var_name": "listFiles"
},
{
"declarator": "applySchema",
"modifier": "private final",
"original_string": "private final boolean applySchema;",
"type": "boolean",
"var_name": "applySchema"
},
{
"declarator": "writeRuntimeResults",
"modifier": "private final",
"original_string": "private final boolean writeRuntimeResults;",
"type": "boolean",
"var_name": "writeRuntimeResults"
},
{
"declarator": "generateStatistics",
"modifier": "private final",
"original_string": "private final GeneratePhoenixStats generateStatistics;",
"type": "GeneratePhoenixStats",
"var_name": "generateStatistics"
},
{
"declarator": "label",
"modifier": "private final",
"original_string": "private final String label;",
"type": "String",
"var_name": "label"
},
{
"declarator": "compareResults",
"modifier": "private final",
"original_string": "private final String compareResults;",
"type": "String",
"var_name": "compareResults"
},
{
"declarator": "compareType",
"modifier": "private final",
"original_string": "private final CompareType compareType;",
"type": "CompareType",
"var_name": "compareType"
},
{
"declarator": "thinDriver",
"modifier": "private final",
"original_string": "private final boolean thinDriver;",
"type": "boolean",
"var_name": "thinDriver"
},
{
"declarator": "queryServerUrl",
"modifier": "private final",
"original_string": "private final String queryServerUrl;",
"type": "String",
"var_name": "queryServerUrl"
},
{
"declarator": "workloadExecutor",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n WorkloadExecutor workloadExecutor;",
"type": "WorkloadExecutor",
"var_name": "workloadExecutor"
}
],
"file": "phoenix-pherf/src/main/java/org/apache/phoenix/pherf/Pherf.java",
"identifier": "Pherf",
"interfaces": "",
"methods": [
{
"class_method_signature": "Pherf.Pherf(String[] args)",
"constructor": true,
"full_signature": "public Pherf(String[] args)",
"identifier": "Pherf",
"modifiers": "public",
"parameters": "(String[] args)",
"return": "",
"signature": " Pherf(String[] args)",
"testcase": false
},
{
"class_method_signature": "Pherf.getLogPerNRow(CommandLine command)",
"constructor": false,
"full_signature": "private String getLogPerNRow(CommandLine command)",
"identifier": "getLogPerNRow",
"modifiers": "private",
"parameters": "(CommandLine command)",
"return": "String",
"signature": "String getLogPerNRow(CommandLine command)",
"testcase": false
},
{
"class_method_signature": "Pherf.getProperties()",
"constructor": false,
"full_signature": "public Properties getProperties()",
"identifier": "getProperties",
"modifiers": "public",
"parameters": "()",
"return": "Properties",
"signature": "Properties getProperties()",
"testcase": false
},
{
"class_method_signature": "Pherf.main(String[] args)",
"constructor": false,
"full_signature": "public static void main(String[] args)",
"identifier": "main",
"modifiers": "public static",
"parameters": "(String[] args)",
"return": "void",
"signature": "void main(String[] args)",
"testcase": false
},
{
"class_method_signature": "Pherf.run()",
"constructor": false,
"full_signature": "public void run()",
"identifier": "run",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void run()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public Properties getProperties() {\n return this.properties;\n }",
"class_method_signature": "Pherf.getProperties()",
"constructor": false,
"full_signature": "public Properties getProperties()",
"identifier": "getProperties",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "Properties",
"signature": "Properties getProperties()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_178 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/schema/types/PDataTypeTest.java",
"identifier": "PDataTypeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIllegalUnsignedDateTime() {\n Date date1 = new Date(-1000);\n try {\n PUnsignedDate.INSTANCE.toBytes(date1);\n fail();\n } catch (RuntimeException e) {\n assertTrue(e.getCause() instanceof SQLException);\n SQLException sqlE = (SQLException)e.getCause();\n assertEquals(SQLExceptionCode.ILLEGAL_DATA.getErrorCode(), sqlE.getErrorCode());\n }\n }",
"class_method_signature": "PDataTypeTest.testIllegalUnsignedDateTime()",
"constructor": false,
"full_signature": "@Test public void testIllegalUnsignedDateTime()",
"identifier": "testIllegalUnsignedDateTime",
"invocations": [
"toBytes",
"fail",
"assertTrue",
"getCause",
"getCause",
"assertEquals",
"getErrorCode",
"getErrorCode"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testIllegalUnsignedDateTime()",
"testcase": true
} | {
"fields": [
{
"declarator": "sqlTypeName",
"modifier": "private final",
"original_string": "private final String sqlTypeName;",
"type": "String",
"var_name": "sqlTypeName"
},
{
"declarator": "sqlType",
"modifier": "private final",
"original_string": "private final int sqlType;",
"type": "int",
"var_name": "sqlType"
},
{
"declarator": "clazz",
"modifier": "private final",
"original_string": "private final Class clazz;",
"type": "Class",
"var_name": "clazz"
},
{
"declarator": "clazzNameBytes",
"modifier": "private final",
"original_string": "private final byte[] clazzNameBytes;",
"type": "byte[]",
"var_name": "clazzNameBytes"
},
{
"declarator": "sqlTypeNameBytes",
"modifier": "private final",
"original_string": "private final byte[] sqlTypeNameBytes;",
"type": "byte[]",
"var_name": "sqlTypeNameBytes"
},
{
"declarator": "codec",
"modifier": "private final",
"original_string": "private final PDataCodec codec;",
"type": "PDataCodec",
"var_name": "codec"
},
{
"declarator": "ordinal",
"modifier": "private final",
"original_string": "private final int ordinal;",
"type": "int",
"var_name": "ordinal"
},
{
"declarator": "MAX_PRECISION = 38",
"modifier": "public static final",
"original_string": "public static final int MAX_PRECISION = 38;",
"type": "int",
"var_name": "MAX_PRECISION"
},
{
"declarator": "MIN_DECIMAL_AVG_SCALE = 4",
"modifier": "public static final",
"original_string": "public static final int MIN_DECIMAL_AVG_SCALE = 4;",
"type": "int",
"var_name": "MIN_DECIMAL_AVG_SCALE"
},
{
"declarator": "DEFAULT_MATH_CONTEXT = new MathContext(MAX_PRECISION, RoundingMode.HALF_UP)",
"modifier": "public static final",
"original_string": "public static final MathContext DEFAULT_MATH_CONTEXT = new MathContext(MAX_PRECISION, RoundingMode.HALF_UP);",
"type": "MathContext",
"var_name": "DEFAULT_MATH_CONTEXT"
},
{
"declarator": "DEFAULT_SCALE = 0",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_SCALE = 0;",
"type": "int",
"var_name": "DEFAULT_SCALE"
},
{
"declarator": "MAX_BIG_DECIMAL_BYTES = 21",
"modifier": "protected static final",
"original_string": "protected static final Integer MAX_BIG_DECIMAL_BYTES = 21;",
"type": "Integer",
"var_name": "MAX_BIG_DECIMAL_BYTES"
},
{
"declarator": "MAX_TIMESTAMP_BYTES = Bytes.SIZEOF_LONG + Bytes.SIZEOF_INT",
"modifier": "protected static final",
"original_string": "protected static final Integer MAX_TIMESTAMP_BYTES = Bytes.SIZEOF_LONG + Bytes.SIZEOF_INT;",
"type": "Integer",
"var_name": "MAX_TIMESTAMP_BYTES"
},
{
"declarator": "ZERO_BYTE = (byte)0x80",
"modifier": "protected static final",
"original_string": "protected static final byte ZERO_BYTE = (byte)0x80;",
"type": "byte",
"var_name": "ZERO_BYTE"
},
{
"declarator": "NEG_TERMINAL_BYTE = (byte)102",
"modifier": "protected static final",
"original_string": "protected static final byte NEG_TERMINAL_BYTE = (byte)102;",
"type": "byte",
"var_name": "NEG_TERMINAL_BYTE"
},
{
"declarator": "EXP_BYTE_OFFSET = 65",
"modifier": "protected static final",
"original_string": "protected static final int EXP_BYTE_OFFSET = 65;",
"type": "int",
"var_name": "EXP_BYTE_OFFSET"
},
{
"declarator": "POS_DIGIT_OFFSET = 1",
"modifier": "protected static final",
"original_string": "protected static final int POS_DIGIT_OFFSET = 1;",
"type": "int",
"var_name": "POS_DIGIT_OFFSET"
},
{
"declarator": "NEG_DIGIT_OFFSET = 101",
"modifier": "protected static final",
"original_string": "protected static final int NEG_DIGIT_OFFSET = 101;",
"type": "int",
"var_name": "NEG_DIGIT_OFFSET"
},
{
"declarator": "MAX_LONG = BigInteger.valueOf(Long.MAX_VALUE)",
"modifier": "protected static final",
"original_string": "protected static final BigInteger MAX_LONG = BigInteger.valueOf(Long.MAX_VALUE);",
"type": "BigInteger",
"var_name": "MAX_LONG"
},
{
"declarator": "MIN_LONG = BigInteger.valueOf(Long.MIN_VALUE)",
"modifier": "protected static final",
"original_string": "protected static final BigInteger MIN_LONG = BigInteger.valueOf(Long.MIN_VALUE);",
"type": "BigInteger",
"var_name": "MIN_LONG"
},
{
"declarator": "MAX_LONG_FOR_DESERIALIZE = Long.MAX_VALUE / 1000",
"modifier": "protected static final",
"original_string": "protected static final long MAX_LONG_FOR_DESERIALIZE = Long.MAX_VALUE / 1000;",
"type": "long",
"var_name": "MAX_LONG_FOR_DESERIALIZE"
},
{
"declarator": "ONE_HUNDRED = BigInteger.valueOf(100)",
"modifier": "protected static final",
"original_string": "protected static final BigInteger ONE_HUNDRED = BigInteger.valueOf(100);",
"type": "BigInteger",
"var_name": "ONE_HUNDRED"
},
{
"declarator": "FALSE_BYTE = 0",
"modifier": "protected static final",
"original_string": "protected static final byte FALSE_BYTE = 0;",
"type": "byte",
"var_name": "FALSE_BYTE"
},
{
"declarator": "TRUE_BYTE = 1",
"modifier": "protected static final",
"original_string": "protected static final byte TRUE_BYTE = 1;",
"type": "byte",
"var_name": "TRUE_BYTE"
},
{
"declarator": "FALSE_BYTES = new byte[] { FALSE_BYTE }",
"modifier": "public static final",
"original_string": "public static final byte[] FALSE_BYTES = new byte[] { FALSE_BYTE };",
"type": "byte[]",
"var_name": "FALSE_BYTES"
},
{
"declarator": "TRUE_BYTES = new byte[] { TRUE_BYTE }",
"modifier": "public static final",
"original_string": "public static final byte[] TRUE_BYTES = new byte[] { TRUE_BYTE };",
"type": "byte[]",
"var_name": "TRUE_BYTES"
},
{
"declarator": "NULL_BYTES = ByteUtil.EMPTY_BYTE_ARRAY",
"modifier": "public static final",
"original_string": "public static final byte[] NULL_BYTES = ByteUtil.EMPTY_BYTE_ARRAY;",
"type": "byte[]",
"var_name": "NULL_BYTES"
},
{
"declarator": "BOOLEAN_LENGTH = 1",
"modifier": "protected static final",
"original_string": "protected static final Integer BOOLEAN_LENGTH = 1;",
"type": "Integer",
"var_name": "BOOLEAN_LENGTH"
},
{
"declarator": "ZERO = 0",
"modifier": "public final static",
"original_string": "public final static Integer ZERO = 0;",
"type": "Integer",
"var_name": "ZERO"
},
{
"declarator": "INT_PRECISION = 10",
"modifier": "public final static",
"original_string": "public final static Integer INT_PRECISION = 10;",
"type": "Integer",
"var_name": "INT_PRECISION"
},
{
"declarator": "LONG_PRECISION = 19",
"modifier": "public final static",
"original_string": "public final static Integer LONG_PRECISION = 19;",
"type": "Integer",
"var_name": "LONG_PRECISION"
},
{
"declarator": "SHORT_PRECISION = 5",
"modifier": "public final static",
"original_string": "public final static Integer SHORT_PRECISION = 5;",
"type": "Integer",
"var_name": "SHORT_PRECISION"
},
{
"declarator": "BYTE_PRECISION = 3",
"modifier": "public final static",
"original_string": "public final static Integer BYTE_PRECISION = 3;",
"type": "Integer",
"var_name": "BYTE_PRECISION"
},
{
"declarator": "DOUBLE_PRECISION = 15",
"modifier": "public final static",
"original_string": "public final static Integer DOUBLE_PRECISION = 15;",
"type": "Integer",
"var_name": "DOUBLE_PRECISION"
},
{
"declarator": "ARRAY_TYPE_BASE = 3000",
"modifier": "public static final",
"original_string": "public static final int ARRAY_TYPE_BASE = 3000;",
"type": "int",
"var_name": "ARRAY_TYPE_BASE"
},
{
"declarator": "ARRAY_TYPE_SUFFIX = \"ARRAY\"",
"modifier": "public static final",
"original_string": "public static final String ARRAY_TYPE_SUFFIX = \"ARRAY\";",
"type": "String",
"var_name": "ARRAY_TYPE_SUFFIX"
},
{
"declarator": "RANDOM = new ThreadLocal<Random>() {\n @Override\n protected Random initialValue() {\n return new Random();\n }\n }",
"modifier": "protected static final",
"original_string": "protected static final ThreadLocal<Random> RANDOM = new ThreadLocal<Random>() {\n @Override\n protected Random initialValue() {\n return new Random();\n }\n };",
"type": "ThreadLocal<Random>",
"var_name": "RANDOM"
},
{
"declarator": "DEFAULT_ARRAY_FACTORY = new PhoenixArrayFactory() {\n @Override\n public PhoenixArray newArray(PDataType type, Object[] elements) {\n return new PhoenixArray(type, elements);\n }\n }",
"modifier": "private static final",
"original_string": "private static final PhoenixArrayFactory DEFAULT_ARRAY_FACTORY = new PhoenixArrayFactory() {\n @Override\n public PhoenixArray newArray(PDataType type, Object[] elements) {\n return new PhoenixArray(type, elements);\n }\n };",
"type": "PhoenixArrayFactory",
"var_name": "DEFAULT_ARRAY_FACTORY"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/schema/types/PDataType.java",
"identifier": "PDataType",
"interfaces": "implements DataType<T>, Comparable<PDataType<?>>",
"methods": [
{
"class_method_signature": "PDataType.PDataType(String sqlTypeName, int sqlType, Class clazz, PDataCodec codec, int ordinal)",
"constructor": true,
"full_signature": "protected PDataType(String sqlTypeName, int sqlType, Class clazz, PDataCodec codec, int ordinal)",
"identifier": "PDataType",
"modifiers": "protected",
"parameters": "(String sqlTypeName, int sqlType, Class clazz, PDataCodec codec, int ordinal)",
"return": "",
"signature": " PDataType(String sqlTypeName, int sqlType, Class clazz, PDataCodec codec, int ordinal)",
"testcase": false
},
{
"class_method_signature": "PDataType.values()",
"constructor": false,
"full_signature": "public static PDataType[] values()",
"identifier": "values",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType[]",
"signature": "PDataType[] values()",
"testcase": false
},
{
"class_method_signature": "PDataType.ordinal()",
"constructor": false,
"full_signature": "public int ordinal()",
"identifier": "ordinal",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int ordinal()",
"testcase": false
},
{
"class_method_signature": "PDataType.encodedClass()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") @Override public Class<T> encodedClass()",
"identifier": "encodedClass",
"modifiers": "@SuppressWarnings(\"unchecked\") @Override public",
"parameters": "()",
"return": "Class<T>",
"signature": "Class<T> encodedClass()",
"testcase": false
},
{
"class_method_signature": "PDataType.isCastableTo(PDataType targetType)",
"constructor": false,
"full_signature": "public boolean isCastableTo(PDataType targetType)",
"identifier": "isCastableTo",
"modifiers": "public",
"parameters": "(PDataType targetType)",
"return": "boolean",
"signature": "boolean isCastableTo(PDataType targetType)",
"testcase": false
},
{
"class_method_signature": "PDataType.getCodec()",
"constructor": false,
"full_signature": "public final PDataCodec getCodec()",
"identifier": "getCodec",
"modifiers": "public final",
"parameters": "()",
"return": "PDataCodec",
"signature": "PDataCodec getCodec()",
"testcase": false
},
{
"class_method_signature": "PDataType.isBytesComparableWith(PDataType otherType)",
"constructor": false,
"full_signature": "public boolean isBytesComparableWith(PDataType otherType)",
"identifier": "isBytesComparableWith",
"modifiers": "public",
"parameters": "(PDataType otherType)",
"return": "boolean",
"signature": "boolean isBytesComparableWith(PDataType otherType)",
"testcase": false
},
{
"class_method_signature": "PDataType.estimateByteSize(Object o)",
"constructor": false,
"full_signature": "public int estimateByteSize(Object o)",
"identifier": "estimateByteSize",
"modifiers": "public",
"parameters": "(Object o)",
"return": "int",
"signature": "int estimateByteSize(Object o)",
"testcase": false
},
{
"class_method_signature": "PDataType.getMaxLength(Object o)",
"constructor": false,
"full_signature": "public Integer getMaxLength(Object o)",
"identifier": "getMaxLength",
"modifiers": "public",
"parameters": "(Object o)",
"return": "Integer",
"signature": "Integer getMaxLength(Object o)",
"testcase": false
},
{
"class_method_signature": "PDataType.getScale(Object o)",
"constructor": false,
"full_signature": "public Integer getScale(Object o)",
"identifier": "getScale",
"modifiers": "public",
"parameters": "(Object o)",
"return": "Integer",
"signature": "Integer getScale(Object o)",
"testcase": false
},
{
"class_method_signature": "PDataType.estimateByteSizeFromLength(Integer length)",
"constructor": false,
"full_signature": "public Integer estimateByteSizeFromLength(Integer length)",
"identifier": "estimateByteSizeFromLength",
"modifiers": "public",
"parameters": "(Integer length)",
"return": "Integer",
"signature": "Integer estimateByteSizeFromLength(Integer length)",
"testcase": false
},
{
"class_method_signature": "PDataType.getSqlTypeName()",
"constructor": false,
"full_signature": "public final String getSqlTypeName()",
"identifier": "getSqlTypeName",
"modifiers": "public final",
"parameters": "()",
"return": "String",
"signature": "String getSqlTypeName()",
"testcase": false
},
{
"class_method_signature": "PDataType.getSqlType()",
"constructor": false,
"full_signature": "public final int getSqlType()",
"identifier": "getSqlType",
"modifiers": "public final",
"parameters": "()",
"return": "int",
"signature": "int getSqlType()",
"testcase": false
},
{
"class_method_signature": "PDataType.getJavaClass()",
"constructor": false,
"full_signature": "public final Class getJavaClass()",
"identifier": "getJavaClass",
"modifiers": "public final",
"parameters": "()",
"return": "Class",
"signature": "Class getJavaClass()",
"testcase": false
},
{
"class_method_signature": "PDataType.isArrayType()",
"constructor": false,
"full_signature": "public boolean isArrayType()",
"identifier": "isArrayType",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isArrayType()",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"constructor": false,
"full_signature": "public final int compareTo(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"identifier": "compareTo",
"modifiers": "public final",
"parameters": "(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"return": "int",
"signature": "int compareTo(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType)",
"testcase": false
},
{
"class_method_signature": "PDataType.isDoubleOrFloat(PDataType type)",
"constructor": false,
"full_signature": "public static boolean isDoubleOrFloat(PDataType type)",
"identifier": "isDoubleOrFloat",
"modifiers": "public static",
"parameters": "(PDataType type)",
"return": "boolean",
"signature": "boolean isDoubleOrFloat(PDataType type)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareFloatToLong(float f, long l)",
"constructor": false,
"full_signature": "private static int compareFloatToLong(float f, long l)",
"identifier": "compareFloatToLong",
"modifiers": "private static",
"parameters": "(float f, long l)",
"return": "int",
"signature": "int compareFloatToLong(float f, long l)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareDoubleToLong(double d, long l)",
"constructor": false,
"full_signature": "private static int compareDoubleToLong(double d, long l)",
"identifier": "compareDoubleToLong",
"modifiers": "private static",
"parameters": "(double d, long l)",
"return": "int",
"signature": "int compareDoubleToLong(double d, long l)",
"testcase": false
},
{
"class_method_signature": "PDataType.checkForSufficientLength(byte[] b, int offset, int requiredLength)",
"constructor": false,
"full_signature": "protected static void checkForSufficientLength(byte[] b, int offset, int requiredLength)",
"identifier": "checkForSufficientLength",
"modifiers": "protected static",
"parameters": "(byte[] b, int offset, int requiredLength)",
"return": "void",
"signature": "void checkForSufficientLength(byte[] b, int offset, int requiredLength)",
"testcase": false
},
{
"class_method_signature": "PDataType.throwConstraintViolationException(PDataType source, PDataType target)",
"constructor": false,
"full_signature": "protected static Void throwConstraintViolationException(PDataType source, PDataType target)",
"identifier": "throwConstraintViolationException",
"modifiers": "protected static",
"parameters": "(PDataType source, PDataType target)",
"return": "Void",
"signature": "Void throwConstraintViolationException(PDataType source, PDataType target)",
"testcase": false
},
{
"class_method_signature": "PDataType.newIllegalDataException()",
"constructor": false,
"full_signature": "protected static RuntimeException newIllegalDataException()",
"identifier": "newIllegalDataException",
"modifiers": "protected static",
"parameters": "()",
"return": "RuntimeException",
"signature": "RuntimeException newIllegalDataException()",
"testcase": false
},
{
"class_method_signature": "PDataType.newIllegalDataException(String msg)",
"constructor": false,
"full_signature": "protected static RuntimeException newIllegalDataException(String msg)",
"identifier": "newIllegalDataException",
"modifiers": "protected static",
"parameters": "(String msg)",
"return": "RuntimeException",
"signature": "RuntimeException newIllegalDataException(String msg)",
"testcase": false
},
{
"class_method_signature": "PDataType.newIllegalDataException(Exception e)",
"constructor": false,
"full_signature": "protected static RuntimeException newIllegalDataException(Exception e)",
"identifier": "newIllegalDataException",
"modifiers": "protected static",
"parameters": "(Exception e)",
"return": "RuntimeException",
"signature": "RuntimeException newIllegalDataException(Exception e)",
"testcase": false
},
{
"class_method_signature": "PDataType.equals(Object o)",
"constructor": false,
"full_signature": "@Override public boolean equals(Object o)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(Object o)",
"return": "boolean",
"signature": "boolean equals(Object o)",
"testcase": false
},
{
"class_method_signature": "PDataType.equalsAny(PDataType lhs, PDataType... rhs)",
"constructor": false,
"full_signature": "public static boolean equalsAny(PDataType lhs, PDataType... rhs)",
"identifier": "equalsAny",
"modifiers": "public static",
"parameters": "(PDataType lhs, PDataType... rhs)",
"return": "boolean",
"signature": "boolean equalsAny(PDataType lhs, PDataType... rhs)",
"testcase": false
},
{
"class_method_signature": "PDataType.toBytes(BigDecimal v, byte[] result, final int offset, int length)",
"constructor": false,
"full_signature": "protected static int toBytes(BigDecimal v, byte[] result, final int offset, int length)",
"identifier": "toBytes",
"modifiers": "protected static",
"parameters": "(BigDecimal v, byte[] result, final int offset, int length)",
"return": "int",
"signature": "int toBytes(BigDecimal v, byte[] result, final int offset, int length)",
"testcase": false
},
{
"class_method_signature": "PDataType.toBigDecimal(byte[] bytes, int offset, int length)",
"constructor": false,
"full_signature": "protected static BigDecimal toBigDecimal(byte[] bytes, int offset, int length)",
"identifier": "toBigDecimal",
"modifiers": "protected static",
"parameters": "(byte[] bytes, int offset, int length)",
"return": "BigDecimal",
"signature": "BigDecimal toBigDecimal(byte[] bytes, int offset, int length)",
"testcase": false
},
{
"class_method_signature": "PDataType.getDecimalPrecisionAndScale(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"constructor": false,
"full_signature": "protected static int[] getDecimalPrecisionAndScale(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"identifier": "getDecimalPrecisionAndScale",
"modifiers": "protected static",
"parameters": "(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"return": "int[]",
"signature": "int[] getDecimalPrecisionAndScale(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.isCoercibleTo(PDataType targetType)",
"constructor": false,
"full_signature": "public boolean isCoercibleTo(PDataType targetType)",
"identifier": "isCoercibleTo",
"modifiers": "public",
"parameters": "(PDataType targetType)",
"return": "boolean",
"signature": "boolean isCoercibleTo(PDataType targetType)",
"testcase": false
},
{
"class_method_signature": "PDataType.isComparableTo(PDataType targetType)",
"constructor": false,
"full_signature": "public boolean isComparableTo(PDataType targetType)",
"identifier": "isComparableTo",
"modifiers": "public",
"parameters": "(PDataType targetType)",
"return": "boolean",
"signature": "boolean isComparableTo(PDataType targetType)",
"testcase": false
},
{
"class_method_signature": "PDataType.isCoercibleTo(PDataType targetType, Object value)",
"constructor": false,
"full_signature": "public boolean isCoercibleTo(PDataType targetType, Object value)",
"identifier": "isCoercibleTo",
"modifiers": "public",
"parameters": "(PDataType targetType, Object value)",
"return": "boolean",
"signature": "boolean isCoercibleTo(PDataType targetType, Object value)",
"testcase": false
},
{
"class_method_signature": "PDataType.isSizeCompatible(ImmutableBytesWritable ptr, Object value, PDataType srcType, SortOrder sortOrder,\n Integer maxLength, Integer scale, Integer desiredMaxLength, Integer desiredScale)",
"constructor": false,
"full_signature": "public boolean isSizeCompatible(ImmutableBytesWritable ptr, Object value, PDataType srcType, SortOrder sortOrder,\n Integer maxLength, Integer scale, Integer desiredMaxLength, Integer desiredScale)",
"identifier": "isSizeCompatible",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, Object value, PDataType srcType, SortOrder sortOrder,\n Integer maxLength, Integer scale, Integer desiredMaxLength, Integer desiredScale)",
"return": "boolean",
"signature": "boolean isSizeCompatible(ImmutableBytesWritable ptr, Object value, PDataType srcType, SortOrder sortOrder,\n Integer maxLength, Integer scale, Integer desiredMaxLength, Integer desiredScale)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(byte[] b1, byte[] b2)",
"constructor": false,
"full_signature": "public int compareTo(byte[] b1, byte[] b2)",
"identifier": "compareTo",
"modifiers": "public",
"parameters": "(byte[] b1, byte[] b2)",
"return": "int",
"signature": "int compareTo(byte[] b1, byte[] b2)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(ImmutableBytesWritable ptr1, ImmutableBytesWritable ptr2)",
"constructor": false,
"full_signature": "public final int compareTo(ImmutableBytesWritable ptr1, ImmutableBytesWritable ptr2)",
"identifier": "compareTo",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr1, ImmutableBytesWritable ptr2)",
"return": "int",
"signature": "int compareTo(ImmutableBytesWritable ptr1, ImmutableBytesWritable ptr2)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(byte[] ba1, int offset1, int length1, SortOrder so1, byte[] ba2, int offset2,\n int length2, SortOrder so2)",
"constructor": false,
"full_signature": "public final int compareTo(byte[] ba1, int offset1, int length1, SortOrder so1, byte[] ba2, int offset2,\n int length2, SortOrder so2)",
"identifier": "compareTo",
"modifiers": "public final",
"parameters": "(byte[] ba1, int offset1, int length1, SortOrder so1, byte[] ba2, int offset2,\n int length2, SortOrder so2)",
"return": "int",
"signature": "int compareTo(byte[] ba1, int offset1, int length1, SortOrder so1, byte[] ba2, int offset2,\n int length2, SortOrder so2)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(ImmutableBytesWritable ptr1, SortOrder ptr1SortOrder, ImmutableBytesWritable ptr2,\n SortOrder ptr2SortOrder, PDataType type2)",
"constructor": false,
"full_signature": "public final int compareTo(ImmutableBytesWritable ptr1, SortOrder ptr1SortOrder, ImmutableBytesWritable ptr2,\n SortOrder ptr2SortOrder, PDataType type2)",
"identifier": "compareTo",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr1, SortOrder ptr1SortOrder, ImmutableBytesWritable ptr2,\n SortOrder ptr2SortOrder, PDataType type2)",
"return": "int",
"signature": "int compareTo(ImmutableBytesWritable ptr1, SortOrder ptr1SortOrder, ImmutableBytesWritable ptr2,\n SortOrder ptr2SortOrder, PDataType type2)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(Object lhs, Object rhs)",
"constructor": false,
"full_signature": "public int compareTo(Object lhs, Object rhs)",
"identifier": "compareTo",
"modifiers": "public",
"parameters": "(Object lhs, Object rhs)",
"return": "int",
"signature": "int compareTo(Object lhs, Object rhs)",
"testcase": false
},
{
"class_method_signature": "PDataType.isNull(byte[] value)",
"constructor": false,
"full_signature": "public final boolean isNull(byte[] value)",
"identifier": "isNull",
"modifiers": "public final",
"parameters": "(byte[] value)",
"return": "boolean",
"signature": "boolean isNull(byte[] value)",
"testcase": false
},
{
"class_method_signature": "PDataType.toBytes(Object object, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public byte[] toBytes(Object object, SortOrder sortOrder)",
"identifier": "toBytes",
"modifiers": "public",
"parameters": "(Object object, SortOrder sortOrder)",
"return": "byte[]",
"signature": "byte[] toBytes(Object object, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier, boolean expectedRowKeyOrderOptimizable)",
"constructor": false,
"full_signature": "public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier, boolean expectedRowKeyOrderOptimizable)",
"identifier": "coerceBytes",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier, boolean expectedRowKeyOrderOptimizable)",
"return": "void",
"signature": "void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier, boolean expectedRowKeyOrderOptimizable)",
"testcase": false
},
{
"class_method_signature": "PDataType.coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier)",
"constructor": false,
"full_signature": "public void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier)",
"identifier": "coerceBytes",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier)",
"return": "void",
"signature": "void coerceBytes(ImmutableBytesWritable ptr, Object o, PDataType actualType, Integer actualMaxLength,\n Integer actualScale, SortOrder actualModifier, Integer desiredMaxLength, Integer desiredScale,\n SortOrder expectedModifier)",
"testcase": false
},
{
"class_method_signature": "PDataType.coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier)",
"constructor": false,
"full_signature": "public final void coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier)",
"identifier": "coerceBytes",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier)",
"return": "void",
"signature": "void coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier)",
"testcase": false
},
{
"class_method_signature": "PDataType.coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier, Integer desiredMaxLength)",
"constructor": false,
"full_signature": "public final void coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier, Integer desiredMaxLength)",
"identifier": "coerceBytes",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier, Integer desiredMaxLength)",
"return": "void",
"signature": "void coerceBytes(ImmutableBytesWritable ptr, PDataType actualType, SortOrder actualModifier,\n SortOrder expectedModifier, Integer desiredMaxLength)",
"testcase": false
},
{
"class_method_signature": "PDataType.isNonNegativeDate(java.util.Date date)",
"constructor": false,
"full_signature": "protected static boolean isNonNegativeDate(java.util.Date date)",
"identifier": "isNonNegativeDate",
"modifiers": "protected static",
"parameters": "(java.util.Date date)",
"return": "boolean",
"signature": "boolean isNonNegativeDate(java.util.Date date)",
"testcase": false
},
{
"class_method_signature": "PDataType.throwIfNonNegativeDate(java.util.Date date)",
"constructor": false,
"full_signature": "protected static void throwIfNonNegativeDate(java.util.Date date)",
"identifier": "throwIfNonNegativeDate",
"modifiers": "protected static",
"parameters": "(java.util.Date date)",
"return": "void",
"signature": "void throwIfNonNegativeDate(java.util.Date date)",
"testcase": false
},
{
"class_method_signature": "PDataType.isNonNegativeNumber(Number v)",
"constructor": false,
"full_signature": "protected static boolean isNonNegativeNumber(Number v)",
"identifier": "isNonNegativeNumber",
"modifiers": "protected static",
"parameters": "(Number v)",
"return": "boolean",
"signature": "boolean isNonNegativeNumber(Number v)",
"testcase": false
},
{
"class_method_signature": "PDataType.throwIfNonNegativeNumber(Number v)",
"constructor": false,
"full_signature": "protected static void throwIfNonNegativeNumber(Number v)",
"identifier": "throwIfNonNegativeNumber",
"modifiers": "protected static",
"parameters": "(Number v)",
"return": "void",
"signature": "void throwIfNonNegativeNumber(Number v)",
"testcase": false
},
{
"class_method_signature": "PDataType.isNullable()",
"constructor": false,
"full_signature": "@Override public boolean isNullable()",
"identifier": "isNullable",
"modifiers": "@Override public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isNullable()",
"testcase": false
},
{
"class_method_signature": "PDataType.getByteSize()",
"constructor": false,
"full_signature": "public abstract Integer getByteSize()",
"identifier": "getByteSize",
"modifiers": "public abstract",
"parameters": "()",
"return": "Integer",
"signature": "Integer getByteSize()",
"testcase": false
},
{
"class_method_signature": "PDataType.encodedLength(T val)",
"constructor": false,
"full_signature": "@Override public int encodedLength(T val)",
"identifier": "encodedLength",
"modifiers": "@Override public",
"parameters": "(T val)",
"return": "int",
"signature": "int encodedLength(T val)",
"testcase": false
},
{
"class_method_signature": "PDataType.skip(PositionedByteRange pbr)",
"constructor": false,
"full_signature": "@Override public int skip(PositionedByteRange pbr)",
"identifier": "skip",
"modifiers": "@Override public",
"parameters": "(PositionedByteRange pbr)",
"return": "int",
"signature": "int skip(PositionedByteRange pbr)",
"testcase": false
},
{
"class_method_signature": "PDataType.isOrderPreserving()",
"constructor": false,
"full_signature": "@Override public boolean isOrderPreserving()",
"identifier": "isOrderPreserving",
"modifiers": "@Override public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isOrderPreserving()",
"testcase": false
},
{
"class_method_signature": "PDataType.isSkippable()",
"constructor": false,
"full_signature": "@Override public boolean isSkippable()",
"identifier": "isSkippable",
"modifiers": "@Override public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isSkippable()",
"testcase": false
},
{
"class_method_signature": "PDataType.getOrder()",
"constructor": false,
"full_signature": "@Override public Order getOrder()",
"identifier": "getOrder",
"modifiers": "@Override public",
"parameters": "()",
"return": "Order",
"signature": "Order getOrder()",
"testcase": false
},
{
"class_method_signature": "PDataType.isFixedWidth()",
"constructor": false,
"full_signature": "public abstract boolean isFixedWidth()",
"identifier": "isFixedWidth",
"modifiers": "public abstract",
"parameters": "()",
"return": "boolean",
"signature": "boolean isFixedWidth()",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(Object lhs, Object rhs, PDataType rhsType)",
"constructor": false,
"full_signature": "public abstract int compareTo(Object lhs, Object rhs, PDataType rhsType)",
"identifier": "compareTo",
"modifiers": "public abstract",
"parameters": "(Object lhs, Object rhs, PDataType rhsType)",
"return": "int",
"signature": "int compareTo(Object lhs, Object rhs, PDataType rhsType)",
"testcase": false
},
{
"class_method_signature": "PDataType.compareTo(PDataType<?> other)",
"constructor": false,
"full_signature": "@Override public int compareTo(PDataType<?> other)",
"identifier": "compareTo",
"modifiers": "@Override public",
"parameters": "(PDataType<?> other)",
"return": "int",
"signature": "int compareTo(PDataType<?> other)",
"testcase": false
},
{
"class_method_signature": "PDataType.toBytes(Object object, byte[] bytes, int offset)",
"constructor": false,
"full_signature": "public abstract int toBytes(Object object, byte[] bytes, int offset)",
"identifier": "toBytes",
"modifiers": "public abstract",
"parameters": "(Object object, byte[] bytes, int offset)",
"return": "int",
"signature": "int toBytes(Object object, byte[] bytes, int offset)",
"testcase": false
},
{
"class_method_signature": "PDataType.encode(PositionedByteRange pbr, T val)",
"constructor": false,
"full_signature": "@Override public int encode(PositionedByteRange pbr, T val)",
"identifier": "encode",
"modifiers": "@Override public",
"parameters": "(PositionedByteRange pbr, T val)",
"return": "int",
"signature": "int encode(PositionedByteRange pbr, T val)",
"testcase": false
},
{
"class_method_signature": "PDataType.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "PDataType.toBytes(Object object)",
"constructor": false,
"full_signature": "public abstract byte[] toBytes(Object object)",
"identifier": "toBytes",
"modifiers": "public abstract",
"parameters": "(Object object)",
"return": "byte[]",
"signature": "byte[] toBytes(Object object)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(String value)",
"constructor": false,
"full_signature": "public abstract Object toObject(String value)",
"identifier": "toObject",
"modifiers": "public abstract",
"parameters": "(String value)",
"return": "Object",
"signature": "Object toObject(String value)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(Object object, PDataType actualType)",
"constructor": false,
"full_signature": "public abstract Object toObject(Object object, PDataType actualType)",
"identifier": "toObject",
"modifiers": "public abstract",
"parameters": "(Object object, PDataType actualType)",
"return": "Object",
"signature": "Object toObject(Object object, PDataType actualType)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"constructor": false,
"full_signature": "public abstract Object toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"identifier": "toObject",
"modifiers": "public abstract",
"parameters": "(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"testcase": false
},
{
"class_method_signature": "PDataType.decode(PositionedByteRange pbr)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") @Override public T decode(PositionedByteRange pbr)",
"identifier": "decode",
"modifiers": "@SuppressWarnings(\"unchecked\") @Override public",
"parameters": "(PositionedByteRange pbr)",
"return": "T",
"signature": "T decode(PositionedByteRange pbr)",
"testcase": false
},
{
"class_method_signature": "PDataType.getSampleValue(Integer maxLength, Integer arrayLength)",
"constructor": false,
"full_signature": "public abstract Object getSampleValue(Integer maxLength, Integer arrayLength)",
"identifier": "getSampleValue",
"modifiers": "public abstract",
"parameters": "(Integer maxLength, Integer arrayLength)",
"return": "Object",
"signature": "Object getSampleValue(Integer maxLength, Integer arrayLength)",
"testcase": false
},
{
"class_method_signature": "PDataType.getSampleValue()",
"constructor": false,
"full_signature": "public final Object getSampleValue()",
"identifier": "getSampleValue",
"modifiers": "public final",
"parameters": "()",
"return": "Object",
"signature": "Object getSampleValue()",
"testcase": false
},
{
"class_method_signature": "PDataType.getSampleValue(Integer maxLength)",
"constructor": false,
"full_signature": "public final Object getSampleValue(Integer maxLength)",
"identifier": "getSampleValue",
"modifiers": "public final",
"parameters": "(Integer maxLength)",
"return": "Object",
"signature": "Object getSampleValue(Integer maxLength)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, int offset, int length, PDataType actualType, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, int offset, int length, PDataType actualType)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes, int offset, int length, PDataType actualType)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes, int offset, int length, PDataType actualType)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, int offset, int length, PDataType actualType)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr, PDataType actualType)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr, PDataType actualType)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, PDataType actualType)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr, PDataType actualType)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr, PDataType actualType, SortOrder sortOrder,\n Integer maxLength, Integer scale)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr, SortOrder sortOrder, Integer maxLength, Integer scale)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr, SortOrder sortOrder, Integer maxLength, Integer scale)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, SortOrder sortOrder, Integer maxLength, Integer scale)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr, SortOrder sortOrder, Integer maxLength, Integer scale)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public final Object toObject(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"return": "Object",
"signature": "Object toObject(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, int offset, int length)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes, int offset, int length)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes, int offset, int length)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, int offset, int length)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes)",
"return": "Object",
"signature": "Object toObject(byte[] bytes)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes, SortOrder sortOrder)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes, SortOrder sortOrder)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.toObject(byte[] bytes, SortOrder sortOrder, PDataType actualType)",
"constructor": false,
"full_signature": "public final Object toObject(byte[] bytes, SortOrder sortOrder, PDataType actualType)",
"identifier": "toObject",
"modifiers": "public final",
"parameters": "(byte[] bytes, SortOrder sortOrder, PDataType actualType)",
"return": "Object",
"signature": "Object toObject(byte[] bytes, SortOrder sortOrder, PDataType actualType)",
"testcase": false
},
{
"class_method_signature": "PDataType.fromSqlTypeName(String sqlTypeName)",
"constructor": false,
"full_signature": "public static PDataType fromSqlTypeName(String sqlTypeName)",
"identifier": "fromSqlTypeName",
"modifiers": "public static",
"parameters": "(String sqlTypeName)",
"return": "PDataType",
"signature": "PDataType fromSqlTypeName(String sqlTypeName)",
"testcase": false
},
{
"class_method_signature": "PDataType.sqlArrayType(String sqlTypeName)",
"constructor": false,
"full_signature": "public static int sqlArrayType(String sqlTypeName)",
"identifier": "sqlArrayType",
"modifiers": "public static",
"parameters": "(String sqlTypeName)",
"return": "int",
"signature": "int sqlArrayType(String sqlTypeName)",
"testcase": false
},
{
"class_method_signature": "PDataType.fromTypeId(int typeId)",
"constructor": false,
"full_signature": "public static PDataType fromTypeId(int typeId)",
"identifier": "fromTypeId",
"modifiers": "public static",
"parameters": "(int typeId)",
"return": "PDataType",
"signature": "PDataType fromTypeId(int typeId)",
"testcase": false
},
{
"class_method_signature": "PDataType.getJavaClassName()",
"constructor": false,
"full_signature": "public String getJavaClassName()",
"identifier": "getJavaClassName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getJavaClassName()",
"testcase": false
},
{
"class_method_signature": "PDataType.getJavaClassNameBytes()",
"constructor": false,
"full_signature": "public byte[] getJavaClassNameBytes()",
"identifier": "getJavaClassNameBytes",
"modifiers": "public",
"parameters": "()",
"return": "byte[]",
"signature": "byte[] getJavaClassNameBytes()",
"testcase": false
},
{
"class_method_signature": "PDataType.getSqlTypeNameBytes()",
"constructor": false,
"full_signature": "public byte[] getSqlTypeNameBytes()",
"identifier": "getSqlTypeNameBytes",
"modifiers": "public",
"parameters": "()",
"return": "byte[]",
"signature": "byte[] getSqlTypeNameBytes()",
"testcase": false
},
{
"class_method_signature": "PDataType.getResultSetSqlType()",
"constructor": false,
"full_signature": "public int getResultSetSqlType()",
"identifier": "getResultSetSqlType",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getResultSetSqlType()",
"testcase": false
},
{
"class_method_signature": "PDataType.getKeyRange(byte[] point)",
"constructor": false,
"full_signature": "public KeyRange getKeyRange(byte[] point)",
"identifier": "getKeyRange",
"modifiers": "public",
"parameters": "(byte[] point)",
"return": "KeyRange",
"signature": "KeyRange getKeyRange(byte[] point)",
"testcase": false
},
{
"class_method_signature": "PDataType.toStringLiteral(ImmutableBytesWritable ptr, Format formatter)",
"constructor": false,
"full_signature": "public final String toStringLiteral(ImmutableBytesWritable ptr, Format formatter)",
"identifier": "toStringLiteral",
"modifiers": "public final",
"parameters": "(ImmutableBytesWritable ptr, Format formatter)",
"return": "String",
"signature": "String toStringLiteral(ImmutableBytesWritable ptr, Format formatter)",
"testcase": false
},
{
"class_method_signature": "PDataType.toStringLiteral(byte[] b, Format formatter)",
"constructor": false,
"full_signature": "public final String toStringLiteral(byte[] b, Format formatter)",
"identifier": "toStringLiteral",
"modifiers": "public final",
"parameters": "(byte[] b, Format formatter)",
"return": "String",
"signature": "String toStringLiteral(byte[] b, Format formatter)",
"testcase": false
},
{
"class_method_signature": "PDataType.toStringLiteral(byte[] b, int offset, int length, Format formatter)",
"constructor": false,
"full_signature": "public String toStringLiteral(byte[] b, int offset, int length, Format formatter)",
"identifier": "toStringLiteral",
"modifiers": "public",
"parameters": "(byte[] b, int offset, int length, Format formatter)",
"return": "String",
"signature": "String toStringLiteral(byte[] b, int offset, int length, Format formatter)",
"testcase": false
},
{
"class_method_signature": "PDataType.toStringLiteral(Object o, Format formatter)",
"constructor": false,
"full_signature": "public String toStringLiteral(Object o, Format formatter)",
"identifier": "toStringLiteral",
"modifiers": "public",
"parameters": "(Object o, Format formatter)",
"return": "String",
"signature": "String toStringLiteral(Object o, Format formatter)",
"testcase": false
},
{
"class_method_signature": "PDataType.toStringLiteral(Object o)",
"constructor": false,
"full_signature": "public String toStringLiteral(Object o)",
"identifier": "toStringLiteral",
"modifiers": "public",
"parameters": "(Object o)",
"return": "String",
"signature": "String toStringLiteral(Object o)",
"testcase": false
},
{
"class_method_signature": "PDataType.getArrayFactory()",
"constructor": false,
"full_signature": "public PhoenixArrayFactory getArrayFactory()",
"identifier": "getArrayFactory",
"modifiers": "public",
"parameters": "()",
"return": "PhoenixArrayFactory",
"signature": "PhoenixArrayFactory getArrayFactory()",
"testcase": false
},
{
"class_method_signature": "PDataType.instantiatePhoenixArray(PDataType actualType, Object[] elements)",
"constructor": false,
"full_signature": "public static PhoenixArray instantiatePhoenixArray(PDataType actualType, Object[] elements)",
"identifier": "instantiatePhoenixArray",
"modifiers": "public static",
"parameters": "(PDataType actualType, Object[] elements)",
"return": "PhoenixArray",
"signature": "PhoenixArray instantiatePhoenixArray(PDataType actualType, Object[] elements)",
"testcase": false
},
{
"class_method_signature": "PDataType.getKeyRange(byte[] lowerRange, boolean lowerInclusive, byte[] upperRange, boolean upperInclusive)",
"constructor": false,
"full_signature": "public KeyRange getKeyRange(byte[] lowerRange, boolean lowerInclusive, byte[] upperRange, boolean upperInclusive)",
"identifier": "getKeyRange",
"modifiers": "public",
"parameters": "(byte[] lowerRange, boolean lowerInclusive, byte[] upperRange, boolean upperInclusive)",
"return": "KeyRange",
"signature": "KeyRange getKeyRange(byte[] lowerRange, boolean lowerInclusive, byte[] upperRange, boolean upperInclusive)",
"testcase": false
},
{
"class_method_signature": "PDataType.fromLiteral(Object value)",
"constructor": false,
"full_signature": "public static PDataType fromLiteral(Object value)",
"identifier": "fromLiteral",
"modifiers": "public static",
"parameters": "(Object value)",
"return": "PDataType",
"signature": "PDataType fromLiteral(Object value)",
"testcase": false
},
{
"class_method_signature": "PDataType.getNanos(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public int getNanos(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"identifier": "getNanos",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"return": "int",
"signature": "int getNanos(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.getMillis(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public long getMillis(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"identifier": "getMillis",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"return": "long",
"signature": "long getMillis(ImmutableBytesWritable ptr, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.pad(Object object, Integer maxLength)",
"constructor": false,
"full_signature": "public Object pad(Object object, Integer maxLength)",
"identifier": "pad",
"modifiers": "public",
"parameters": "(Object object, Integer maxLength)",
"return": "Object",
"signature": "Object pad(Object object, Integer maxLength)",
"testcase": false
},
{
"class_method_signature": "PDataType.pad(ImmutableBytesWritable ptr, Integer maxLength, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public void pad(ImmutableBytesWritable ptr, Integer maxLength, SortOrder sortOrder)",
"identifier": "pad",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, Integer maxLength, SortOrder sortOrder)",
"return": "void",
"signature": "void pad(ImmutableBytesWritable ptr, Integer maxLength, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.pad(byte[] b, Integer maxLength, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public byte[] pad(byte[] b, Integer maxLength, SortOrder sortOrder)",
"identifier": "pad",
"modifiers": "public",
"parameters": "(byte[] b, Integer maxLength, SortOrder sortOrder)",
"return": "byte[]",
"signature": "byte[] pad(byte[] b, Integer maxLength, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "PDataType.arrayBaseType(PDataType arrayType)",
"constructor": false,
"full_signature": "public static PDataType arrayBaseType(PDataType arrayType)",
"identifier": "arrayBaseType",
"modifiers": "public static",
"parameters": "(PDataType arrayType)",
"return": "PDataType",
"signature": "PDataType arrayBaseType(PDataType arrayType)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "protected static int toBytes(BigDecimal v, byte[] result, final int offset, int length) {\n // From scale to exponent byte (if BigDecimal is positive): (-(scale+(scale % 2 == 0 : 0 : 1)) / 2 + 65) | 0x80\n // If scale % 2 is 1 (i.e. it's odd), then multiple last base-100 digit by 10\n // For example: new BigDecimal(BigInteger.valueOf(1), -4);\n // (byte)((-(-4+0) / 2 + 65) | 0x80) = -61\n // From scale to exponent byte (if BigDecimal is negative): ~(-(scale+1)/2 + 65 + 128) & 0x7F\n // For example: new BigDecimal(BigInteger.valueOf(1), 2);\n // ~(-2/2 + 65 + 128) & 0x7F = 63\n int signum = v.signum();\n if (signum == 0) {\n result[offset] = ZERO_BYTE;\n return 1;\n }\n int index = offset + length;\n int scale = v.scale();\n int expOffset = scale % 2 * (scale < 0 ? -1 : 1);\n // In order to get twice as much of a range for scale, it\n // is multiplied by 2. If the scale is an odd number, then\n // the first digit is multiplied by 10 to make up for the\n // scale being off by one.\n int multiplyBy;\n BigInteger divideBy;\n if (expOffset == 0) {\n multiplyBy = 1;\n divideBy = ONE_HUNDRED;\n } else {\n multiplyBy = 10;\n divideBy = BigInteger.TEN;\n }\n // Normalize the scale based on what is necessary to end up with a base 100 decimal (i.e. 10.123e3)\n int digitOffset;\n BigInteger compareAgainst;\n if (signum == 1) {\n digitOffset = POS_DIGIT_OFFSET;\n compareAgainst = MAX_LONG;\n scale -= (length - 2) * 2;\n result[offset] = (byte)((-(scale + expOffset) / 2 + EXP_BYTE_OFFSET) | 0x80);\n } else {\n digitOffset = NEG_DIGIT_OFFSET;\n compareAgainst = MIN_LONG;\n // Scale adjustment shouldn't include terminal byte in length\n scale -= (length - 2 - 1) * 2;\n result[offset] = (byte)(~(-(scale + expOffset) / 2 + EXP_BYTE_OFFSET + 128) & 0x7F);\n if (length <= MAX_BIG_DECIMAL_BYTES) {\n result[--index] = NEG_TERMINAL_BYTE;\n } else {\n // Adjust length and offset down because we don't have enough room\n length = MAX_BIG_DECIMAL_BYTES;\n index = offset + length;\n }\n }\n BigInteger bi = v.unscaledValue();\n // Use BigDecimal arithmetic until we can fit into a long\n while (bi.compareTo(compareAgainst) * signum > 0) {\n BigInteger[] dandr = bi.divideAndRemainder(divideBy);\n bi = dandr[0];\n int digit = dandr[1].intValue();\n result[--index] = (byte)(digit * multiplyBy + digitOffset);\n multiplyBy = 1;\n divideBy = ONE_HUNDRED;\n }\n long l = bi.longValue();\n do {\n long divBy = 100 / multiplyBy;\n long digit = l % divBy;\n l /= divBy;\n result[--index] = (byte)(digit * multiplyBy + digitOffset);\n multiplyBy = 1;\n } while (l != 0);\n\n return length;\n }",
"class_method_signature": "PDataType.toBytes(BigDecimal v, byte[] result, final int offset, int length)",
"constructor": false,
"full_signature": "protected static int toBytes(BigDecimal v, byte[] result, final int offset, int length)",
"identifier": "toBytes",
"invocations": [
"signum",
"scale",
"unscaledValue",
"compareTo",
"divideAndRemainder",
"intValue",
"longValue"
],
"modifiers": "protected static",
"parameters": "(BigDecimal v, byte[] result, final int offset, int length)",
"return": "int",
"signature": "int toBytes(BigDecimal v, byte[] result, final int offset, int length)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_82 | {
"fields": [
{
"declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L",
"modifier": "private static final",
"original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;",
"type": "long",
"var_name": "ONE_HOUR_IN_MILLIS"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/DateUtilTest.java",
"identifier": "DateUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected=IllegalDataException.class)\n public void testParseTimestamp_tooLargeNanos() {\n DateUtil.parseTimestamp(\"1970-01-01 00:00:10.9999999999\");\n }",
"class_method_signature": "DateUtilTest.testParseTimestamp_tooLargeNanos()",
"constructor": false,
"full_signature": "@Test(expected=IllegalDataException.class) public void testParseTimestamp_tooLargeNanos()",
"identifier": "testParseTimestamp_tooLargeNanos",
"invocations": [
"parseTimestamp"
],
"modifiers": "@Test(expected=IllegalDataException.class) public",
"parameters": "()",
"return": "void",
"signature": "void testParseTimestamp_tooLargeNanos()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";",
"type": "String",
"var_name": "DEFAULT_TIME_ZONE_ID"
},
{
"declarator": "LOCAL_TIME_ZONE_ID = \"LOCAL\"",
"modifier": "public static final",
"original_string": "public static final String LOCAL_TIME_ZONE_ID = \"LOCAL\";",
"type": "String",
"var_name": "LOCAL_TIME_ZONE_ID"
},
{
"declarator": "DEFAULT_TIME_ZONE = TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID)",
"modifier": "private static final",
"original_string": "private static final TimeZone DEFAULT_TIME_ZONE = TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID);",
"type": "TimeZone",
"var_name": "DEFAULT_TIME_ZONE"
},
{
"declarator": "DEFAULT_MS_DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss.SSS\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_MS_DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss.SSS\";",
"type": "String",
"var_name": "DEFAULT_MS_DATE_FORMAT"
},
{
"declarator": "DEFAULT_MS_DATE_FORMATTER = FastDateFormat.getInstance(\n DEFAULT_MS_DATE_FORMAT, TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID))",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_MS_DATE_FORMATTER = FastDateFormat.getInstance(\n DEFAULT_MS_DATE_FORMAT, TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID));",
"type": "Format",
"var_name": "DEFAULT_MS_DATE_FORMATTER"
},
{
"declarator": "DEFAULT_DATE_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_DATE_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_DATE_FORMAT"
},
{
"declarator": "DEFAULT_DATE_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_DATE_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_DATE_FORMATTER"
},
{
"declarator": "DEFAULT_TIME_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIME_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_TIME_FORMAT"
},
{
"declarator": "DEFAULT_TIME_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_TIME_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_TIME_FORMATTER"
},
{
"declarator": "DEFAULT_TIMESTAMP_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIMESTAMP_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_TIMESTAMP_FORMAT"
},
{
"declarator": "DEFAULT_TIMESTAMP_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_TIMESTAMP_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_TIMESTAMP_FORMATTER"
},
{
"declarator": "ISO_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.dateParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .appendLiteral(' ').toParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.timeParser()).toParser())\n .toFormatter().withChronology(ISOChronology.getInstanceUTC())",
"modifier": "private static final",
"original_string": "private static final DateTimeFormatter ISO_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.dateParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .appendLiteral(' ').toParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.timeParser()).toParser())\n .toFormatter().withChronology(ISOChronology.getInstanceUTC());",
"type": "DateTimeFormatter",
"var_name": "ISO_DATE_TIME_FORMATTER"
},
{
"declarator": "defaultPattern",
"modifier": "private static",
"original_string": "private static String[] defaultPattern;",
"type": "String[]",
"var_name": "defaultPattern"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/DateUtil.java",
"identifier": "DateUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "DateUtil.DateUtil()",
"constructor": true,
"full_signature": "private DateUtil()",
"identifier": "DateUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " DateUtil()",
"testcase": false
},
{
"class_method_signature": "DateUtil.getCodecFor(PDataType type)",
"constructor": false,
"full_signature": "@NonNull public static PDataCodec getCodecFor(PDataType type)",
"identifier": "getCodecFor",
"modifiers": "@NonNull public static",
"parameters": "(PDataType type)",
"return": "PDataCodec",
"signature": "PDataCodec getCodecFor(PDataType type)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimeZone(String timeZoneId)",
"constructor": false,
"full_signature": "public static TimeZone getTimeZone(String timeZoneId)",
"identifier": "getTimeZone",
"modifiers": "public static",
"parameters": "(String timeZoneId)",
"return": "TimeZone",
"signature": "TimeZone getTimeZone(String timeZoneId)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDefaultFormat(PDataType type)",
"constructor": false,
"full_signature": "private static String getDefaultFormat(PDataType type)",
"identifier": "getDefaultFormat",
"modifiers": "private static",
"parameters": "(PDataType type)",
"return": "String",
"signature": "String getDefaultFormat(PDataType type)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"constructor": false,
"full_signature": "public static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"identifier": "getDateTimeParser",
"modifiers": "public static",
"parameters": "(String pattern, PDataType pDataType, String timeZoneId)",
"return": "DateTimeParser",
"signature": "DateTimeParser getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateTimeParser(String pattern, PDataType pDataType)",
"constructor": false,
"full_signature": "public static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType)",
"identifier": "getDateTimeParser",
"modifiers": "public static",
"parameters": "(String pattern, PDataType pDataType)",
"return": "DateTimeParser",
"signature": "DateTimeParser getDateTimeParser(String pattern, PDataType pDataType)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateFormatter(String pattern)",
"constructor": false,
"full_signature": "public static Format getDateFormatter(String pattern)",
"identifier": "getDateFormatter",
"modifiers": "public static",
"parameters": "(String pattern)",
"return": "Format",
"signature": "Format getDateFormatter(String pattern)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getDateFormatter(String pattern, String timeZoneID)",
"identifier": "getDateFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getDateFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimeFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getTimeFormatter(String pattern, String timeZoneID)",
"identifier": "getTimeFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getTimeFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestampFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getTimestampFormatter(String pattern, String timeZoneID)",
"identifier": "getTimestampFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getTimestampFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseDateTime(String dateTimeValue)",
"constructor": false,
"full_signature": "private static long parseDateTime(String dateTimeValue)",
"identifier": "parseDateTime",
"modifiers": "private static",
"parameters": "(String dateTimeValue)",
"return": "long",
"signature": "long parseDateTime(String dateTimeValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseDate(String dateValue)",
"constructor": false,
"full_signature": "public static Date parseDate(String dateValue)",
"identifier": "parseDate",
"modifiers": "public static",
"parameters": "(String dateValue)",
"return": "Date",
"signature": "Date parseDate(String dateValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseTime(String timeValue)",
"constructor": false,
"full_signature": "public static Time parseTime(String timeValue)",
"identifier": "parseTime",
"modifiers": "public static",
"parameters": "(String timeValue)",
"return": "Time",
"signature": "Time parseTime(String timeValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseTimestamp(String timestampValue)",
"constructor": false,
"full_signature": "public static Timestamp parseTimestamp(String timestampValue)",
"identifier": "parseTimestamp",
"modifiers": "public static",
"parameters": "(String timestampValue)",
"return": "Timestamp",
"signature": "Timestamp parseTimestamp(String timestampValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestamp(long millis, int nanos)",
"constructor": false,
"full_signature": "public static Timestamp getTimestamp(long millis, int nanos)",
"identifier": "getTimestamp",
"modifiers": "public static",
"parameters": "(long millis, int nanos)",
"return": "Timestamp",
"signature": "Timestamp getTimestamp(long millis, int nanos)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestamp(BigDecimal bd)",
"constructor": false,
"full_signature": "public static Timestamp getTimestamp(BigDecimal bd)",
"identifier": "getTimestamp",
"modifiers": "public static",
"parameters": "(BigDecimal bd)",
"return": "Timestamp",
"signature": "Timestamp getTimestamp(BigDecimal bd)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static Timestamp parseTimestamp(String timestampValue) {\n Timestamp timestamp = new Timestamp(parseDateTime(timestampValue));\n int period = timestampValue.indexOf('.');\n if (period > 0) {\n String nanosStr = timestampValue.substring(period + 1);\n if (nanosStr.length() > 9)\n throw new IllegalDataException(\"nanos > 999999999 or < 0\");\n if(nanosStr.length() > 3 ) {\n int nanos = Integer.parseInt(nanosStr);\n for (int i = 0; i < 9 - nanosStr.length(); i++) {\n nanos *= 10;\n }\n timestamp.setNanos(nanos);\n }\n }\n return timestamp;\n }",
"class_method_signature": "DateUtil.parseTimestamp(String timestampValue)",
"constructor": false,
"full_signature": "public static Timestamp parseTimestamp(String timestampValue)",
"identifier": "parseTimestamp",
"invocations": [
"parseDateTime",
"indexOf",
"substring",
"length",
"length",
"parseInt",
"length",
"setNanos"
],
"modifiers": "public static",
"parameters": "(String timestampValue)",
"return": "Timestamp",
"signature": "Timestamp parseTimestamp(String timestampValue)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_197 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/expression/rewrite/RowValueConstructorExpressionRewriterTest.java",
"identifier": "RowValueConstructorExpressionRewriterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRewriteAllChildrenAsc() throws SQLException {\n\n\n Expression ascChild = Mockito.mock(Expression.class);\n Mockito.when(ascChild.getSortOrder()).thenReturn(SortOrder.ASC);\n Mockito.when(ascChild.getDataType()).thenReturn(PFloat.INSTANCE);\n Mockito.when(ascChild.getDeterminism()).thenReturn(Determinism.ALWAYS);\n Mockito.when(ascChild.requiresFinalEvaluation()).thenReturn(true);\n\n Expression descChild = Mockito.mock(Expression.class);\n Mockito.when(descChild.getSortOrder()).thenReturn(SortOrder.DESC);\n Mockito.when(descChild.getDataType()).thenReturn(PFloat.INSTANCE);\n Mockito.when(descChild.getDeterminism()).thenReturn(Determinism.ALWAYS);\n Mockito.when(descChild.requiresFinalEvaluation()).thenReturn(true);\n\n List<Expression> children = ImmutableList.of(ascChild,descChild);\n RowValueConstructorExpression expression =\n new RowValueConstructorExpression(children,false);\n\n\n RowValueConstructorExpressionRewriter\n rewriter =\n RowValueConstructorExpressionRewriter.getSingleton();\n\n RowValueConstructorExpression result = rewriter.rewriteAllChildrenAsc(expression);\n\n assertEquals(2,result.getChildren().size());\n\n Expression child1 = result.getChildren().get(0);\n Expression child2 = result.getChildren().get(1);\n\n assertEquals(SortOrder.ASC, child1.getSortOrder());\n assertEquals(SortOrder.ASC, child2.getSortOrder());\n\n assertEquals(ascChild, child1);\n assertTrue(child2 instanceof CoerceExpression);\n assertEquals(descChild, ((CoerceExpression)child2).getChild());\n\n }",
"class_method_signature": "RowValueConstructorExpressionRewriterTest.testRewriteAllChildrenAsc()",
"constructor": false,
"full_signature": "@Test public void testRewriteAllChildrenAsc()",
"identifier": "testRewriteAllChildrenAsc",
"invocations": [
"mock",
"thenReturn",
"when",
"getSortOrder",
"thenReturn",
"when",
"getDataType",
"thenReturn",
"when",
"getDeterminism",
"thenReturn",
"when",
"requiresFinalEvaluation",
"mock",
"thenReturn",
"when",
"getSortOrder",
"thenReturn",
"when",
"getDataType",
"thenReturn",
"when",
"getDeterminism",
"thenReturn",
"when",
"requiresFinalEvaluation",
"of",
"getSingleton",
"rewriteAllChildrenAsc",
"assertEquals",
"size",
"getChildren",
"get",
"getChildren",
"get",
"getChildren",
"assertEquals",
"getSortOrder",
"assertEquals",
"getSortOrder",
"assertEquals",
"assertTrue",
"assertEquals",
"getChild"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testRewriteAllChildrenAsc()",
"testcase": true
} | {
"fields": [
{
"declarator": "singleton = null",
"modifier": "static",
"original_string": "static RowValueConstructorExpressionRewriter singleton = null;",
"type": "RowValueConstructorExpressionRewriter",
"var_name": "singleton"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/expression/rewrite/RowValueConstructorExpressionRewriter.java",
"identifier": "RowValueConstructorExpressionRewriter",
"interfaces": "",
"methods": [
{
"class_method_signature": "RowValueConstructorExpressionRewriter.getSingleton()",
"constructor": false,
"full_signature": "public static RowValueConstructorExpressionRewriter getSingleton()",
"identifier": "getSingleton",
"modifiers": "public static",
"parameters": "()",
"return": "RowValueConstructorExpressionRewriter",
"signature": "RowValueConstructorExpressionRewriter getSingleton()",
"testcase": false
},
{
"class_method_signature": "RowValueConstructorExpressionRewriter.rewriteAllChildrenAsc(\n RowValueConstructorExpression rvcExpression)",
"constructor": false,
"full_signature": "public RowValueConstructorExpression rewriteAllChildrenAsc(\n RowValueConstructorExpression rvcExpression)",
"identifier": "rewriteAllChildrenAsc",
"modifiers": "public",
"parameters": "(\n RowValueConstructorExpression rvcExpression)",
"return": "RowValueConstructorExpression",
"signature": "RowValueConstructorExpression rewriteAllChildrenAsc(\n RowValueConstructorExpression rvcExpression)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public RowValueConstructorExpression rewriteAllChildrenAsc(\n RowValueConstructorExpression rvcExpression) throws SQLException {\n List<Expression> replacementChildren = new ArrayList<>(rvcExpression.getChildren().size());\n for (int i = 0; i < rvcExpression.getChildren().size(); i++) {\n Expression child = rvcExpression.getChildren().get(i);\n if (child.getSortOrder() == SortOrder.DESC) {\n //As The KeySlot visitor has not been setup for InvertFunction need to Use Coerce\n child = CoerceExpression.create(child, child.getDataType(), SortOrder.ASC, null);\n }\n replacementChildren.add(child);\n }\n return rvcExpression.clone(replacementChildren);\n }",
"class_method_signature": "RowValueConstructorExpressionRewriter.rewriteAllChildrenAsc(\n RowValueConstructorExpression rvcExpression)",
"constructor": false,
"full_signature": "public RowValueConstructorExpression rewriteAllChildrenAsc(\n RowValueConstructorExpression rvcExpression)",
"identifier": "rewriteAllChildrenAsc",
"invocations": [
"size",
"getChildren",
"size",
"getChildren",
"get",
"getChildren",
"getSortOrder",
"create",
"getDataType",
"add",
"clone"
],
"modifiers": "public",
"parameters": "(\n RowValueConstructorExpression rvcExpression)",
"return": "RowValueConstructorExpression",
"signature": "RowValueConstructorExpression rewriteAllChildrenAsc(\n RowValueConstructorExpression rvcExpression)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_66 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/StringUtilTest.java",
"identifier": "StringUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCalculateUTF8Offset() throws Exception {\n String tmp, padding = \"padding\", data = \"零一二三四五六七八九\", trailing = \"trailing\";\n byte[] bytes = (padding + data + trailing).getBytes();\n int ret, offset = padding.getBytes().length, length = data.getBytes().length;\n\n tmp = padding;\n for (int i = 0; i < data.length(); ++i) {\n ret = StringUtil.calculateUTF8Offset(bytes, offset, length, SortOrder.ASC, i);\n assertEquals(tmp.getBytes().length, ret);\n tmp = tmp + data.charAt(i);\n }\n for (int i = data.length(); i < data.length() + 10; ++i) {\n ret = StringUtil.calculateUTF8Offset(bytes, offset, length, SortOrder.ASC, i);\n assertEquals(-1, ret);\n }\n\n for (int i = -data.length() - 10; i < -data.length(); ++i) {\n ret = StringUtil.calculateUTF8Offset(bytes, offset, length, SortOrder.ASC, i);\n assertEquals(-1, ret);\n }\n tmp = padding;\n for (int i = -data.length(); i <= -1; ++i) {\n ret = StringUtil.calculateUTF8Offset(bytes, offset, length, SortOrder.ASC, i);\n assertEquals(\"i=\" + i, tmp.getBytes().length, ret);\n tmp = tmp + data.charAt(i + data.length());\n }\n }",
"class_method_signature": "StringUtilTest.testCalculateUTF8Offset()",
"constructor": false,
"full_signature": "@Test public void testCalculateUTF8Offset()",
"identifier": "testCalculateUTF8Offset",
"invocations": [
"getBytes",
"getBytes",
"getBytes",
"length",
"calculateUTF8Offset",
"assertEquals",
"getBytes",
"charAt",
"length",
"length",
"calculateUTF8Offset",
"assertEquals",
"length",
"length",
"calculateUTF8Offset",
"assertEquals",
"length",
"calculateUTF8Offset",
"assertEquals",
"getBytes",
"charAt",
"length"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCalculateUTF8Offset()",
"testcase": true
} | {
"fields": [
{
"declarator": "EMPTY_STRING = \"\"",
"modifier": "public static final",
"original_string": "public static final String EMPTY_STRING = \"\";",
"type": "String",
"var_name": "EMPTY_STRING"
},
{
"declarator": "SPACE_UTF8 = 0x20",
"modifier": "public static final",
"original_string": "public static final byte SPACE_UTF8 = 0x20;",
"type": "byte",
"var_name": "SPACE_UTF8"
},
{
"declarator": "BYTES_1_MASK = 0xFF << 7",
"modifier": "private static final",
"original_string": "private static final int BYTES_1_MASK = 0xFF << 7;",
"type": "int",
"var_name": "BYTES_1_MASK"
},
{
"declarator": "BYTES_2_MASK = 0xFF << 5",
"modifier": "private static final",
"original_string": "private static final int BYTES_2_MASK = 0xFF << 5;",
"type": "int",
"var_name": "BYTES_2_MASK"
},
{
"declarator": "BYTES_3_MASK = 0xFF << 4",
"modifier": "private static final",
"original_string": "private static final int BYTES_3_MASK = 0xFF << 4;",
"type": "int",
"var_name": "BYTES_3_MASK"
},
{
"declarator": "BYTES_4_MASK = 0xFF << 3",
"modifier": "private static final",
"original_string": "private static final int BYTES_4_MASK = 0xFF << 3;",
"type": "int",
"var_name": "BYTES_4_MASK"
},
{
"declarator": "INVERTED_SPACE_UTF8 = SortOrder.invert(new byte[] {SPACE_UTF8}, 0, new byte[1], 0, 1)[0]",
"modifier": "public static final",
"original_string": "public static final byte INVERTED_SPACE_UTF8 = SortOrder.invert(new byte[] {SPACE_UTF8}, 0, new byte[1], 0, 1)[0];",
"type": "byte",
"var_name": "INVERTED_SPACE_UTF8"
},
{
"declarator": "SINGLE_CHAR_WILDCARD = '?'",
"modifier": "public final static",
"original_string": "public final static char SINGLE_CHAR_WILDCARD = '?';",
"type": "char",
"var_name": "SINGLE_CHAR_WILDCARD"
},
{
"declarator": "SINGLE_CHAR_LIKE = '_'",
"modifier": "public final static",
"original_string": "public final static char SINGLE_CHAR_LIKE = '_';",
"type": "char",
"var_name": "SINGLE_CHAR_LIKE"
},
{
"declarator": "MULTI_CHAR_WILDCARD = '*'",
"modifier": "public final static",
"original_string": "public final static char MULTI_CHAR_WILDCARD = '*';",
"type": "char",
"var_name": "MULTI_CHAR_WILDCARD"
},
{
"declarator": "MULTI_CHAR_LIKE = '%'",
"modifier": "public final static",
"original_string": "public final static char MULTI_CHAR_LIKE = '%';",
"type": "char",
"var_name": "MULTI_CHAR_LIKE"
},
{
"declarator": "LIKE_ESCAPE_SEQS = new String[]{\"\\\\\"+SINGLE_CHAR_LIKE, \"\\\\\"+MULTI_CHAR_LIKE}",
"modifier": "public final static",
"original_string": "public final static String[] LIKE_ESCAPE_SEQS = new String[]{\"\\\\\"+SINGLE_CHAR_LIKE, \"\\\\\"+MULTI_CHAR_LIKE};",
"type": "String[]",
"var_name": "LIKE_ESCAPE_SEQS"
},
{
"declarator": "LIKE_UNESCAPED_SEQS = new String[]{\"\"+SINGLE_CHAR_LIKE, \"\"+MULTI_CHAR_LIKE}",
"modifier": "public final static",
"original_string": "public final static String[] LIKE_UNESCAPED_SEQS = new String[]{\"\"+SINGLE_CHAR_LIKE, \"\"+MULTI_CHAR_LIKE};",
"type": "String[]",
"var_name": "LIKE_UNESCAPED_SEQS"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/StringUtil.java",
"identifier": "StringUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "StringUtil.StringUtil()",
"constructor": true,
"full_signature": "private StringUtil()",
"identifier": "StringUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " StringUtil()",
"testcase": false
},
{
"class_method_signature": "StringUtil.replaceChar(String value, char ch, CharSequence replacement)",
"constructor": false,
"full_signature": "public static String replaceChar(String value, char ch, CharSequence replacement)",
"identifier": "replaceChar",
"modifiers": "public static",
"parameters": "(String value, char ch, CharSequence replacement)",
"return": "String",
"signature": "String replaceChar(String value, char ch, CharSequence replacement)",
"testcase": false
},
{
"class_method_signature": "StringUtil.replace(String s, String[] src, String[] target)",
"constructor": false,
"full_signature": "public static String replace(String s, String[] src, String[] target)",
"identifier": "replace",
"modifiers": "public static",
"parameters": "(String s, String[] src, String[] target)",
"return": "String",
"signature": "String replace(String s, String[] src, String[] target)",
"testcase": false
},
{
"class_method_signature": "StringUtil.getBytesInChar(byte b, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public static int getBytesInChar(byte b, SortOrder sortOrder)",
"identifier": "getBytesInChar",
"modifiers": "public static",
"parameters": "(byte b, SortOrder sortOrder)",
"return": "int",
"signature": "int getBytesInChar(byte b, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "StringUtil.getBytesInCharNoException(byte b, SortOrder sortOrder)",
"constructor": false,
"full_signature": "private static int getBytesInCharNoException(byte b, SortOrder sortOrder)",
"identifier": "getBytesInCharNoException",
"modifiers": "private static",
"parameters": "(byte b, SortOrder sortOrder)",
"return": "int",
"signature": "int getBytesInCharNoException(byte b, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "StringUtil.calculateUTF8Length(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public static int calculateUTF8Length(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"identifier": "calculateUTF8Length",
"modifiers": "public static",
"parameters": "(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"return": "int",
"signature": "int calculateUTF8Length(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "StringUtil.calculateNextCharOffset(byte[] bytes, int curPos, int range,\n SortOrder sortOrder)",
"constructor": false,
"full_signature": "private static int calculateNextCharOffset(byte[] bytes, int curPos, int range,\n SortOrder sortOrder)",
"identifier": "calculateNextCharOffset",
"modifiers": "private static",
"parameters": "(byte[] bytes, int curPos, int range,\n SortOrder sortOrder)",
"return": "int",
"signature": "int calculateNextCharOffset(byte[] bytes, int curPos, int range,\n SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "StringUtil.calculatePreCharOffset(byte[] bytes, int curPos, int offset,\n SortOrder sortOrder)",
"constructor": false,
"full_signature": "private static int calculatePreCharOffset(byte[] bytes, int curPos, int offset,\n SortOrder sortOrder)",
"identifier": "calculatePreCharOffset",
"modifiers": "private static",
"parameters": "(byte[] bytes, int curPos, int offset,\n SortOrder sortOrder)",
"return": "int",
"signature": "int calculatePreCharOffset(byte[] bytes, int curPos, int offset,\n SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "StringUtil.calculateUTF8Offset(byte[] bytes, int offset, int length,\n SortOrder sortOrder, int offsetInStr)",
"constructor": false,
"full_signature": "public static int calculateUTF8Offset(byte[] bytes, int offset, int length,\n SortOrder sortOrder, int offsetInStr)",
"identifier": "calculateUTF8Offset",
"modifiers": "public static",
"parameters": "(byte[] bytes, int offset, int length,\n SortOrder sortOrder, int offsetInStr)",
"return": "int",
"signature": "int calculateUTF8Offset(byte[] bytes, int offset, int length,\n SortOrder sortOrder, int offsetInStr)",
"testcase": false
},
{
"class_method_signature": "StringUtil.getByteLengthForUtf8SubStr(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public static int getByteLengthForUtf8SubStr(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"identifier": "getByteLengthForUtf8SubStr",
"modifiers": "public static",
"parameters": "(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"return": "int",
"signature": "int getByteLengthForUtf8SubStr(byte[] bytes, int offset, int length, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "StringUtil.hasMultiByteChars(String s)",
"constructor": false,
"full_signature": "public static boolean hasMultiByteChars(String s)",
"identifier": "hasMultiByteChars",
"modifiers": "public static",
"parameters": "(String s)",
"return": "boolean",
"signature": "boolean hasMultiByteChars(String s)",
"testcase": false
},
{
"class_method_signature": "StringUtil.getFirstNonBlankCharIdxFromStart(byte[] string, int offset, int length, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public static int getFirstNonBlankCharIdxFromStart(byte[] string, int offset, int length, SortOrder sortOrder)",
"identifier": "getFirstNonBlankCharIdxFromStart",
"modifiers": "public static",
"parameters": "(byte[] string, int offset, int length, SortOrder sortOrder)",
"return": "int",
"signature": "int getFirstNonBlankCharIdxFromStart(byte[] string, int offset, int length, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "StringUtil.getFirstNonBlankCharIdxFromEnd(byte[] string, int offset, int length, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public static int getFirstNonBlankCharIdxFromEnd(byte[] string, int offset, int length, SortOrder sortOrder)",
"identifier": "getFirstNonBlankCharIdxFromEnd",
"modifiers": "public static",
"parameters": "(byte[] string, int offset, int length, SortOrder sortOrder)",
"return": "int",
"signature": "int getFirstNonBlankCharIdxFromEnd(byte[] string, int offset, int length, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "StringUtil.toBytes(String input)",
"constructor": false,
"full_signature": "public static byte[] toBytes(String input)",
"identifier": "toBytes",
"modifiers": "public static",
"parameters": "(String input)",
"return": "byte[]",
"signature": "byte[] toBytes(String input)",
"testcase": false
},
{
"class_method_signature": "StringUtil.escapeLike(String s)",
"constructor": false,
"full_signature": "public static String escapeLike(String s)",
"identifier": "escapeLike",
"modifiers": "public static",
"parameters": "(String s)",
"return": "String",
"signature": "String escapeLike(String s)",
"testcase": false
},
{
"class_method_signature": "StringUtil.getUnpaddedCharLength(byte[] b, int offset, int length, SortOrder sortOrder)",
"constructor": false,
"full_signature": "public static int getUnpaddedCharLength(byte[] b, int offset, int length, SortOrder sortOrder)",
"identifier": "getUnpaddedCharLength",
"modifiers": "public static",
"parameters": "(byte[] b, int offset, int length, SortOrder sortOrder)",
"return": "int",
"signature": "int getUnpaddedCharLength(byte[] b, int offset, int length, SortOrder sortOrder)",
"testcase": false
},
{
"class_method_signature": "StringUtil.padChar(byte[] value, Integer byteSize)",
"constructor": false,
"full_signature": "public static byte[] padChar(byte[] value, Integer byteSize)",
"identifier": "padChar",
"modifiers": "public static",
"parameters": "(byte[] value, Integer byteSize)",
"return": "byte[]",
"signature": "byte[] padChar(byte[] value, Integer byteSize)",
"testcase": false
},
{
"class_method_signature": "StringUtil.equals(StringBuilder b1, StringBuilder b2)",
"constructor": false,
"full_signature": "public static boolean equals(StringBuilder b1, StringBuilder b2)",
"identifier": "equals",
"modifiers": "public static",
"parameters": "(StringBuilder b1, StringBuilder b2)",
"return": "boolean",
"signature": "boolean equals(StringBuilder b1, StringBuilder b2)",
"testcase": false
},
{
"class_method_signature": "StringUtil.lpad(byte[] str, int strOffset, int strLength, byte[] fill, int fillOffset, int fillLength,\n boolean invertFill, int strWithPaddingLen)",
"constructor": false,
"full_signature": "public static byte[] lpad(byte[] str, int strOffset, int strLength, byte[] fill, int fillOffset, int fillLength,\n boolean invertFill, int strWithPaddingLen)",
"identifier": "lpad",
"modifiers": "public static",
"parameters": "(byte[] str, int strOffset, int strLength, byte[] fill, int fillOffset, int fillLength,\n boolean invertFill, int strWithPaddingLen)",
"return": "byte[]",
"signature": "byte[] lpad(byte[] str, int strOffset, int strLength, byte[] fill, int fillOffset, int fillLength,\n boolean invertFill, int strWithPaddingLen)",
"testcase": false
},
{
"class_method_signature": "StringUtil.fill(byte[] str, int strFromIdx, int strToIdx, byte[] fillArray, int fillFromIdx, int fillToIdx,\n boolean invertFill)",
"constructor": false,
"full_signature": "public static void fill(byte[] str, int strFromIdx, int strToIdx, byte[] fillArray, int fillFromIdx, int fillToIdx,\n boolean invertFill)",
"identifier": "fill",
"modifiers": "public static",
"parameters": "(byte[] str, int strFromIdx, int strToIdx, byte[] fillArray, int fillFromIdx, int fillToIdx,\n boolean invertFill)",
"return": "void",
"signature": "void fill(byte[] str, int strFromIdx, int strToIdx, byte[] fillArray, int fillFromIdx, int fillToIdx,\n boolean invertFill)",
"testcase": false
},
{
"class_method_signature": "StringUtil.rangeCheck(int length, int fromIndex, int toIndex)",
"constructor": false,
"full_signature": "private static void rangeCheck(int length, int fromIndex, int toIndex)",
"identifier": "rangeCheck",
"modifiers": "private static",
"parameters": "(int length, int fromIndex, int toIndex)",
"return": "void",
"signature": "void rangeCheck(int length, int fromIndex, int toIndex)",
"testcase": false
},
{
"class_method_signature": "StringUtil.escapeStringConstant(String pattern)",
"constructor": false,
"full_signature": "public static String escapeStringConstant(String pattern)",
"identifier": "escapeStringConstant",
"modifiers": "public static",
"parameters": "(String pattern)",
"return": "String",
"signature": "String escapeStringConstant(String pattern)",
"testcase": false
},
{
"class_method_signature": "StringUtil.escapeBackslash(String input)",
"constructor": false,
"full_signature": "public static String escapeBackslash(String input)",
"identifier": "escapeBackslash",
"modifiers": "public static",
"parameters": "(String input)",
"return": "String",
"signature": "String escapeBackslash(String input)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static int calculateUTF8Offset(byte[] bytes, int offset, int length,\n SortOrder sortOrder, int offsetInStr) {\n if (offsetInStr == 0) return offset;\n int ret, range = offset + length;\n if (offsetInStr > 0) {\n ret = offset;\n while (offsetInStr > 0) {\n ret = calculateNextCharOffset(bytes, ret, range, sortOrder);\n if (ret == -1) return -1;\n --offsetInStr;\n }\n } else {\n ret = offset + length;\n while (offsetInStr < 0) {\n ret = calculatePreCharOffset(bytes, ret, offset, sortOrder);\n // if calculateCurCharOffset returns -1, ret must be smaller than offset\n if (ret < offset) return -1;\n ++offsetInStr;\n }\n }\n return ret;\n }",
"class_method_signature": "StringUtil.calculateUTF8Offset(byte[] bytes, int offset, int length,\n SortOrder sortOrder, int offsetInStr)",
"constructor": false,
"full_signature": "public static int calculateUTF8Offset(byte[] bytes, int offset, int length,\n SortOrder sortOrder, int offsetInStr)",
"identifier": "calculateUTF8Offset",
"invocations": [
"calculateNextCharOffset",
"calculatePreCharOffset"
],
"modifiers": "public static",
"parameters": "(byte[] bytes, int offset, int length,\n SortOrder sortOrder, int offsetInStr)",
"return": "int",
"signature": "int calculateUTF8Offset(byte[] bytes, int offset, int length,\n SortOrder sortOrder, int offsetInStr)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_173 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/schema/SequenceAllocationTest.java",
"identifier": "SequenceAllocationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n /**\n * Validates that sorting a List of SequenceAllocation instances\n * results in the same sort order as sorting SequenceKey instances.\n */\n public void testSortingSequenceAllocation() {\n \n // Arrange\n SequenceKey sequenceKey1 = new SequenceKey(null, \"seqalloc\", \"sequenceC\",QueryServicesOptions.DEFAULT_SEQUENCE_TABLE_SALT_BUCKETS);\n SequenceKey sequenceKey2 = new SequenceKey(null, \"seqalloc\", \"sequenceB\",QueryServicesOptions.DEFAULT_SEQUENCE_TABLE_SALT_BUCKETS);\n SequenceKey sequenceKey3 = new SequenceKey(null, \"seqalloc\", \"sequenceA\",QueryServicesOptions.DEFAULT_SEQUENCE_TABLE_SALT_BUCKETS);\n List<SequenceKey> sequenceKeys = Lists.newArrayList(sequenceKey1, sequenceKey2, sequenceKey3);\n List<SequenceAllocation> sequenceAllocations = Lists.newArrayList(new SequenceAllocation(sequenceKey2, 1), new SequenceAllocation(sequenceKey1, 1), new SequenceAllocation(sequenceKey3, 1));\n \n // Act\n Collections.sort(sequenceKeys);\n Collections.sort(sequenceAllocations);\n \n // Assert\n int i = 0;\n for (SequenceKey sequenceKey : sequenceKeys) {\n assertEquals(sequenceKey, sequenceAllocations.get(i).getSequenceKey());\n i++;\n }\n }",
"class_method_signature": "SequenceAllocationTest.testSortingSequenceAllocation()",
"constructor": false,
"full_signature": "@Test /** * Validates that sorting a List of SequenceAllocation instances * results in the same sort order as sorting SequenceKey instances. */ public void testSortingSequenceAllocation()",
"identifier": "testSortingSequenceAllocation",
"invocations": [
"newArrayList",
"newArrayList",
"sort",
"sort",
"assertEquals",
"getSequenceKey",
"get"
],
"modifiers": "@Test /** * Validates that sorting a List of SequenceAllocation instances * results in the same sort order as sorting SequenceKey instances. */ public",
"parameters": "()",
"return": "void",
"signature": "void testSortingSequenceAllocation()",
"testcase": true
} | {
"fields": [
{
"declarator": "sequenceKey",
"modifier": "private final",
"original_string": "private final SequenceKey sequenceKey;",
"type": "SequenceKey",
"var_name": "sequenceKey"
},
{
"declarator": "numAllocations",
"modifier": "private final",
"original_string": "private final long numAllocations;",
"type": "long",
"var_name": "numAllocations"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/schema/SequenceAllocation.java",
"identifier": "SequenceAllocation",
"interfaces": "implements Comparable<SequenceAllocation>",
"methods": [
{
"class_method_signature": "SequenceAllocation.SequenceAllocation(SequenceKey sequenceKey, long numAllocations)",
"constructor": true,
"full_signature": "public SequenceAllocation(SequenceKey sequenceKey, long numAllocations)",
"identifier": "SequenceAllocation",
"modifiers": "public",
"parameters": "(SequenceKey sequenceKey, long numAllocations)",
"return": "",
"signature": " SequenceAllocation(SequenceKey sequenceKey, long numAllocations)",
"testcase": false
},
{
"class_method_signature": "SequenceAllocation.getSequenceKey()",
"constructor": false,
"full_signature": "public SequenceKey getSequenceKey()",
"identifier": "getSequenceKey",
"modifiers": "public",
"parameters": "()",
"return": "SequenceKey",
"signature": "SequenceKey getSequenceKey()",
"testcase": false
},
{
"class_method_signature": "SequenceAllocation.getNumAllocations()",
"constructor": false,
"full_signature": "public long getNumAllocations()",
"identifier": "getNumAllocations",
"modifiers": "public",
"parameters": "()",
"return": "long",
"signature": "long getNumAllocations()",
"testcase": false
},
{
"class_method_signature": "SequenceAllocation.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "SequenceAllocation.equals(Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(Object obj)",
"return": "boolean",
"signature": "boolean equals(Object obj)",
"testcase": false
},
{
"class_method_signature": "SequenceAllocation.compareTo(SequenceAllocation that)",
"constructor": false,
"full_signature": "@Override public int compareTo(SequenceAllocation that)",
"identifier": "compareTo",
"modifiers": "@Override public",
"parameters": "(SequenceAllocation that)",
"return": "int",
"signature": "int compareTo(SequenceAllocation that)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public SequenceKey getSequenceKey() {\n return sequenceKey;\n }",
"class_method_signature": "SequenceAllocation.getSequenceKey()",
"constructor": false,
"full_signature": "public SequenceKey getSequenceKey()",
"identifier": "getSequenceKey",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "SequenceKey",
"signature": "SequenceKey getSequenceKey()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_89 | {
"fields": [
{
"declarator": "ROW = Bytes.toBytes(\"row\")",
"modifier": "private static final",
"original_string": "private static final byte[] ROW = Bytes.toBytes(\"row\");",
"type": "byte[]",
"var_name": "ROW"
},
{
"declarator": "QUALIFIER = Bytes.toBytes(\"qual\")",
"modifier": "private static final",
"original_string": "private static final byte[] QUALIFIER = Bytes.toBytes(\"qual\");",
"type": "byte[]",
"var_name": "QUALIFIER"
},
{
"declarator": "ORIGINAL_VALUE = Bytes.toBytes(\"generic-value\")",
"modifier": "private static final",
"original_string": "private static final byte[] ORIGINAL_VALUE = Bytes.toBytes(\"generic-value\");",
"type": "byte[]",
"var_name": "ORIGINAL_VALUE"
},
{
"declarator": "DUMMY_TAGS = Bytes.toBytes(\"tags\")",
"modifier": "private static final",
"original_string": "private static final byte[] DUMMY_TAGS = Bytes.toBytes(\"tags\");",
"type": "byte[]",
"var_name": "DUMMY_TAGS"
},
{
"declarator": "mockBuilder = Mockito.mock(ExtendedCellBuilder.class)",
"modifier": "private final",
"original_string": "private final ExtendedCellBuilder mockBuilder = Mockito.mock(ExtendedCellBuilder.class);",
"type": "ExtendedCellBuilder",
"var_name": "mockBuilder"
},
{
"declarator": "mockCellWithTags = Mockito.mock(ExtendedCell.class)",
"modifier": "private final",
"original_string": "private final ExtendedCell mockCellWithTags = Mockito.mock(ExtendedCell.class);",
"type": "ExtendedCell",
"var_name": "mockCellWithTags"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/MetaDataUtilTest.java",
"identifier": "MetaDataUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTaggingAPutWrongQualifier() throws Exception {\n Put put = generateOriginalPut();\n Cell initialCell = put.get(TABLE_FAMILY_BYTES, QUALIFIER).get(0);\n\n // Different qualifier, so no tags should be set\n MetaDataUtil.conditionallyAddTagsToPutCells(put, TABLE_FAMILY_BYTES, EMPTY_BYTE_ARRAY,\n mockBuilder, EMPTY_BYTE_ARRAY, DUMMY_TAGS);\n verify(mockBuilder, never()).setTags(Mockito.any(byte[].class));\n Cell newCell = put.getFamilyCellMap().get(TABLE_FAMILY_BYTES).get(0);\n assertEquals(initialCell, newCell);\n assertNull(TagUtil.carryForwardTags(newCell));\n }",
"class_method_signature": "MetaDataUtilTest.testTaggingAPutWrongQualifier()",
"constructor": false,
"full_signature": "@Test public void testTaggingAPutWrongQualifier()",
"identifier": "testTaggingAPutWrongQualifier",
"invocations": [
"generateOriginalPut",
"get",
"get",
"conditionallyAddTagsToPutCells",
"setTags",
"verify",
"never",
"any",
"get",
"get",
"getFamilyCellMap",
"assertEquals",
"assertNull",
"carryForwardTags"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testTaggingAPutWrongQualifier()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MetaDataUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataUtil.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "VIEW_INDEX_TABLE_PREFIX = \"_IDX_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_TABLE_PREFIX = \"_IDX_\";",
"type": "String",
"var_name": "VIEW_INDEX_TABLE_PREFIX"
},
{
"declarator": "LOCAL_INDEX_TABLE_PREFIX = \"_LOCAL_IDX_\"",
"modifier": "public static final",
"original_string": "public static final String LOCAL_INDEX_TABLE_PREFIX = \"_LOCAL_IDX_\";",
"type": "String",
"var_name": "LOCAL_INDEX_TABLE_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_PREFIX = \"_SEQ_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_SEQUENCE_PREFIX = \"_SEQ_\";",
"type": "String",
"var_name": "VIEW_INDEX_SEQUENCE_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_NAME_PREFIX = \"_ID_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_SEQUENCE_NAME_PREFIX = \"_ID_\";",
"type": "String",
"var_name": "VIEW_INDEX_SEQUENCE_NAME_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_PREFIX_BYTES = Bytes.toBytes(VIEW_INDEX_SEQUENCE_PREFIX)",
"modifier": "public static final",
"original_string": "public static final byte[] VIEW_INDEX_SEQUENCE_PREFIX_BYTES = Bytes.toBytes(VIEW_INDEX_SEQUENCE_PREFIX);",
"type": "byte[]",
"var_name": "VIEW_INDEX_SEQUENCE_PREFIX_BYTES"
},
{
"declarator": "VIEW_INDEX_ID_COLUMN_NAME = \"_INDEX_ID\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_ID_COLUMN_NAME = \"_INDEX_ID\";",
"type": "String",
"var_name": "VIEW_INDEX_ID_COLUMN_NAME"
},
{
"declarator": "PARENT_TABLE_KEY = \"PARENT_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String PARENT_TABLE_KEY = \"PARENT_TABLE\";",
"type": "String",
"var_name": "PARENT_TABLE_KEY"
},
{
"declarator": "IS_VIEW_INDEX_TABLE_PROP_NAME = \"IS_VIEW_INDEX_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String IS_VIEW_INDEX_TABLE_PROP_NAME = \"IS_VIEW_INDEX_TABLE\";",
"type": "String",
"var_name": "IS_VIEW_INDEX_TABLE_PROP_NAME"
},
{
"declarator": "IS_VIEW_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_VIEW_INDEX_TABLE_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] IS_VIEW_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_VIEW_INDEX_TABLE_PROP_NAME);",
"type": "byte[]",
"var_name": "IS_VIEW_INDEX_TABLE_PROP_BYTES"
},
{
"declarator": "IS_LOCAL_INDEX_TABLE_PROP_NAME = \"IS_LOCAL_INDEX_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String IS_LOCAL_INDEX_TABLE_PROP_NAME = \"IS_LOCAL_INDEX_TABLE\";",
"type": "String",
"var_name": "IS_LOCAL_INDEX_TABLE_PROP_NAME"
},
{
"declarator": "IS_LOCAL_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_LOCAL_INDEX_TABLE_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] IS_LOCAL_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_LOCAL_INDEX_TABLE_PROP_NAME);",
"type": "byte[]",
"var_name": "IS_LOCAL_INDEX_TABLE_PROP_BYTES"
},
{
"declarator": "DATA_TABLE_NAME_PROP_NAME = \"DATA_TABLE_NAME\"",
"modifier": "public static final",
"original_string": "public static final String DATA_TABLE_NAME_PROP_NAME = \"DATA_TABLE_NAME\";",
"type": "String",
"var_name": "DATA_TABLE_NAME_PROP_NAME"
},
{
"declarator": "DATA_TABLE_NAME_PROP_BYTES = Bytes.toBytes(DATA_TABLE_NAME_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] DATA_TABLE_NAME_PROP_BYTES = Bytes.toBytes(DATA_TABLE_NAME_PROP_NAME);",
"type": "byte[]",
"var_name": "DATA_TABLE_NAME_PROP_BYTES"
},
{
"declarator": "SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES = ImmutableList.of(\n ColumnFamilyDescriptorBuilder.TTL,\n ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS,\n ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE)",
"modifier": "public static final",
"original_string": "public static final List<String> SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES = ImmutableList.of(\n ColumnFamilyDescriptorBuilder.TTL,\n ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS,\n ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE);",
"type": "List<String>",
"var_name": "SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/MetaDataUtil.java",
"identifier": "MetaDataUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "MetaDataUtil.areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"constructor": false,
"full_signature": "public static ClientServerCompatibility areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"identifier": "areClientAndServerCompatible",
"modifiers": "public static",
"parameters": "(long serverHBaseAndPhoenixVersion)",
"return": "ClientServerCompatibility",
"signature": "ClientServerCompatibility areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"constructor": false,
"full_signature": "@VisibleForTesting static ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"identifier": "areClientAndServerCompatible",
"modifiers": "@VisibleForTesting static",
"parameters": "(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"return": "ClientServerCompatibility",
"signature": "ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodePhoenixVersion(long version)",
"constructor": false,
"full_signature": "public static int decodePhoenixVersion(long version)",
"identifier": "decodePhoenixVersion",
"modifiers": "public static",
"parameters": "(long version)",
"return": "int",
"signature": "int decodePhoenixVersion(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.encodeHasIndexWALCodec(long version, boolean isValid)",
"constructor": false,
"full_signature": "public static long encodeHasIndexWALCodec(long version, boolean isValid)",
"identifier": "encodeHasIndexWALCodec",
"modifiers": "public static",
"parameters": "(long version, boolean isValid)",
"return": "long",
"signature": "long encodeHasIndexWALCodec(long version, boolean isValid)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHasIndexWALCodec(long version)",
"constructor": false,
"full_signature": "public static boolean decodeHasIndexWALCodec(long version)",
"identifier": "decodeHasIndexWALCodec",
"modifiers": "public static",
"parameters": "(long version)",
"return": "boolean",
"signature": "boolean decodeHasIndexWALCodec(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHBaseVersion(long version)",
"constructor": false,
"full_signature": "public static int decodeHBaseVersion(long version)",
"identifier": "decodeHBaseVersion",
"modifiers": "public static",
"parameters": "(long version)",
"return": "int",
"signature": "int decodeHBaseVersion(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHBaseVersionAsString(int version)",
"constructor": false,
"full_signature": "public static String decodeHBaseVersionAsString(int version)",
"identifier": "decodeHBaseVersionAsString",
"modifiers": "public static",
"parameters": "(int version)",
"return": "String",
"signature": "String decodeHBaseVersionAsString(int version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeTableNamespaceMappingEnabled(long version)",
"constructor": false,
"full_signature": "public static boolean decodeTableNamespaceMappingEnabled(long version)",
"identifier": "decodeTableNamespaceMappingEnabled",
"modifiers": "public static",
"parameters": "(long version)",
"return": "boolean",
"signature": "boolean decodeTableNamespaceMappingEnabled(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.encodeVersion(String hbaseVersionStr, Configuration config)",
"constructor": false,
"full_signature": "public static long encodeVersion(String hbaseVersionStr, Configuration config)",
"identifier": "encodeVersion",
"modifiers": "public static",
"parameters": "(String hbaseVersionStr, Configuration config)",
"return": "long",
"signature": "long encodeVersion(String hbaseVersionStr, Configuration config)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(Mutation someRow)",
"constructor": false,
"full_signature": "public static byte[] getTenantIdAndSchemaAndTableName(Mutation someRow)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(Mutation someRow)",
"return": "byte[]",
"signature": "byte[] getTenantIdAndSchemaAndTableName(Mutation someRow)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(Result result)",
"constructor": false,
"full_signature": "public static byte[] getTenantIdAndSchemaAndTableName(Result result)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(Result result)",
"return": "byte[]",
"signature": "byte[] getTenantIdAndSchemaAndTableName(Result result)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"constructor": false,
"full_signature": "public static void getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"return": "void",
"signature": "void getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getBaseColumnCount(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static int getBaseColumnCount(List<Mutation> tableMetadata)",
"identifier": "getBaseColumnCount",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "int",
"signature": "int getBaseColumnCount(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"constructor": false,
"full_signature": "public static void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"identifier": "mutatePutValue",
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"return": "void",
"signature": "void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"constructor": false,
"full_signature": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"identifier": "conditionallyAddTagsToPutCells",
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"return": "void",
"signature": "void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"constructor": false,
"full_signature": "public static Put cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"identifier": "cloneDeleteToPutAndAddColumn",
"modifiers": "public static",
"parameters": "(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"return": "Put",
"signature": "Put cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"constructor": false,
"full_signature": "public static void getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"identifier": "getTenantIdAndFunctionName",
"modifiers": "public static",
"parameters": "(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"return": "void",
"signature": "void getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentTableName(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static byte[] getParentTableName(List<Mutation> tableMetadata)",
"identifier": "getParentTableName",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "byte[]",
"signature": "byte[] getParentTableName(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSequenceNumber(Mutation tableMutation)",
"constructor": false,
"full_signature": "public static long getSequenceNumber(Mutation tableMutation)",
"identifier": "getSequenceNumber",
"modifiers": "public static",
"parameters": "(Mutation tableMutation)",
"return": "long",
"signature": "long getSequenceNumber(Mutation tableMutation)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSequenceNumber(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static long getSequenceNumber(List<Mutation> tableMetaData)",
"identifier": "getSequenceNumber",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "long",
"signature": "long getSequenceNumber(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static PTableType getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getTableType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "PTableType",
"signature": "PTableType getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static boolean isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "isNameSpaceMapped",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "boolean",
"signature": "boolean isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static int getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getSaltBuckets",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "int",
"signature": "int getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentSequenceNumber(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static long getParentSequenceNumber(List<Mutation> tableMetaData)",
"identifier": "getParentSequenceNumber",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "long",
"signature": "long getParentSequenceNumber(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Mutation getTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Mutation",
"signature": "Mutation getTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "getMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"constructor": false,
"full_signature": "public static KeyValue getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"identifier": "getMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"return": "KeyValue",
"signature": "KeyValue getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"constructor": false,
"full_signature": "public static boolean setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"identifier": "setMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"return": "boolean",
"signature": "boolean setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Put getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getPutOnlyTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Put",
"signature": "Put getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Put getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"identifier": "getPutOnlyAutoPartitionColumn",
"modifiers": "public static",
"parameters": "(PTable parentTable, List<Mutation> tableMetaData)",
"return": "Put",
"signature": "Put getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Mutation getParentTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getParentTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Mutation",
"signature": "Mutation getParentTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getClientTimeStamp(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static long getClientTimeStamp(List<Mutation> tableMetadata)",
"identifier": "getClientTimeStamp",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "long",
"signature": "long getClientTimeStamp(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getClientTimeStamp(Mutation m)",
"constructor": false,
"full_signature": "public static long getClientTimeStamp(Mutation m)",
"identifier": "getClientTimeStamp",
"modifiers": "public static",
"parameters": "(Mutation m)",
"return": "long",
"signature": "long getClientTimeStamp(Mutation m)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"constructor": false,
"full_signature": "public static byte[] getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"identifier": "getParentLinkKey",
"modifiers": "public static",
"parameters": "(String tenantId, String schemaName, String tableName, String indexName)",
"return": "byte[]",
"signature": "byte[] getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"constructor": false,
"full_signature": "public static byte[] getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"identifier": "getParentLinkKey",
"modifiers": "public static",
"parameters": "(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"return": "byte[]",
"signature": "byte[] getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"constructor": false,
"full_signature": "public static byte[] getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"identifier": "getChildLinkKey",
"modifiers": "public static",
"parameters": "(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"return": "byte[]",
"signature": "byte[] getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getCell(List<Cell> cells, byte[] cq)",
"constructor": false,
"full_signature": "public static Cell getCell(List<Cell> cells, byte[] cq)",
"identifier": "getCell",
"modifiers": "public static",
"parameters": "(List<Cell> cells, byte[] cq)",
"return": "Cell",
"signature": "Cell getCell(List<Cell> cells, byte[] cq)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isMultiTenant",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isTransactional",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isSalted",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexPhysicalName(byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static byte[] getViewIndexPhysicalName(byte[] physicalTableName)",
"identifier": "getViewIndexPhysicalName",
"modifiers": "public static",
"parameters": "(byte[] physicalTableName)",
"return": "byte[]",
"signature": "byte[] getViewIndexPhysicalName(byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexPhysicalName(String physicalTableName)",
"constructor": false,
"full_signature": "public static String getViewIndexPhysicalName(String physicalTableName)",
"identifier": "getViewIndexPhysicalName",
"modifiers": "public static",
"parameters": "(String physicalTableName)",
"return": "String",
"signature": "String getViewIndexPhysicalName(String physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"constructor": false,
"full_signature": "private static byte[] getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"identifier": "getIndexPhysicalName",
"modifiers": "private static",
"parameters": "(byte[] physicalTableName, String indexPrefix)",
"return": "byte[]",
"signature": "byte[] getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"constructor": false,
"full_signature": "private static String getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"identifier": "getIndexPhysicalName",
"modifiers": "private static",
"parameters": "(String physicalTableName, String indexPrefix)",
"return": "String",
"signature": "String getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexPhysicalName(byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static byte[] getLocalIndexPhysicalName(byte[] physicalTableName)",
"identifier": "getLocalIndexPhysicalName",
"modifiers": "public static",
"parameters": "(byte[] physicalTableName)",
"return": "byte[]",
"signature": "byte[] getLocalIndexPhysicalName(byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexTableName(String tableName)",
"constructor": false,
"full_signature": "public static String getLocalIndexTableName(String tableName)",
"identifier": "getLocalIndexTableName",
"modifiers": "public static",
"parameters": "(String tableName)",
"return": "String",
"signature": "String getLocalIndexTableName(String tableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexSchemaName(String schemaName)",
"constructor": false,
"full_signature": "public static String getLocalIndexSchemaName(String schemaName)",
"identifier": "getLocalIndexSchemaName",
"modifiers": "public static",
"parameters": "(String schemaName)",
"return": "String",
"signature": "String getLocalIndexSchemaName(String schemaName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexUserTableName(String localIndexTableName)",
"constructor": false,
"full_signature": "public static String getLocalIndexUserTableName(String localIndexTableName)",
"identifier": "getLocalIndexUserTableName",
"modifiers": "public static",
"parameters": "(String localIndexTableName)",
"return": "String",
"signature": "String getLocalIndexUserTableName(String localIndexTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexUserTableName(String viewIndexTableName)",
"constructor": false,
"full_signature": "public static String getViewIndexUserTableName(String viewIndexTableName)",
"identifier": "getViewIndexUserTableName",
"modifiers": "public static",
"parameters": "(String viewIndexTableName)",
"return": "String",
"signature": "String getViewIndexUserTableName(String viewIndexTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceSchemaName",
"modifiers": "public static",
"parameters": "(PName physicalName, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceName",
"modifiers": "public static",
"parameters": "(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static SequenceKey getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceKey",
"modifiers": "public static",
"parameters": "(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"return": "SequenceKey",
"signature": "SequenceKey getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceSchemaName",
"modifiers": "public static",
"parameters": "(PName physicalName, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceName",
"modifiers": "public static",
"parameters": "(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static SequenceKey getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceKey",
"modifiers": "public static",
"parameters": "(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"return": "SequenceKey",
"signature": "SequenceKey getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexIdDataType()",
"constructor": false,
"full_signature": "public static PDataType getViewIndexIdDataType()",
"identifier": "getViewIndexIdDataType",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getViewIndexIdDataType()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLegacyViewIndexIdDataType()",
"constructor": false,
"full_signature": "public static PDataType getLegacyViewIndexIdDataType()",
"identifier": "getLegacyViewIndexIdDataType",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getLegacyViewIndexIdDataType()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexIdColumnName()",
"constructor": false,
"full_signature": "public static String getViewIndexIdColumnName()",
"identifier": "getViewIndexIdColumnName",
"modifiers": "public static",
"parameters": "()",
"return": "String",
"signature": "String getViewIndexIdColumnName()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"constructor": false,
"full_signature": "public static boolean hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"identifier": "hasViewIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName physicalName)",
"return": "boolean",
"signature": "boolean hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static boolean hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"identifier": "hasViewIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, byte[] physicalTableName)",
"return": "boolean",
"signature": "boolean hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"identifier": "hasLocalIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName physicalName)",
"return": "boolean",
"signature": "boolean hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"identifier": "hasLocalIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, byte[] physicalTableName)",
"return": "boolean",
"signature": "boolean hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexColumnFamily(TableDescriptor desc)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexColumnFamily(TableDescriptor desc)",
"identifier": "hasLocalIndexColumnFamily",
"modifiers": "public static",
"parameters": "(TableDescriptor desc)",
"return": "boolean",
"signature": "boolean hasLocalIndexColumnFamily(TableDescriptor desc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"constructor": false,
"full_signature": "public static List<byte[]> getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"identifier": "getNonLocalIndexColumnFamilies",
"modifiers": "public static",
"parameters": "(TableDescriptor desc)",
"return": "List<byte[]>",
"signature": "List<byte[]> getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static List<byte[]> getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"identifier": "getLocalIndexColumnFamilies",
"modifiers": "public static",
"parameters": "(PhoenixConnection conn, byte[] physicalTableName)",
"return": "List<byte[]>",
"signature": "List<byte[]> getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static void deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"identifier": "deleteViewIndexSequences",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"return": "void",
"signature": "void deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.tableRegionsOnline(Configuration conf, PTable table)",
"constructor": false,
"full_signature": "public static boolean tableRegionsOnline(Configuration conf, PTable table)",
"identifier": "tableRegionsOnline",
"modifiers": "public static",
"parameters": "(Configuration conf, PTable table)",
"return": "boolean",
"signature": "boolean tableRegionsOnline(Configuration conf, PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.propertyNotAllowedToBeOutOfSync(String colFamProp)",
"constructor": false,
"full_signature": "public static boolean propertyNotAllowedToBeOutOfSync(String colFamProp)",
"identifier": "propertyNotAllowedToBeOutOfSync",
"modifiers": "public static",
"parameters": "(String colFamProp)",
"return": "boolean",
"signature": "boolean propertyNotAllowedToBeOutOfSync(String colFamProp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"constructor": false,
"full_signature": "public static Map<String, Object> getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"identifier": "getSyncedProps",
"modifiers": "public static",
"parameters": "(ColumnFamilyDescriptor defaultCFDesc)",
"return": "Map<String, Object>",
"signature": "Map<String, Object> getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"constructor": false,
"full_signature": "public static Scan newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"identifier": "newTableRowsScan",
"modifiers": "public static",
"parameters": "(byte[] key, long startTimeStamp, long stopTimeStamp)",
"return": "Scan",
"signature": "Scan newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"constructor": false,
"full_signature": "public static Scan newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"identifier": "newTableRowsScan",
"modifiers": "public static",
"parameters": "(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"return": "Scan",
"signature": "Scan newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLinkType(Mutation tableMutation)",
"constructor": false,
"full_signature": "public static LinkType getLinkType(Mutation tableMutation)",
"identifier": "getLinkType",
"modifiers": "public static",
"parameters": "(Mutation tableMutation)",
"return": "LinkType",
"signature": "LinkType getLinkType(Mutation tableMutation)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLinkType(Collection<Cell> kvs)",
"constructor": false,
"full_signature": "public static LinkType getLinkType(Collection<Cell> kvs)",
"identifier": "getLinkType",
"modifiers": "public static",
"parameters": "(Collection<Cell> kvs)",
"return": "LinkType",
"signature": "LinkType getLinkType(Collection<Cell> kvs)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndex(String physicalName)",
"constructor": false,
"full_signature": "public static boolean isLocalIndex(String physicalName)",
"identifier": "isLocalIndex",
"modifiers": "public static",
"parameters": "(String physicalName)",
"return": "boolean",
"signature": "boolean isLocalIndex(String physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isViewIndex(String physicalName)",
"constructor": false,
"full_signature": "public static boolean isViewIndex(String physicalName)",
"identifier": "isViewIndex",
"modifiers": "public static",
"parameters": "(String physicalName)",
"return": "boolean",
"signature": "boolean isViewIndex(String physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getAutoPartitionColumnName(PTable parentTable)",
"constructor": false,
"full_signature": "public static String getAutoPartitionColumnName(PTable parentTable)",
"identifier": "getAutoPartitionColumnName",
"modifiers": "public static",
"parameters": "(PTable parentTable)",
"return": "String",
"signature": "String getAutoPartitionColumnName(PTable parentTable)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getAutoPartitionColIndex(PTable parentTable)",
"constructor": false,
"full_signature": "public static int getAutoPartitionColIndex(PTable parentTable)",
"identifier": "getAutoPartitionColIndex",
"modifiers": "public static",
"parameters": "(PTable parentTable)",
"return": "int",
"signature": "int getAutoPartitionColIndex(PTable parentTable)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getJdbcUrl(RegionCoprocessorEnvironment env)",
"constructor": false,
"full_signature": "public static String getJdbcUrl(RegionCoprocessorEnvironment env)",
"identifier": "getJdbcUrl",
"modifiers": "public static",
"parameters": "(RegionCoprocessorEnvironment env)",
"return": "String",
"signature": "String getJdbcUrl(RegionCoprocessorEnvironment env)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isHColumnProperty(String propName)",
"constructor": false,
"full_signature": "public static boolean isHColumnProperty(String propName)",
"identifier": "isHColumnProperty",
"modifiers": "public static",
"parameters": "(String propName)",
"return": "boolean",
"signature": "boolean isHColumnProperty(String propName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isHTableProperty(String propName)",
"constructor": false,
"full_signature": "public static boolean isHTableProperty(String propName)",
"identifier": "isHTableProperty",
"modifiers": "public static",
"parameters": "(String propName)",
"return": "boolean",
"signature": "boolean isHTableProperty(String propName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"constructor": false,
"full_signature": "public static boolean isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"identifier": "isLocalIndexFamily",
"modifiers": "public static",
"parameters": "(ImmutableBytesPtr cfPtr)",
"return": "boolean",
"signature": "boolean isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndexFamily(byte[] cf)",
"constructor": false,
"full_signature": "public static boolean isLocalIndexFamily(byte[] cf)",
"identifier": "isLocalIndexFamily",
"modifiers": "public static",
"parameters": "(byte[] cf)",
"return": "boolean",
"signature": "boolean isLocalIndexFamily(byte[] cf)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPhysicalTableRowForView(PTable view)",
"constructor": false,
"full_signature": "public static final byte[] getPhysicalTableRowForView(PTable view)",
"identifier": "getPhysicalTableRowForView",
"modifiers": "public static final",
"parameters": "(PTable view)",
"return": "byte[]",
"signature": "byte[] getPhysicalTableRowForView(PTable view)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.removeChildLinkMutations(List<Mutation> metadataMutations)",
"constructor": false,
"full_signature": "public static List<Mutation> removeChildLinkMutations(List<Mutation> metadataMutations)",
"identifier": "removeChildLinkMutations",
"modifiers": "public static",
"parameters": "(List<Mutation> metadataMutations)",
"return": "List<Mutation>",
"signature": "List<Mutation> removeChildLinkMutations(List<Mutation> metadataMutations)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static IndexType getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getIndexType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "IndexType",
"signature": "IndexType getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static PDataType<?> getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"identifier": "getIndexDataType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"return": "PDataType<?>",
"signature": "PDataType<?> getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"constructor": false,
"full_signature": "public static PColumn getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"identifier": "getColumn",
"modifiers": "public static",
"parameters": "(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"return": "PColumn",
"signature": "PColumn getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"constructor": false,
"full_signature": "public static void deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"identifier": "deleteFromStatsTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"return": "void",
"signature": "void deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray) {\n NavigableMap<byte[], List<Cell>> familyCellMap = somePut.getFamilyCellMap();\n List<Cell> cells = familyCellMap.get(family);\n List<Cell> newCells = Lists.newArrayList();\n if (cells != null) {\n for (Cell cell : cells) {\n if (Bytes.compareTo(cell.getQualifierArray(), cell.getQualifierOffset(),\n cell.getQualifierLength(), qualifier, 0, qualifier.length) == 0 &&\n (valueArray == null || !CellUtil.matchingValue(cell, valueArray))) {\n ExtendedCell extendedCell = cellBuilder\n .setRow(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength())\n .setFamily(cell.getFamilyArray(), cell.getFamilyOffset(),\n cell.getFamilyLength())\n .setQualifier(cell.getQualifierArray(), cell.getQualifierOffset(),\n cell.getQualifierLength())\n .setValue(cell.getValueArray(), cell.getValueOffset(),\n cell.getValueLength())\n .setTimestamp(cell.getTimestamp())\n .setType(cell.getType())\n .setTags(TagUtil.concatTags(tagArray, cell))\n .build();\n // Replace existing cell with a cell that has the custom tags list\n newCells.add(extendedCell);\n } else {\n // Add cell as is\n newCells.add(cell);\n }\n }\n familyCellMap.put(family, newCells);\n }\n }",
"class_method_signature": "MetaDataUtil.conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"constructor": false,
"full_signature": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"identifier": "conditionallyAddTagsToPutCells",
"invocations": [
"getFamilyCellMap",
"get",
"newArrayList",
"compareTo",
"getQualifierArray",
"getQualifierOffset",
"getQualifierLength",
"matchingValue",
"build",
"setTags",
"setType",
"setTimestamp",
"setValue",
"setQualifier",
"setFamily",
"setRow",
"getRowArray",
"getRowOffset",
"getRowLength",
"getFamilyArray",
"getFamilyOffset",
"getFamilyLength",
"getQualifierArray",
"getQualifierOffset",
"getQualifierLength",
"getValueArray",
"getValueOffset",
"getValueLength",
"getTimestamp",
"getType",
"concatTags",
"add",
"add",
"put"
],
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"return": "void",
"signature": "void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_31 | {
"fields": [
{
"declarator": "MIN_VALUE = 1",
"modifier": "private static",
"original_string": "private static long MIN_VALUE = 1;",
"type": "long",
"var_name": "MIN_VALUE"
},
{
"declarator": "MAX_VALUE = 10",
"modifier": "private static",
"original_string": "private static long MAX_VALUE = 10;",
"type": "long",
"var_name": "MAX_VALUE"
},
{
"declarator": "CACHE_SIZE = 2",
"modifier": "private static",
"original_string": "private static long CACHE_SIZE = 2;",
"type": "long",
"var_name": "CACHE_SIZE"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/SequenceUtilTest.java",
"identifier": "SequenceUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBulkAllocationDescendingNextValueReachLimit() throws SQLException {\n assertFalse(SequenceUtil.checkIfLimitReached(7, MIN_VALUE, MAX_VALUE, -2/* incrementBy */, CACHE_SIZE, 3));\n }",
"class_method_signature": "SequenceUtilTest.testBulkAllocationDescendingNextValueReachLimit()",
"constructor": false,
"full_signature": "@Test public void testBulkAllocationDescendingNextValueReachLimit()",
"identifier": "testBulkAllocationDescendingNextValueReachLimit",
"invocations": [
"assertFalse",
"checkIfLimitReached"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testBulkAllocationDescendingNextValueReachLimit()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L",
"modifier": "public static final",
"original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;",
"type": "long",
"var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/SequenceUtil.java",
"identifier": "SequenceUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(SequenceInfo info)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(SequenceInfo info)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(SequenceInfo info)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(SequenceInfo info)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isBulkAllocation(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isBulkAllocation(long numToAllocate)",
"identifier": "isBulkAllocation",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isBulkAllocation(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isCycleAllowed(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isCycleAllowed(long numToAllocate)",
"identifier": "isCycleAllowed",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isCycleAllowed(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"constructor": false,
"full_signature": "public static SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"identifier": "getException",
"modifiers": "public static",
"parameters": "(String schemaName, String tableName,\n SQLExceptionCode code)",
"return": "SQLException",
"signature": "SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getLimitReachedErrorCode(boolean increasingSeq)",
"constructor": false,
"full_signature": "public static SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"identifier": "getLimitReachedErrorCode",
"modifiers": "public static",
"parameters": "(boolean increasingSeq)",
"return": "SQLExceptionCode",
"signature": "SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for overflow \n try {\n long incrementValue;\n if (isBulkAllocation(numToAllocate)) {\n // For bulk allocation we increment independent of cache size\n incrementValue = LongMath.checkedMultiply(incrementBy, numToAllocate);\n } else {\n incrementValue = LongMath.checkedMultiply(incrementBy, cacheSize);\n }\n nextValue = LongMath.checkedAdd(currentValue, incrementValue);\n } catch (ArithmeticException e) {\n return true;\n }\n\n // check if limit was reached\n\t\tif ((increasingSeq && nextValue > maxValue)\n\t\t\t\t|| (!increasingSeq && nextValue < minValue)) {\n return true;\n }\n return false;\n }",
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"invocations": [
"isBulkAllocation",
"checkedMultiply",
"checkedMultiply",
"checkedAdd"
],
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_124 | {
"fields": [
{
"declarator": "EMPTY_SET = Collections\n .<ImmutableBytesPtr> emptySet()",
"modifier": "private static final",
"original_string": "private static final Set<ImmutableBytesPtr> EMPTY_SET = Collections\n .<ImmutableBytesPtr> emptySet();",
"type": "Set<ImmutableBytesPtr>",
"var_name": "EMPTY_SET"
},
{
"declarator": "row = Bytes.toBytes(\"row\")",
"modifier": "private",
"original_string": "private byte[] row = Bytes.toBytes(\"row\");",
"type": "byte[]",
"var_name": "row"
},
{
"declarator": "family = Bytes.toBytes(\"family\")",
"modifier": "private",
"original_string": "private byte[] family = Bytes.toBytes(\"family\");",
"type": "byte[]",
"var_name": "family"
},
{
"declarator": "qualifier = Bytes.toBytes(\"qualifier\")",
"modifier": "private",
"original_string": "private byte[] qualifier = Bytes.toBytes(\"qualifier\");",
"type": "byte[]",
"var_name": "qualifier"
},
{
"declarator": "value = Bytes.toBytes(\"value\")",
"modifier": "private",
"original_string": "private byte[] value = Bytes.toBytes(\"value\");",
"type": "byte[]",
"var_name": "value"
},
{
"declarator": "ts = 10",
"modifier": "private",
"original_string": "private long ts = 10;",
"type": "long",
"var_name": "ts"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/filter/TestApplyAndFilterDeletesFilter.java",
"identifier": "TestApplyAndFilterDeletesFilter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDeleteColumnCorrectlyCoversColumns() {\n ApplyAndFilterDeletesFilter filter = new ApplyAndFilterDeletesFilter(EMPTY_SET);\n KeyValue d = createKvForType(Type.DeleteColumn, 12);\n byte[] qual2 = Bytes.add(qualifier, Bytes.toBytes(\"-other\"));\n KeyValue put = new KeyValue(row, family, qual2, 11, Type.Put, value);\n\n assertEquals(\"Didn't filter out delete column\", ReturnCode.SKIP, filter.filterKeyValue(d));\n // different column put should still be visible\n assertEquals(\"Filtered out put with different column than the delete\", ReturnCode.INCLUDE,\n filter.filterKeyValue(put));\n\n // set a delete family, but in the past\n d = createKvForType(Type.DeleteFamily, 10);\n assertEquals(\"Didn't filter out delete column\", ReturnCode.SKIP, filter.filterKeyValue(d));\n // add back in the original delete column\n d = createKvForType(Type.DeleteColumn, 11);\n assertEquals(\"Didn't filter out delete column\", ReturnCode.SKIP, filter.filterKeyValue(d));\n // onto a different family, so that must be visible too\n assertEquals(\"Filtered out put with different column than the delete\", ReturnCode.INCLUDE,\n filter.filterKeyValue(put));\n }",
"class_method_signature": "TestApplyAndFilterDeletesFilter.testDeleteColumnCorrectlyCoversColumns()",
"constructor": false,
"full_signature": "@Test public void testDeleteColumnCorrectlyCoversColumns()",
"identifier": "testDeleteColumnCorrectlyCoversColumns",
"invocations": [
"createKvForType",
"add",
"toBytes",
"assertEquals",
"filterKeyValue",
"assertEquals",
"filterKeyValue",
"createKvForType",
"assertEquals",
"filterKeyValue",
"createKvForType",
"assertEquals",
"filterKeyValue",
"assertEquals",
"filterKeyValue"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testDeleteColumnCorrectlyCoversColumns()",
"testcase": true
} | {
"fields": [
{
"declarator": "families",
"modifier": "",
"original_string": "List<ImmutableBytesPtr> families;",
"type": "List<ImmutableBytesPtr>",
"var_name": "families"
},
{
"declarator": "coveringDelete = new DeleteTracker()",
"modifier": "private final",
"original_string": "private final DeleteTracker coveringDelete = new DeleteTracker();",
"type": "DeleteTracker",
"var_name": "coveringDelete"
},
{
"declarator": "currentHint",
"modifier": "private",
"original_string": "private Hinter currentHint;",
"type": "Hinter",
"var_name": "currentHint"
},
{
"declarator": "columnHint = new DeleteColumnHinter()",
"modifier": "private",
"original_string": "private DeleteColumnHinter columnHint = new DeleteColumnHinter();",
"type": "DeleteColumnHinter",
"var_name": "columnHint"
},
{
"declarator": "familyHint = new DeleteFamilyHinter()",
"modifier": "private",
"original_string": "private DeleteFamilyHinter familyHint = new DeleteFamilyHinter();",
"type": "DeleteFamilyHinter",
"var_name": "familyHint"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/filter/ApplyAndFilterDeletesFilter.java",
"identifier": "ApplyAndFilterDeletesFilter",
"interfaces": "",
"methods": [
{
"class_method_signature": "ApplyAndFilterDeletesFilter.ApplyAndFilterDeletesFilter(Set<ImmutableBytesPtr> families)",
"constructor": true,
"full_signature": "public ApplyAndFilterDeletesFilter(Set<ImmutableBytesPtr> families)",
"identifier": "ApplyAndFilterDeletesFilter",
"modifiers": "public",
"parameters": "(Set<ImmutableBytesPtr> families)",
"return": "",
"signature": " ApplyAndFilterDeletesFilter(Set<ImmutableBytesPtr> families)",
"testcase": false
},
{
"class_method_signature": "ApplyAndFilterDeletesFilter.getDeleteTracker()",
"constructor": false,
"full_signature": "public DeleteTracker getDeleteTracker()",
"identifier": "getDeleteTracker",
"modifiers": "public",
"parameters": "()",
"return": "DeleteTracker",
"signature": "DeleteTracker getDeleteTracker()",
"testcase": false
},
{
"class_method_signature": "ApplyAndFilterDeletesFilter.getNextFamily(ImmutableBytesPtr family)",
"constructor": false,
"full_signature": "private ImmutableBytesPtr getNextFamily(ImmutableBytesPtr family)",
"identifier": "getNextFamily",
"modifiers": "private",
"parameters": "(ImmutableBytesPtr family)",
"return": "ImmutableBytesPtr",
"signature": "ImmutableBytesPtr getNextFamily(ImmutableBytesPtr family)",
"testcase": false
},
{
"class_method_signature": "ApplyAndFilterDeletesFilter.reset()",
"constructor": false,
"full_signature": "@Override public void reset()",
"identifier": "reset",
"modifiers": "@Override public",
"parameters": "()",
"return": "void",
"signature": "void reset()",
"testcase": false
},
{
"class_method_signature": "ApplyAndFilterDeletesFilter.getNextCellHint(Cell peeked)",
"constructor": false,
"full_signature": "@Override public Cell getNextCellHint(Cell peeked)",
"identifier": "getNextCellHint",
"modifiers": "@Override public",
"parameters": "(Cell peeked)",
"return": "Cell",
"signature": "Cell getNextCellHint(Cell peeked)",
"testcase": false
},
{
"class_method_signature": "ApplyAndFilterDeletesFilter.filterKeyValue(Cell next)",
"constructor": false,
"full_signature": "@Override public ReturnCode filterKeyValue(Cell next)",
"identifier": "filterKeyValue",
"modifiers": "@Override public",
"parameters": "(Cell next)",
"return": "ReturnCode",
"signature": "ReturnCode filterKeyValue(Cell next)",
"testcase": false
}
],
"superclass": "extends FilterBase"
} | {
"body": "@Override\n public ReturnCode filterKeyValue(Cell next) {\n KeyValue nextKV = PhoenixKeyValueUtil.maybeCopyCell(next);\n switch (KeyValue.Type.codeToType(next.getTypeByte())) {\n /*\n * DeleteFamily will always sort first because those KVs (we assume) don't have qualifiers (or\n * rather are null). Therefore, we have to keep a hold of all the delete families until we get\n * to a Put entry that is covered by that delete (in which case, we are done with the family).\n */\n case DeleteFamily:\n // track the family to delete. If we are updating the delete, that means we have passed all\n // kvs in the last column, so we can safely ignore the last deleteFamily, and just use this\n // one. In fact, it means that all the previous deletes can be ignored because the family must\n // not match anymore.\n // We could potentially have multiple deleteFamily for the same row and family\n // (e.g. upsert row+family, delete it, upsert again, delete again),\n // in which case we keep the first one since its timestamp dominates\n if (coveringDelete.deleteFamily == null || !CellUtil.matchingFamily(coveringDelete.deleteFamily, nextKV)) {\n this.coveringDelete.reset();\n this.coveringDelete.deleteFamily = nextKV;\n }\n return ReturnCode.SKIP;\n case DeleteColumn:\n // similar to deleteFamily, all the newer deletes/puts would have been seen at this point, so\n // we can safely replace the more recent delete column with the more recent one\n this.coveringDelete.pointDelete = null;\n this.coveringDelete.deleteColumn = nextKV;\n return ReturnCode.SKIP;\n case Delete:\n // we are just deleting the single column value at this point.\n // therefore we just skip this entry and go onto the next one. The only caveat is that\n // we should still cover the next entry if this delete applies to the next entry, so we\n // have to keep around a reference to the KV to compare against the next valid entry\n this.coveringDelete.pointDelete = nextKV;\n return ReturnCode.SKIP;\n default:\n // no covering deletes\n if (coveringDelete.empty()) {\n return ReturnCode.INCLUDE;\n }\n\n if (coveringDelete.matchesFamily(nextKV)) {\n this.currentHint = familyHint;\n return ReturnCode.SEEK_NEXT_USING_HINT;\n }\n\n if (coveringDelete.matchesColumn(nextKV)) {\n // hint to the next column\n this.currentHint = columnHint;\n return ReturnCode.SEEK_NEXT_USING_HINT;\n }\n\n if (coveringDelete.matchesPoint(nextKV)) {\n return ReturnCode.SKIP;\n }\n\n }\n\n // none of the deletes matches, we are done\n return ReturnCode.INCLUDE;\n }",
"class_method_signature": "ApplyAndFilterDeletesFilter.filterKeyValue(Cell next)",
"constructor": false,
"full_signature": "@Override public ReturnCode filterKeyValue(Cell next)",
"identifier": "filterKeyValue",
"invocations": [
"maybeCopyCell",
"codeToType",
"getTypeByte",
"matchingFamily",
"reset",
"empty",
"matchesFamily",
"matchesColumn",
"matchesPoint"
],
"modifiers": "@Override public",
"parameters": "(Cell next)",
"return": "ReturnCode",
"signature": "ReturnCode filterKeyValue(Cell next)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_132 | {
"fields": [
{
"declarator": "overAllQueryMetrics",
"modifier": "private",
"original_string": "private OverAllQueryMetrics overAllQueryMetrics;",
"type": "OverAllQueryMetrics",
"var_name": "overAllQueryMetrics"
},
{
"declarator": "numParallelScans = 10L",
"modifier": "private static final",
"original_string": "private static final long numParallelScans = 10L;",
"type": "long",
"var_name": "numParallelScans"
},
{
"declarator": "delta = 1000L",
"modifier": "private static final",
"original_string": "private static final long delta = 1000L;",
"type": "long",
"var_name": "delta"
},
{
"declarator": "queryTimeouts = 5",
"modifier": "private static final",
"original_string": "private static final int queryTimeouts = 5;",
"type": "int",
"var_name": "queryTimeouts"
},
{
"declarator": "queryFailures = 8",
"modifier": "private static final",
"original_string": "private static final int queryFailures = 8;",
"type": "int",
"var_name": "queryFailures"
},
{
"declarator": "cacheRefreshesDueToSplits = 15",
"modifier": "private static final",
"original_string": "private static final int cacheRefreshesDueToSplits = 15;",
"type": "int",
"var_name": "cacheRefreshesDueToSplits"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/monitoring/OverAllQueryMetricsTest.java",
"identifier": "OverAllQueryMetricsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReset() {\n assertPublishedMetrics(overAllQueryMetrics.publish(), numParallelScans, queryTimeouts,\n queryFailures, cacheRefreshesDueToSplits, 0L);\n overAllQueryMetrics.reset();\n assertPublishedMetrics(overAllQueryMetrics.publish(), 0L, 0L, 0L, 0L, 0L);\n }",
"class_method_signature": "OverAllQueryMetricsTest.testReset()",
"constructor": false,
"full_signature": "@Test public void testReset()",
"identifier": "testReset",
"invocations": [
"assertPublishedMetrics",
"publish",
"reset",
"assertPublishedMetrics",
"publish"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testReset()",
"testcase": true
} | {
"fields": [
{
"declarator": "queryWatch",
"modifier": "private final",
"original_string": "private final MetricsStopWatch queryWatch;",
"type": "MetricsStopWatch",
"var_name": "queryWatch"
},
{
"declarator": "resultSetWatch",
"modifier": "private final",
"original_string": "private final MetricsStopWatch resultSetWatch;",
"type": "MetricsStopWatch",
"var_name": "resultSetWatch"
},
{
"declarator": "numParallelScans",
"modifier": "private final",
"original_string": "private final CombinableMetric numParallelScans;",
"type": "CombinableMetric",
"var_name": "numParallelScans"
},
{
"declarator": "wallClockTimeMS",
"modifier": "private final",
"original_string": "private final CombinableMetric wallClockTimeMS;",
"type": "CombinableMetric",
"var_name": "wallClockTimeMS"
},
{
"declarator": "resultSetTimeMS",
"modifier": "private final",
"original_string": "private final CombinableMetric resultSetTimeMS;",
"type": "CombinableMetric",
"var_name": "resultSetTimeMS"
},
{
"declarator": "queryTimedOut",
"modifier": "private final",
"original_string": "private final CombinableMetric queryTimedOut;",
"type": "CombinableMetric",
"var_name": "queryTimedOut"
},
{
"declarator": "queryFailed",
"modifier": "private final",
"original_string": "private final CombinableMetric queryFailed;",
"type": "CombinableMetric",
"var_name": "queryFailed"
},
{
"declarator": "cacheRefreshedDueToSplits",
"modifier": "private final",
"original_string": "private final CombinableMetric cacheRefreshedDueToSplits;",
"type": "CombinableMetric",
"var_name": "cacheRefreshedDueToSplits"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/monitoring/OverAllQueryMetrics.java",
"identifier": "OverAllQueryMetrics",
"interfaces": "",
"methods": [
{
"class_method_signature": "OverAllQueryMetrics.OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"constructor": true,
"full_signature": "public OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"identifier": "OverAllQueryMetrics",
"modifiers": "public",
"parameters": "(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"return": "",
"signature": " OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.updateNumParallelScans(long numParallelScans)",
"constructor": false,
"full_signature": "public void updateNumParallelScans(long numParallelScans)",
"identifier": "updateNumParallelScans",
"modifiers": "public",
"parameters": "(long numParallelScans)",
"return": "void",
"signature": "void updateNumParallelScans(long numParallelScans)",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.queryTimedOut()",
"constructor": false,
"full_signature": "public void queryTimedOut()",
"identifier": "queryTimedOut",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void queryTimedOut()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.queryFailed()",
"constructor": false,
"full_signature": "public void queryFailed()",
"identifier": "queryFailed",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void queryFailed()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.cacheRefreshedDueToSplits()",
"constructor": false,
"full_signature": "public void cacheRefreshedDueToSplits()",
"identifier": "cacheRefreshedDueToSplits",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void cacheRefreshedDueToSplits()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.startQuery()",
"constructor": false,
"full_signature": "public void startQuery()",
"identifier": "startQuery",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void startQuery()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.endQuery()",
"constructor": false,
"full_signature": "public void endQuery()",
"identifier": "endQuery",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void endQuery()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.startResultSetWatch()",
"constructor": false,
"full_signature": "public void startResultSetWatch()",
"identifier": "startResultSetWatch",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void startResultSetWatch()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.stopResultSetWatch()",
"constructor": false,
"full_signature": "public void stopResultSetWatch()",
"identifier": "stopResultSetWatch",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void stopResultSetWatch()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.getWallClockTimeMs()",
"constructor": false,
"full_signature": "@VisibleForTesting long getWallClockTimeMs()",
"identifier": "getWallClockTimeMs",
"modifiers": "@VisibleForTesting",
"parameters": "()",
"return": "long",
"signature": "long getWallClockTimeMs()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.getResultSetTimeMs()",
"constructor": false,
"full_signature": "@VisibleForTesting long getResultSetTimeMs()",
"identifier": "getResultSetTimeMs",
"modifiers": "@VisibleForTesting",
"parameters": "()",
"return": "long",
"signature": "long getResultSetTimeMs()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.publish()",
"constructor": false,
"full_signature": "public Map<MetricType, Long> publish()",
"identifier": "publish",
"modifiers": "public",
"parameters": "()",
"return": "Map<MetricType, Long>",
"signature": "Map<MetricType, Long> publish()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.reset()",
"constructor": false,
"full_signature": "public void reset()",
"identifier": "reset",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void reset()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.combine(OverAllQueryMetrics metric)",
"constructor": false,
"full_signature": "public OverAllQueryMetrics combine(OverAllQueryMetrics metric)",
"identifier": "combine",
"modifiers": "public",
"parameters": "(OverAllQueryMetrics metric)",
"return": "OverAllQueryMetrics",
"signature": "OverAllQueryMetrics combine(OverAllQueryMetrics metric)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public void reset() {\n numParallelScans.reset();\n wallClockTimeMS.reset();\n resultSetTimeMS.reset();\n queryTimedOut.reset();\n queryFailed.reset();\n cacheRefreshedDueToSplits.reset();\n queryWatch.stop();\n resultSetWatch.stop();\n }",
"class_method_signature": "OverAllQueryMetrics.reset()",
"constructor": false,
"full_signature": "public void reset()",
"identifier": "reset",
"invocations": [
"reset",
"reset",
"reset",
"reset",
"reset",
"reset",
"stop",
"stop"
],
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void reset()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_27 | {
"fields": [
{
"declarator": "MIN_VALUE = 1",
"modifier": "private static",
"original_string": "private static long MIN_VALUE = 1;",
"type": "long",
"var_name": "MIN_VALUE"
},
{
"declarator": "MAX_VALUE = 10",
"modifier": "private static",
"original_string": "private static long MAX_VALUE = 10;",
"type": "long",
"var_name": "MAX_VALUE"
},
{
"declarator": "CACHE_SIZE = 2",
"modifier": "private static",
"original_string": "private static long CACHE_SIZE = 2;",
"type": "long",
"var_name": "CACHE_SIZE"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/SequenceUtilTest.java",
"identifier": "SequenceUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBulkAllocationAscendingNextValueReachLimit() throws SQLException {\n assertFalse(SequenceUtil.checkIfLimitReached(6, MIN_VALUE, MAX_VALUE, 2/* incrementBy */, CACHE_SIZE, 2));\n }",
"class_method_signature": "SequenceUtilTest.testBulkAllocationAscendingNextValueReachLimit()",
"constructor": false,
"full_signature": "@Test public void testBulkAllocationAscendingNextValueReachLimit()",
"identifier": "testBulkAllocationAscendingNextValueReachLimit",
"invocations": [
"assertFalse",
"checkIfLimitReached"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testBulkAllocationAscendingNextValueReachLimit()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L",
"modifier": "public static final",
"original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;",
"type": "long",
"var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/SequenceUtil.java",
"identifier": "SequenceUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(SequenceInfo info)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(SequenceInfo info)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(SequenceInfo info)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(SequenceInfo info)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isBulkAllocation(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isBulkAllocation(long numToAllocate)",
"identifier": "isBulkAllocation",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isBulkAllocation(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isCycleAllowed(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isCycleAllowed(long numToAllocate)",
"identifier": "isCycleAllowed",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isCycleAllowed(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"constructor": false,
"full_signature": "public static SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"identifier": "getException",
"modifiers": "public static",
"parameters": "(String schemaName, String tableName,\n SQLExceptionCode code)",
"return": "SQLException",
"signature": "SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getLimitReachedErrorCode(boolean increasingSeq)",
"constructor": false,
"full_signature": "public static SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"identifier": "getLimitReachedErrorCode",
"modifiers": "public static",
"parameters": "(boolean increasingSeq)",
"return": "SQLExceptionCode",
"signature": "SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for overflow \n try {\n long incrementValue;\n if (isBulkAllocation(numToAllocate)) {\n // For bulk allocation we increment independent of cache size\n incrementValue = LongMath.checkedMultiply(incrementBy, numToAllocate);\n } else {\n incrementValue = LongMath.checkedMultiply(incrementBy, cacheSize);\n }\n nextValue = LongMath.checkedAdd(currentValue, incrementValue);\n } catch (ArithmeticException e) {\n return true;\n }\n\n // check if limit was reached\n\t\tif ((increasingSeq && nextValue > maxValue)\n\t\t\t\t|| (!increasingSeq && nextValue < minValue)) {\n return true;\n }\n return false;\n }",
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"invocations": [
"isBulkAllocation",
"checkedMultiply",
"checkedMultiply",
"checkedAdd"
],
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_2 | {
"fields": [
{
"declarator": "mockParser",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static XMLConfigParser mockParser;",
"type": "XMLConfigParser",
"var_name": "mockParser"
},
{
"declarator": "mockDMR",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static DataModelResult mockDMR;",
"type": "DataModelResult",
"var_name": "mockDMR"
},
{
"declarator": "mockRA",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static RulesApplier mockRA;",
"type": "RulesApplier",
"var_name": "mockRA"
},
{
"declarator": "mockTT",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static ThreadTime mockTT;",
"type": "ThreadTime",
"var_name": "mockTT"
},
{
"declarator": "mockScenario",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static Scenario mockScenario;",
"type": "Scenario",
"var_name": "mockScenario"
},
{
"declarator": "mockWE",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static WorkloadExecutor mockWE;",
"type": "WorkloadExecutor",
"var_name": "mockWE"
},
{
"declarator": "mockQuery",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static Query mockQuery;",
"type": "Query",
"var_name": "mockQuery"
},
{
"declarator": "mockRS",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static ResultSet mockRS;",
"type": "ResultSet",
"var_name": "mockRS"
}
],
"file": "phoenix-pherf/src/test/java/org/apache/phoenix/pherf/workload/MultiThreadedRunnerTest.java",
"identifier": "MultiThreadedRunnerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExpectedRowsMismatch() throws Exception {\n Mockito.when(mockQuery.getExpectedAggregateRowCount()).thenReturn(1L);\n MultiThreadedRunner mtr = new MultiThreadedRunner(\"test\",\n mockQuery, mockDMR, mockTT,\n 10L, 1000L,\n true, mockRA,\n mockScenario, mockWE, mockParser);\n Mockito.when(mockRS.next()).thenReturn(true);\n Mockito.when(mockRS.getLong(1)).thenReturn(2L);\n try {\n mtr.getResults(mockRS, \"test_iteration\", false,0L);\n fail();\n } catch (RuntimeException e) {\n //pass;\n }\n\n }",
"class_method_signature": "MultiThreadedRunnerTest.testExpectedRowsMismatch()",
"constructor": false,
"full_signature": "@Test public void testExpectedRowsMismatch()",
"identifier": "testExpectedRowsMismatch",
"invocations": [
"thenReturn",
"when",
"getExpectedAggregateRowCount",
"thenReturn",
"when",
"next",
"thenReturn",
"when",
"getLong",
"getResults",
"fail"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testExpectedRowsMismatch()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MultiThreadedRunner.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MultiThreadedRunner.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "query",
"modifier": "private",
"original_string": "private Query query;",
"type": "Query",
"var_name": "query"
},
{
"declarator": "threadTime",
"modifier": "private",
"original_string": "private ThreadTime threadTime;",
"type": "ThreadTime",
"var_name": "threadTime"
},
{
"declarator": "pUtil = PhoenixUtil.create()",
"modifier": "private",
"original_string": "private PhoenixUtil pUtil = PhoenixUtil.create();",
"type": "PhoenixUtil",
"var_name": "pUtil"
},
{
"declarator": "threadName",
"modifier": "private",
"original_string": "private String threadName;",
"type": "String",
"var_name": "threadName"
},
{
"declarator": "dataModelResult",
"modifier": "private",
"original_string": "private DataModelResult dataModelResult;",
"type": "DataModelResult",
"var_name": "dataModelResult"
},
{
"declarator": "numberOfExecutions",
"modifier": "private",
"original_string": "private long numberOfExecutions;",
"type": "long",
"var_name": "numberOfExecutions"
},
{
"declarator": "executionDurationInMs",
"modifier": "private",
"original_string": "private long executionDurationInMs;",
"type": "long",
"var_name": "executionDurationInMs"
},
{
"declarator": "lastResultWritten = EnvironmentEdgeManager.currentTimeMillis() - 1000",
"modifier": "private static",
"original_string": "private static long lastResultWritten = EnvironmentEdgeManager.currentTimeMillis() - 1000;",
"type": "long",
"var_name": "lastResultWritten"
},
{
"declarator": "resultManager",
"modifier": "private final",
"original_string": "private final ResultManager resultManager;",
"type": "ResultManager",
"var_name": "resultManager"
},
{
"declarator": "ruleApplier",
"modifier": "private final",
"original_string": "private final RulesApplier ruleApplier;",
"type": "RulesApplier",
"var_name": "ruleApplier"
},
{
"declarator": "scenario",
"modifier": "private final",
"original_string": "private final Scenario scenario;",
"type": "Scenario",
"var_name": "scenario"
},
{
"declarator": "workloadExecutor",
"modifier": "private final",
"original_string": "private final WorkloadExecutor workloadExecutor;",
"type": "WorkloadExecutor",
"var_name": "workloadExecutor"
},
{
"declarator": "parser",
"modifier": "private final",
"original_string": "private final XMLConfigParser parser;",
"type": "XMLConfigParser",
"var_name": "parser"
},
{
"declarator": "writeRuntimeResults",
"modifier": "private final",
"original_string": "private final boolean writeRuntimeResults;",
"type": "boolean",
"var_name": "writeRuntimeResults"
}
],
"file": "phoenix-pherf/src/main/java/org/apache/phoenix/pherf/workload/MultiThreadedRunner.java",
"identifier": "MultiThreadedRunner",
"interfaces": "implements Callable<Void>",
"methods": [
{
"class_method_signature": "MultiThreadedRunner.MultiThreadedRunner(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"constructor": true,
"full_signature": " MultiThreadedRunner(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"identifier": "MultiThreadedRunner",
"modifiers": "",
"parameters": "(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"return": "",
"signature": " MultiThreadedRunner(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.call()",
"constructor": false,
"full_signature": "@Override public Void call()",
"identifier": "call",
"modifiers": "@Override public",
"parameters": "()",
"return": "Void",
"signature": "Void call()",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.getThreadTime()",
"constructor": false,
"full_signature": "private synchronized ThreadTime getThreadTime()",
"identifier": "getThreadTime",
"modifiers": "private synchronized",
"parameters": "()",
"return": "ThreadTime",
"signature": "ThreadTime getThreadTime()",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.timedQuery(long iterationNumber)",
"constructor": false,
"full_signature": "private boolean timedQuery(long iterationNumber)",
"identifier": "timedQuery",
"modifiers": "private",
"parameters": "(long iterationNumber)",
"return": "boolean",
"signature": "boolean timedQuery(long iterationNumber)",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"constructor": false,
"full_signature": "@VisibleForTesting Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"identifier": "getResults",
"modifiers": "@VisibleForTesting",
"parameters": "(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"return": "Pair<Long, Long>",
"signature": "Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting\n /**\n * @return a Pair whose first value is the resultRowCount, and whose second value is whether the query timed out.\n */\n Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime) throws Exception {\n Long resultRowCount = 0L;\n while (rs.next()) {\n if (null != query.getExpectedAggregateRowCount()) {\n if (rs.getLong(1) != query.getExpectedAggregateRowCount())\n throw new RuntimeException(\n \"Aggregate count \" + rs.getLong(1) + \" does not match expected \"\n + query.getExpectedAggregateRowCount());\n }\n\n if (isSelectCountStatement) {\n resultRowCount = rs.getLong(1);\n } else {\n resultRowCount++;\n }\n long queryElapsedTime = EnvironmentEdgeManager.currentTimeMillis() - queryStartTime;\n if (queryElapsedTime >= query.getTimeoutDuration()) {\n LOGGER.error(\"Query \" + queryIteration + \" exceeded timeout of \"\n + query.getTimeoutDuration() + \" ms at \" + queryElapsedTime + \" ms.\");\n return new Pair(resultRowCount, queryElapsedTime);\n }\n }\n return new Pair(resultRowCount, EnvironmentEdgeManager.currentTimeMillis() - queryStartTime);\n }",
"class_method_signature": "MultiThreadedRunner.getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"constructor": false,
"full_signature": "@VisibleForTesting Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"identifier": "getResults",
"invocations": [
"next",
"getExpectedAggregateRowCount",
"getLong",
"getExpectedAggregateRowCount",
"getLong",
"getExpectedAggregateRowCount",
"getLong",
"currentTimeMillis",
"getTimeoutDuration",
"error",
"getTimeoutDuration",
"currentTimeMillis"
],
"modifiers": "@VisibleForTesting",
"parameters": "(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"return": "Pair<Long, Long>",
"signature": "Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_165 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/cache/JodaTimezoneCacheTest.java",
"identifier": "JodaTimezoneCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetInstanceImmutableBytesWritable() {\n ImmutableBytesWritable ptr = new ImmutableBytesWritable(Bytes.toBytes(\"Europe/Isle_of_Man\"));\n DateTimeZone instance = JodaTimezoneCache.getInstance(ptr);\n assertNotNull(instance);\n }",
"class_method_signature": "JodaTimezoneCacheTest.testGetInstanceImmutableBytesWritable()",
"constructor": false,
"full_signature": "@Test public void testGetInstanceImmutableBytesWritable()",
"identifier": "testGetInstanceImmutableBytesWritable",
"invocations": [
"toBytes",
"getInstance",
"assertNotNull"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetInstanceImmutableBytesWritable()",
"testcase": true
} | {
"fields": [
{
"declarator": "CACHE_EXPRIRE_TIME_MINUTES = 10",
"modifier": "public static final",
"original_string": "public static final int CACHE_EXPRIRE_TIME_MINUTES = 10;",
"type": "int",
"var_name": "CACHE_EXPRIRE_TIME_MINUTES"
},
{
"declarator": "cachedJodaTimeZones = createTimezoneCache()",
"modifier": "private static final",
"original_string": "private static final LoadingCache<ByteBuffer, DateTimeZone> cachedJodaTimeZones = createTimezoneCache();",
"type": "LoadingCache<ByteBuffer, DateTimeZone>",
"var_name": "cachedJodaTimeZones"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/cache/JodaTimezoneCache.java",
"identifier": "JodaTimezoneCache",
"interfaces": "",
"methods": [
{
"class_method_signature": "JodaTimezoneCache.getInstance(ByteBuffer timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ByteBuffer timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(ByteBuffer timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ByteBuffer timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.getInstance(ImmutableBytesWritable timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ImmutableBytesWritable timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(ImmutableBytesWritable timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ImmutableBytesWritable timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.getInstance(String timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(String timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(String timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(String timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.createTimezoneCache()",
"constructor": false,
"full_signature": "private static LoadingCache<ByteBuffer, DateTimeZone> createTimezoneCache()",
"identifier": "createTimezoneCache",
"modifiers": "private static",
"parameters": "()",
"return": "LoadingCache<ByteBuffer, DateTimeZone>",
"signature": "LoadingCache<ByteBuffer, DateTimeZone> createTimezoneCache()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static DateTimeZone getInstance(ByteBuffer timezoneId) {\n try {\n return cachedJodaTimeZones.get(timezoneId);\n } catch (ExecutionException ex) {\n throw new IllegalDataException(ex);\n } catch (UncheckedExecutionException e) {\n throw new IllegalDataException(\"Unknown timezone \" + Bytes.toString(timezoneId.array()));\n }\n }",
"class_method_signature": "JodaTimezoneCache.getInstance(ByteBuffer timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ByteBuffer timezoneId)",
"identifier": "getInstance",
"invocations": [
"get",
"toString",
"array"
],
"modifiers": "public static",
"parameters": "(ByteBuffer timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ByteBuffer timezoneId)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_70 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/PhoenixMRJobUtilTest.java",
"identifier": "PhoenixMRJobUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetRMHostName(){\n Configuration config = HBaseConfiguration.create();\n String testRMAddress = \"testRMhostName:portnumber\";\n\n String address = PhoenixMRJobUtil.getRMWebAddress(config);\n assertEquals(YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS, address);\n\n config.set(YarnConfiguration.RM_WEBAPP_ADDRESS, testRMAddress);\n address = PhoenixMRJobUtil.getRMWebAddress(config);\n assertEquals(testRMAddress, address);\n\n //HA mode\n address = PhoenixMRJobUtil.getRMWebAddress(config, \"rm11\");\n assertEquals(YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS, address);\n\n config.set(YarnConfiguration.RM_WEBAPP_ADDRESS + \".rm11\", testRMAddress);\n address = PhoenixMRJobUtil.getRMWebAddress(config, \"rm11\");\n assertEquals(testRMAddress, address);\n }",
"class_method_signature": "PhoenixMRJobUtilTest.testGetRMHostName()",
"constructor": false,
"full_signature": "@Test public void testGetRMHostName()",
"identifier": "testGetRMHostName",
"invocations": [
"create",
"getRMWebAddress",
"assertEquals",
"set",
"getRMWebAddress",
"assertEquals",
"getRMWebAddress",
"assertEquals",
"set",
"getRMWebAddress",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetRMHostName()",
"testcase": true
} | {
"fields": [
{
"declarator": "YARN_LEADER_ELECTION = \"/yarn-leader-election\"",
"modifier": "private static final",
"original_string": "private static final String YARN_LEADER_ELECTION = \"/yarn-leader-election\";",
"type": "String",
"var_name": "YARN_LEADER_ELECTION"
},
{
"declarator": "ACTIVE_STANDBY_ELECTOR_LOCK = \"ActiveStandbyElectorLock\"",
"modifier": "private static final",
"original_string": "private static final String ACTIVE_STANDBY_ELECTOR_LOCK = \"ActiveStandbyElectorLock\";",
"type": "String",
"var_name": "ACTIVE_STANDBY_ELECTOR_LOCK"
},
{
"declarator": "RM_APPS_GET_ENDPOINT = \"/ws/v1/cluster/apps\"",
"modifier": "private static final",
"original_string": "private static final String RM_APPS_GET_ENDPOINT = \"/ws/v1/cluster/apps\";",
"type": "String",
"var_name": "RM_APPS_GET_ENDPOINT"
},
{
"declarator": "PHOENIX_INDEX_MR_QUEUE_NAME_PROPERTY =\n \"phoenix.index.mr.scheduler.capacity.queuename\"",
"modifier": "public static final",
"original_string": "public static final String PHOENIX_INDEX_MR_QUEUE_NAME_PROPERTY =\n \"phoenix.index.mr.scheduler.capacity.queuename\";",
"type": "String",
"var_name": "PHOENIX_INDEX_MR_QUEUE_NAME_PROPERTY"
},
{
"declarator": "PHOENIX_INDEX_MR_MAP_MEMORY_PROPERTY =\n \"phoenix.index.mr.scheduler.capacity.mapMemoryMB\"",
"modifier": "public static final",
"original_string": "public static final String PHOENIX_INDEX_MR_MAP_MEMORY_PROPERTY =\n \"phoenix.index.mr.scheduler.capacity.mapMemoryMB\";",
"type": "String",
"var_name": "PHOENIX_INDEX_MR_MAP_MEMORY_PROPERTY"
},
{
"declarator": "PHOENIX_MR_CONCURRENT_MAP_LIMIT_PROPERTY =\n \t\t\"phoenix.mr.concurrent.map.limit\"",
"modifier": "public static final",
"original_string": "public static final String PHOENIX_MR_CONCURRENT_MAP_LIMIT_PROPERTY =\n \t\t\"phoenix.mr.concurrent.map.limit\";",
"type": "String",
"var_name": "PHOENIX_MR_CONCURRENT_MAP_LIMIT_PROPERTY"
},
{
"declarator": "DEFAULT_QUEUE_NAME = \"default\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_QUEUE_NAME = \"default\";",
"type": "String",
"var_name": "DEFAULT_QUEUE_NAME"
},
{
"declarator": "DEFAULT_MR_CONCURRENT_MAP_LIMIT = 20",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_MR_CONCURRENT_MAP_LIMIT = 20;",
"type": "int",
"var_name": "DEFAULT_MR_CONCURRENT_MAP_LIMIT"
},
{
"declarator": "DEFAULT_MAP_MEMROY_MB = 5120",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_MAP_MEMROY_MB = 5120;",
"type": "int",
"var_name": "DEFAULT_MAP_MEMROY_MB"
},
{
"declarator": "XMX_OPT = \"-Xmx\"",
"modifier": "public static final",
"original_string": "public static final String XMX_OPT = \"-Xmx\";",
"type": "String",
"var_name": "XMX_OPT"
},
{
"declarator": "RM_HTTP_SCHEME = \"http\"",
"modifier": "public static final",
"original_string": "public static final String RM_HTTP_SCHEME = \"http\";",
"type": "String",
"var_name": "RM_HTTP_SCHEME"
},
{
"declarator": "RM_CONNECT_TIMEOUT_MILLIS = 10 * 1000",
"modifier": "public static final",
"original_string": "public static final int RM_CONNECT_TIMEOUT_MILLIS = 10 * 1000;",
"type": "int",
"var_name": "RM_CONNECT_TIMEOUT_MILLIS"
},
{
"declarator": "RM_READ_TIMEOUT_MILLIS = 10 * 60 * 1000",
"modifier": "public static final",
"original_string": "public static final int RM_READ_TIMEOUT_MILLIS = 10 * 60 * 1000;",
"type": "int",
"var_name": "RM_READ_TIMEOUT_MILLIS"
},
{
"declarator": "LOGGER = LoggerFactory.getLogger(PhoenixMRJobUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PhoenixMRJobUtil.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "PHOENIX_MR_SCHEDULER_TYPE_NAME = \"phoenix.index.mr.scheduler.type\"",
"modifier": "public static final",
"original_string": "public static final String PHOENIX_MR_SCHEDULER_TYPE_NAME = \"phoenix.index.mr.scheduler.type\";",
"type": "String",
"var_name": "PHOENIX_MR_SCHEDULER_TYPE_NAME"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixMRJobUtil.java",
"identifier": "PhoenixMRJobUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "PhoenixMRJobUtil.getRMWebAddress(Configuration config)",
"constructor": false,
"full_signature": "public static String getRMWebAddress(Configuration config)",
"identifier": "getRMWebAddress",
"modifiers": "public static",
"parameters": "(Configuration config)",
"return": "String",
"signature": "String getRMWebAddress(Configuration config)",
"testcase": false
},
{
"class_method_signature": "PhoenixMRJobUtil.getRMWebAddress(Configuration config, String Rmid)",
"constructor": false,
"full_signature": "public static String getRMWebAddress(Configuration config, String Rmid)",
"identifier": "getRMWebAddress",
"modifiers": "public static",
"parameters": "(Configuration config, String Rmid)",
"return": "String",
"signature": "String getRMWebAddress(Configuration config, String Rmid)",
"testcase": false
},
{
"class_method_signature": "PhoenixMRJobUtil.getActiveResourceManagerAddress(Configuration config, String zkQuorum)",
"constructor": false,
"full_signature": "public static String getActiveResourceManagerAddress(Configuration config, String zkQuorum)",
"identifier": "getActiveResourceManagerAddress",
"modifiers": "public static",
"parameters": "(Configuration config, String zkQuorum)",
"return": "String",
"signature": "String getActiveResourceManagerAddress(Configuration config, String zkQuorum)",
"testcase": false
},
{
"class_method_signature": "PhoenixMRJobUtil.getJobsInformationFromRM(String rmAddress,\n Map<String, String> urlParams)",
"constructor": false,
"full_signature": "public static String getJobsInformationFromRM(String rmAddress,\n Map<String, String> urlParams)",
"identifier": "getJobsInformationFromRM",
"modifiers": "public static",
"parameters": "(String rmAddress,\n Map<String, String> urlParams)",
"return": "String",
"signature": "String getJobsInformationFromRM(String rmAddress,\n Map<String, String> urlParams)",
"testcase": false
},
{
"class_method_signature": "PhoenixMRJobUtil.getTextContent(InputStream is)",
"constructor": false,
"full_signature": "public static String getTextContent(InputStream is)",
"identifier": "getTextContent",
"modifiers": "public static",
"parameters": "(InputStream is)",
"return": "String",
"signature": "String getTextContent(InputStream is)",
"testcase": false
},
{
"class_method_signature": "PhoenixMRJobUtil.shutdown(ExecutorService pool)",
"constructor": false,
"full_signature": "public static void shutdown(ExecutorService pool)",
"identifier": "shutdown",
"modifiers": "public static",
"parameters": "(ExecutorService pool)",
"return": "void",
"signature": "void shutdown(ExecutorService pool)",
"testcase": false
},
{
"class_method_signature": "PhoenixMRJobUtil.updateCapacityQueueInfo(Configuration conf)",
"constructor": false,
"full_signature": "public static void updateCapacityQueueInfo(Configuration conf)",
"identifier": "updateCapacityQueueInfo",
"modifiers": "public static",
"parameters": "(Configuration conf)",
"return": "void",
"signature": "void updateCapacityQueueInfo(Configuration conf)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String getRMWebAddress(Configuration config){\n return config.get(YarnConfiguration.RM_WEBAPP_ADDRESS,\n YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS);\n }",
"class_method_signature": "PhoenixMRJobUtil.getRMWebAddress(Configuration config)",
"constructor": false,
"full_signature": "public static String getRMWebAddress(Configuration config)",
"identifier": "getRMWebAddress",
"invocations": [
"get"
],
"modifiers": "public static",
"parameters": "(Configuration config)",
"return": "String",
"signature": "String getRMWebAddress(Configuration config)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_149 | {
"fields": [
{
"declarator": "SCRUTINY_TIME_MILLIS = 1502908914193L",
"modifier": "private static final",
"original_string": "private static final long SCRUTINY_TIME_MILLIS = 1502908914193L;",
"type": "long",
"var_name": "SCRUTINY_TIME_MILLIS"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/mapreduce/index/IndexScrutinyTableOutputTest.java",
"identifier": "IndexScrutinyTableOutputTest",
"interfaces": "",
"superclass": "extends BaseIndexTest"
} | {
"body": "@Test\n public void testGetSqlQueryBadCoveredColVal() throws SQLException {\n SourceTargetColumnNames columnNames =\n new SourceTargetColumnNames.DataSourceColNames(pDataTable, pIndexTable);\n String query =\n IndexScrutinyTableOutput.getSqlQueryBadCoveredColVal(conn, columnNames,\n SCRUTINY_TIME_MILLIS);\n assertEquals(\"SELECT \\\"SOURCE_TABLE\\\" , \\\"TARGET_TABLE\\\" , \\\"SCRUTINY_EXECUTE_TIME\\\" , \\\"SOURCE_ROW_PK_HASH\\\" , \\\"SOURCE_TS\\\" , \\\"TARGET_TS\\\" , \\\"HAS_TARGET_ROW\\\" , \\\"BEYOND_MAX_LOOKBACK\\\" , \\\"ID\\\" , \\\"PK_PART2\\\" , \\\"NAME\\\" , \\\"ZIP\\\" , \\\":ID\\\" , \\\":PK_PART2\\\" , \\\"0:NAME\\\" , \\\"0:ZIP\\\" FROM PHOENIX_INDEX_SCRUTINY(\\\"ID\\\" INTEGER,\\\"PK_PART2\\\" TINYINT,\\\"NAME\\\" VARCHAR,\\\"ZIP\\\" BIGINT,\\\":ID\\\" INTEGER,\\\":PK_PART2\\\" TINYINT,\\\"0:NAME\\\" VARCHAR,\\\"0:ZIP\\\" BIGINT) WHERE (\\\"SOURCE_TABLE\\\",\\\"TARGET_TABLE\\\",\\\"SCRUTINY_EXECUTE_TIME\\\", \\\"HAS_TARGET_ROW\\\") IN (('TEST_SCHEMA.TEST_INDEX_COLUMN_NAMES_UTIL','TEST_SCHEMA.TEST_ICN_INDEX',1502908914193,true))\",\n query);\n }",
"class_method_signature": "IndexScrutinyTableOutputTest.testGetSqlQueryBadCoveredColVal()",
"constructor": false,
"full_signature": "@Test public void testGetSqlQueryBadCoveredColVal()",
"identifier": "testGetSqlQueryBadCoveredColVal",
"invocations": [
"getSqlQueryBadCoveredColVal",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetSqlQueryBadCoveredColVal()",
"testcase": true
} | {
"fields": [
{
"declarator": "OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\"",
"modifier": "public static",
"original_string": "public static String OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\";",
"type": "String",
"var_name": "OUTPUT_TABLE_NAME"
},
{
"declarator": "SCRUTINY_EXECUTE_TIME_COL_NAME = \"SCRUTINY_EXECUTE_TIME\"",
"modifier": "public static final",
"original_string": "public static final String SCRUTINY_EXECUTE_TIME_COL_NAME = \"SCRUTINY_EXECUTE_TIME\";",
"type": "String",
"var_name": "SCRUTINY_EXECUTE_TIME_COL_NAME"
},
{
"declarator": "TARGET_TABLE_COL_NAME = \"TARGET_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String TARGET_TABLE_COL_NAME = \"TARGET_TABLE\";",
"type": "String",
"var_name": "TARGET_TABLE_COL_NAME"
},
{
"declarator": "SOURCE_TABLE_COL_NAME = \"SOURCE_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String SOURCE_TABLE_COL_NAME = \"SOURCE_TABLE\";",
"type": "String",
"var_name": "SOURCE_TABLE_COL_NAME"
},
{
"declarator": "OUTPUT_TABLE_DDL =\n \"CREATE TABLE IF NOT EXISTS \" + OUTPUT_TABLE_NAME + \"\\n\" +\n \"(\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \" BIGINT NOT NULL,\\n\" +\n \" SOURCE_ROW_PK_HASH VARCHAR NOT NULL,\\n\" +\n \" SOURCE_TS BIGINT,\\n\" +\n \" TARGET_TS BIGINT,\\n\" +\n \" HAS_TARGET_ROW BOOLEAN,\\n\" +\n \" BEYOND_MAX_LOOKBACK BOOLEAN,\\n\" +\n \" CONSTRAINT PK PRIMARY KEY\\n\" +\n \" (\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \",\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \",\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \",\\n\" + // time at which the scrutiny ran\n \" SOURCE_ROW_PK_HASH\\n\" + // this hash makes the PK unique\n \" )\\n\" + // dynamic columns consisting of the source and target columns will follow\n \") COLUMN_ENCODED_BYTES = 0 \"",
"modifier": "public static final",
"original_string": "public static final String OUTPUT_TABLE_DDL =\n \"CREATE TABLE IF NOT EXISTS \" + OUTPUT_TABLE_NAME + \"\\n\" +\n \"(\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \" BIGINT NOT NULL,\\n\" +\n \" SOURCE_ROW_PK_HASH VARCHAR NOT NULL,\\n\" +\n \" SOURCE_TS BIGINT,\\n\" +\n \" TARGET_TS BIGINT,\\n\" +\n \" HAS_TARGET_ROW BOOLEAN,\\n\" +\n \" BEYOND_MAX_LOOKBACK BOOLEAN,\\n\" +\n \" CONSTRAINT PK PRIMARY KEY\\n\" +\n \" (\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \",\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \",\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \",\\n\" + // time at which the scrutiny ran\n \" SOURCE_ROW_PK_HASH\\n\" + // this hash makes the PK unique\n \" )\\n\" + // dynamic columns consisting of the source and target columns will follow\n \") COLUMN_ENCODED_BYTES = 0 \";",
"type": "String",
"var_name": "OUTPUT_TABLE_DDL"
},
{
"declarator": "OUTPUT_TABLE_BEYOND_LOOKBACK_DDL = \"\" +\n \"ALTER TABLE \" + OUTPUT_TABLE_NAME + \"\\n\" +\n \" ADD IF NOT EXISTS BEYOND_MAX_LOOKBACK BOOLEAN\"",
"modifier": "public static final",
"original_string": "public static final String OUTPUT_TABLE_BEYOND_LOOKBACK_DDL = \"\" +\n \"ALTER TABLE \" + OUTPUT_TABLE_NAME + \"\\n\" +\n \" ADD IF NOT EXISTS BEYOND_MAX_LOOKBACK BOOLEAN\";",
"type": "String",
"var_name": "OUTPUT_TABLE_BEYOND_LOOKBACK_DDL"
},
{
"declarator": "OUTPUT_METADATA_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY_METADATA\"",
"modifier": "public static final",
"original_string": "public static final String OUTPUT_METADATA_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY_METADATA\";",
"type": "String",
"var_name": "OUTPUT_METADATA_TABLE_NAME"
},
{
"declarator": "OUTPUT_METADATA_DDL =\n \"CREATE TABLE IF NOT EXISTS \" + OUTPUT_METADATA_TABLE_NAME + \"\\n\" +\n \"(\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \" BIGINT NOT NULL,\\n\" +\n \" SOURCE_TYPE VARCHAR,\\n\" + // source is either data or index table\n \" CMD_LINE_ARGS VARCHAR,\\n\" + // arguments the tool was run with\n \" INPUT_RECORDS BIGINT,\\n\" +\n \" FAILED_RECORDS BIGINT,\\n\" +\n \" VALID_ROW_COUNT BIGINT,\\n\" +\n \" INVALID_ROW_COUNT BIGINT,\\n\" +\n \" INCORRECT_COVERED_COL_VAL_COUNT BIGINT,\\n\" +\n \" BATCHES_PROCESSED_COUNT BIGINT,\\n\" +\n \" SOURCE_DYNAMIC_COLS VARCHAR,\\n\" +\n \" TARGET_DYNAMIC_COLS VARCHAR,\\n\" +\n \" INVALID_ROWS_QUERY_ALL VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows from the output table\n \" INVALID_ROWS_QUERY_MISSING_TARGET VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows which are missing a target row\n \" INVALID_ROWS_QUERY_BAD_COVERED_COL_VAL VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows which have bad covered column values\n \" INVALID_ROWS_QUERY_BEYOND_MAX_LOOKBACK VARCHAR,\\n\" + // stored sql query to fetch all the potentially invalid rows which are before max lookback age\n \" BEYOND_MAX_LOOKBACK_COUNT BIGINT,\\n\" +\n \" CONSTRAINT PK PRIMARY KEY\\n\" +\n \" (\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \",\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \",\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \"\\n\" +\n \" )\\n\" +\n \")\\n\"",
"modifier": "public static final",
"original_string": "public static final String OUTPUT_METADATA_DDL =\n \"CREATE TABLE IF NOT EXISTS \" + OUTPUT_METADATA_TABLE_NAME + \"\\n\" +\n \"(\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \" BIGINT NOT NULL,\\n\" +\n \" SOURCE_TYPE VARCHAR,\\n\" + // source is either data or index table\n \" CMD_LINE_ARGS VARCHAR,\\n\" + // arguments the tool was run with\n \" INPUT_RECORDS BIGINT,\\n\" +\n \" FAILED_RECORDS BIGINT,\\n\" +\n \" VALID_ROW_COUNT BIGINT,\\n\" +\n \" INVALID_ROW_COUNT BIGINT,\\n\" +\n \" INCORRECT_COVERED_COL_VAL_COUNT BIGINT,\\n\" +\n \" BATCHES_PROCESSED_COUNT BIGINT,\\n\" +\n \" SOURCE_DYNAMIC_COLS VARCHAR,\\n\" +\n \" TARGET_DYNAMIC_COLS VARCHAR,\\n\" +\n \" INVALID_ROWS_QUERY_ALL VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows from the output table\n \" INVALID_ROWS_QUERY_MISSING_TARGET VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows which are missing a target row\n \" INVALID_ROWS_QUERY_BAD_COVERED_COL_VAL VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows which have bad covered column values\n \" INVALID_ROWS_QUERY_BEYOND_MAX_LOOKBACK VARCHAR,\\n\" + // stored sql query to fetch all the potentially invalid rows which are before max lookback age\n \" BEYOND_MAX_LOOKBACK_COUNT BIGINT,\\n\" +\n \" CONSTRAINT PK PRIMARY KEY\\n\" +\n \" (\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \",\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \",\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \"\\n\" +\n \" )\\n\" +\n \")\\n\";",
"type": "String",
"var_name": "OUTPUT_METADATA_DDL"
},
{
"declarator": "OUTPUT_METADATA_BEYOND_LOOKBACK_COUNTER_DDL = \"\" +\n \"ALTER TABLE \" + OUTPUT_METADATA_TABLE_NAME + \"\\n\" +\n \" ADD IF NOT EXISTS INVALID_ROWS_QUERY_BEYOND_MAX_LOOKBACK VARCHAR, \\n\" +\n \" BEYOND_MAX_LOOKBACK_COUNT BIGINT\"",
"modifier": "public static final",
"original_string": "public static final String OUTPUT_METADATA_BEYOND_LOOKBACK_COUNTER_DDL = \"\" +\n \"ALTER TABLE \" + OUTPUT_METADATA_TABLE_NAME + \"\\n\" +\n \" ADD IF NOT EXISTS INVALID_ROWS_QUERY_BEYOND_MAX_LOOKBACK VARCHAR, \\n\" +\n \" BEYOND_MAX_LOOKBACK_COUNT BIGINT\";",
"type": "String",
"var_name": "OUTPUT_METADATA_BEYOND_LOOKBACK_COUNTER_DDL"
},
{
"declarator": "UPSERT_METADATA_SQL = \"UPSERT INTO \" + OUTPUT_METADATA_TABLE_NAME + \" VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\"",
"modifier": "public static final",
"original_string": "public static final String UPSERT_METADATA_SQL = \"UPSERT INTO \" + OUTPUT_METADATA_TABLE_NAME + \" VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";",
"type": "String",
"var_name": "UPSERT_METADATA_SQL"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexScrutinyTableOutput.java",
"identifier": "IndexScrutinyTableOutput",
"interfaces": "",
"methods": [
{
"class_method_signature": "IndexScrutinyTableOutput.constructOutputTableUpsert(List<String> sourceDynamicCols,\n List<String> targetDynamicCols, Connection connection)",
"constructor": false,
"full_signature": "public static String constructOutputTableUpsert(List<String> sourceDynamicCols,\n List<String> targetDynamicCols, Connection connection)",
"identifier": "constructOutputTableUpsert",
"modifiers": "public static",
"parameters": "(List<String> sourceDynamicCols,\n List<String> targetDynamicCols, Connection connection)",
"return": "String",
"signature": "String constructOutputTableUpsert(List<String> sourceDynamicCols,\n List<String> targetDynamicCols, Connection connection)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getSqlQueryAllInvalidRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static String getSqlQueryAllInvalidRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"identifier": "getSqlQueryAllInvalidRows",
"modifiers": "public static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"return": "String",
"signature": "String getSqlQueryAllInvalidRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getSqlQueryMissingTargetRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static String getSqlQueryMissingTargetRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"identifier": "getSqlQueryMissingTargetRows",
"modifiers": "public static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"return": "String",
"signature": "String getSqlQueryMissingTargetRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getSqlQueryBadCoveredColVal(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static String getSqlQueryBadCoveredColVal(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"identifier": "getSqlQueryBadCoveredColVal",
"modifiers": "public static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"return": "String",
"signature": "String getSqlQueryBadCoveredColVal(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getSqlQueryBeyondMaxLookback(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static String getSqlQueryBeyondMaxLookback(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"identifier": "getSqlQueryBeyondMaxLookback",
"modifiers": "public static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"return": "String",
"signature": "String getSqlQueryBeyondMaxLookback(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.queryMetadata(Connection conn, List<String> selectCols,\n String qSourceTableName, String qTargetTableName, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static ResultSet queryMetadata(Connection conn, List<String> selectCols,\n String qSourceTableName, String qTargetTableName, long scrutinyTimeMillis)",
"identifier": "queryMetadata",
"modifiers": "public static",
"parameters": "(Connection conn, List<String> selectCols,\n String qSourceTableName, String qTargetTableName, long scrutinyTimeMillis)",
"return": "ResultSet",
"signature": "ResultSet queryMetadata(Connection conn, List<String> selectCols,\n String qSourceTableName, String qTargetTableName, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.queryAllLatestMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName)",
"constructor": false,
"full_signature": "public static ResultSet queryAllLatestMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName)",
"identifier": "queryAllLatestMetadata",
"modifiers": "public static",
"parameters": "(Connection conn, String qSourceTableName,\n String qTargetTableName)",
"return": "ResultSet",
"signature": "ResultSet queryAllLatestMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.queryAllMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static ResultSet queryAllMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName, long scrutinyTimeMillis)",
"identifier": "queryAllMetadata",
"modifiers": "public static",
"parameters": "(Connection conn, String qSourceTableName,\n String qTargetTableName, long scrutinyTimeMillis)",
"return": "ResultSet",
"signature": "ResultSet queryAllMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.writeJobResults(Connection conn, String[] cmdLineArgs, List<Job> completedJobs)",
"constructor": false,
"full_signature": "public static void writeJobResults(Connection conn, String[] cmdLineArgs, List<Job> completedJobs)",
"identifier": "writeJobResults",
"modifiers": "public static",
"parameters": "(Connection conn, String[] cmdLineArgs, List<Job> completedJobs)",
"return": "void",
"signature": "void writeJobResults(Connection conn, String[] cmdLineArgs, List<Job> completedJobs)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.constructMetadataParamQuery(List<String> metadataSelectCols)",
"constructor": false,
"full_signature": "static String constructMetadataParamQuery(List<String> metadataSelectCols)",
"identifier": "constructMetadataParamQuery",
"modifiers": "static",
"parameters": "(List<String> metadataSelectCols)",
"return": "String",
"signature": "String constructMetadataParamQuery(List<String> metadataSelectCols)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getAllInvalidParamQuery(Connection conn,\n SourceTargetColumnNames columnNames)",
"constructor": false,
"full_signature": "private static String getAllInvalidParamQuery(Connection conn,\n SourceTargetColumnNames columnNames)",
"identifier": "getAllInvalidParamQuery",
"modifiers": "private static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames)",
"return": "String",
"signature": "String getAllInvalidParamQuery(Connection conn,\n SourceTargetColumnNames columnNames)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.bindPkCols(SourceTargetColumnNames columnNames, long scrutinyTimeMillis,\n String paramQuery)",
"constructor": false,
"full_signature": "private static String bindPkCols(SourceTargetColumnNames columnNames, long scrutinyTimeMillis,\n String paramQuery)",
"identifier": "bindPkCols",
"modifiers": "private static",
"parameters": "(SourceTargetColumnNames columnNames, long scrutinyTimeMillis,\n String paramQuery)",
"return": "String",
"signature": "String bindPkCols(SourceTargetColumnNames columnNames, long scrutinyTimeMillis,\n String paramQuery)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getHasTargetRowQuery(Connection conn, SourceTargetColumnNames columnNames,\n long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "private static String getHasTargetRowQuery(Connection conn, SourceTargetColumnNames columnNames,\n long scrutinyTimeMillis)",
"identifier": "getHasTargetRowQuery",
"modifiers": "private static",
"parameters": "(Connection conn, SourceTargetColumnNames columnNames,\n long scrutinyTimeMillis)",
"return": "String",
"signature": "String getHasTargetRowQuery(Connection conn, SourceTargetColumnNames columnNames,\n long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getPksCsv()",
"constructor": false,
"full_signature": "private static String getPksCsv()",
"identifier": "getPksCsv",
"modifiers": "private static",
"parameters": "()",
"return": "String",
"signature": "String getPksCsv()",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getPkCols()",
"constructor": false,
"full_signature": "private static List<String> getPkCols()",
"identifier": "getPkCols",
"modifiers": "private static",
"parameters": "()",
"return": "List<String>",
"signature": "List<String> getPkCols()",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.constructOutputTableQuery(Connection connection,\n SourceTargetColumnNames columnNames, String conditions)",
"constructor": false,
"full_signature": "private static String constructOutputTableQuery(Connection connection,\n SourceTargetColumnNames columnNames, String conditions)",
"identifier": "constructOutputTableQuery",
"modifiers": "private static",
"parameters": "(Connection connection,\n SourceTargetColumnNames columnNames, String conditions)",
"return": "String",
"signature": "String constructOutputTableQuery(Connection connection,\n SourceTargetColumnNames columnNames, String conditions)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getOutputTableColumns(Connection connection)",
"constructor": false,
"full_signature": "private static List<String> getOutputTableColumns(Connection connection)",
"identifier": "getOutputTableColumns",
"modifiers": "private static",
"parameters": "(Connection connection)",
"return": "List<String>",
"signature": "List<String> getOutputTableColumns(Connection connection)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String getSqlQueryBadCoveredColVal(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis) throws SQLException {\n String paramQuery = getHasTargetRowQuery(conn, columnNames, scrutinyTimeMillis);\n return paramQuery.replaceFirst(\"\\\\?\", \"true\");\n }",
"class_method_signature": "IndexScrutinyTableOutput.getSqlQueryBadCoveredColVal(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static String getSqlQueryBadCoveredColVal(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"identifier": "getSqlQueryBadCoveredColVal",
"invocations": [
"getHasTargetRowQuery",
"replaceFirst"
],
"modifiers": "public static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"return": "String",
"signature": "String getSqlQueryBadCoveredColVal(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_108 | {
"fields": [
{
"declarator": "cache",
"modifier": "@Mock",
"original_string": "@Mock\n GuidePostsCache cache;",
"type": "GuidePostsCache",
"var_name": "cache"
},
{
"declarator": "wrapper",
"modifier": "",
"original_string": "GuidePostsCacheWrapper wrapper;",
"type": "GuidePostsCacheWrapper",
"var_name": "wrapper"
},
{
"declarator": "table = org.apache.hadoop.hbase.util.Bytes.toBytes(\"tableName\")",
"modifier": "",
"original_string": "byte[] table = org.apache.hadoop.hbase.util.Bytes.toBytes(\"tableName\");",
"type": "byte[]",
"var_name": "table"
},
{
"declarator": "columnFamily1 = Bytes.toBytesBinary(\"cf1\")",
"modifier": "",
"original_string": "byte[] columnFamily1 = Bytes.toBytesBinary(\"cf1\");",
"type": "byte[]",
"var_name": "columnFamily1"
},
{
"declarator": "columnFamily2 = Bytes.toBytesBinary(\"cf2\")",
"modifier": "",
"original_string": "byte[] columnFamily2 = Bytes.toBytesBinary(\"cf2\");",
"type": "byte[]",
"var_name": "columnFamily2"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/query/GuidePostsCacheWrapperTest.java",
"identifier": "GuidePostsCacheWrapperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = NullPointerException.class)\n public void invalidateAllPTableNull(){\n PTable ptable = null;\n wrapper.invalidateAll(ptable);\n }",
"class_method_signature": "GuidePostsCacheWrapperTest.invalidateAllPTableNull()",
"constructor": false,
"full_signature": "@Test(expected = NullPointerException.class) public void invalidateAllPTableNull()",
"identifier": "invalidateAllPTableNull",
"invocations": [
"invalidateAll"
],
"modifiers": "@Test(expected = NullPointerException.class) public",
"parameters": "()",
"return": "void",
"signature": "void invalidateAllPTableNull()",
"testcase": true
} | {
"fields": [
{
"declarator": "guidePostsCache",
"modifier": "private final",
"original_string": "private final GuidePostsCache guidePostsCache;",
"type": "GuidePostsCache",
"var_name": "guidePostsCache"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/query/GuidePostsCacheWrapper.java",
"identifier": "GuidePostsCacheWrapper",
"interfaces": "",
"methods": [
{
"class_method_signature": "GuidePostsCacheWrapper.GuidePostsCacheWrapper(GuidePostsCache guidePostsCache)",
"constructor": true,
"full_signature": " GuidePostsCacheWrapper(GuidePostsCache guidePostsCache)",
"identifier": "GuidePostsCacheWrapper",
"modifiers": "",
"parameters": "(GuidePostsCache guidePostsCache)",
"return": "",
"signature": " GuidePostsCacheWrapper(GuidePostsCache guidePostsCache)",
"testcase": false
},
{
"class_method_signature": "GuidePostsCacheWrapper.get(GuidePostsKey key)",
"constructor": false,
"full_signature": " GuidePostsInfo get(GuidePostsKey key)",
"identifier": "get",
"modifiers": "",
"parameters": "(GuidePostsKey key)",
"return": "GuidePostsInfo",
"signature": "GuidePostsInfo get(GuidePostsKey key)",
"testcase": false
},
{
"class_method_signature": "GuidePostsCacheWrapper.put(GuidePostsKey key, GuidePostsInfo info)",
"constructor": false,
"full_signature": " void put(GuidePostsKey key, GuidePostsInfo info)",
"identifier": "put",
"modifiers": "",
"parameters": "(GuidePostsKey key, GuidePostsInfo info)",
"return": "void",
"signature": "void put(GuidePostsKey key, GuidePostsInfo info)",
"testcase": false
},
{
"class_method_signature": "GuidePostsCacheWrapper.invalidate(GuidePostsKey key)",
"constructor": false,
"full_signature": " void invalidate(GuidePostsKey key)",
"identifier": "invalidate",
"modifiers": "",
"parameters": "(GuidePostsKey key)",
"return": "void",
"signature": "void invalidate(GuidePostsKey key)",
"testcase": false
},
{
"class_method_signature": "GuidePostsCacheWrapper.invalidateAll()",
"constructor": false,
"full_signature": " void invalidateAll()",
"identifier": "invalidateAll",
"modifiers": "",
"parameters": "()",
"return": "void",
"signature": "void invalidateAll()",
"testcase": false
},
{
"class_method_signature": "GuidePostsCacheWrapper.invalidateAll(TableDescriptor htableDesc)",
"constructor": false,
"full_signature": "public void invalidateAll(TableDescriptor htableDesc)",
"identifier": "invalidateAll",
"modifiers": "public",
"parameters": "(TableDescriptor htableDesc)",
"return": "void",
"signature": "void invalidateAll(TableDescriptor htableDesc)",
"testcase": false
},
{
"class_method_signature": "GuidePostsCacheWrapper.invalidateAll(PTable table)",
"constructor": false,
"full_signature": "public void invalidateAll(PTable table)",
"identifier": "invalidateAll",
"modifiers": "public",
"parameters": "(PTable table)",
"return": "void",
"signature": "void invalidateAll(PTable table)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "void invalidateAll(){\n guidePostsCache.invalidateAll();\n }",
"class_method_signature": "GuidePostsCacheWrapper.invalidateAll()",
"constructor": false,
"full_signature": " void invalidateAll()",
"identifier": "invalidateAll",
"invocations": [
"invalidateAll"
],
"modifiers": "",
"parameters": "()",
"return": "void",
"signature": "void invalidateAll()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_85 | {
"fields": [
{
"declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L",
"modifier": "private static final",
"original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;",
"type": "long",
"var_name": "ONE_HOUR_IN_MILLIS"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/DateUtilTest.java",
"identifier": "DateUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected=IllegalDataException.class)\n public void testParseTimestamp_InvalidTimestamp() {\n DateUtil.parseTimestamp(\"not-a-timestamp\");\n }",
"class_method_signature": "DateUtilTest.testParseTimestamp_InvalidTimestamp()",
"constructor": false,
"full_signature": "@Test(expected=IllegalDataException.class) public void testParseTimestamp_InvalidTimestamp()",
"identifier": "testParseTimestamp_InvalidTimestamp",
"invocations": [
"parseTimestamp"
],
"modifiers": "@Test(expected=IllegalDataException.class) public",
"parameters": "()",
"return": "void",
"signature": "void testParseTimestamp_InvalidTimestamp()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";",
"type": "String",
"var_name": "DEFAULT_TIME_ZONE_ID"
},
{
"declarator": "LOCAL_TIME_ZONE_ID = \"LOCAL\"",
"modifier": "public static final",
"original_string": "public static final String LOCAL_TIME_ZONE_ID = \"LOCAL\";",
"type": "String",
"var_name": "LOCAL_TIME_ZONE_ID"
},
{
"declarator": "DEFAULT_TIME_ZONE = TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID)",
"modifier": "private static final",
"original_string": "private static final TimeZone DEFAULT_TIME_ZONE = TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID);",
"type": "TimeZone",
"var_name": "DEFAULT_TIME_ZONE"
},
{
"declarator": "DEFAULT_MS_DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss.SSS\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_MS_DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss.SSS\";",
"type": "String",
"var_name": "DEFAULT_MS_DATE_FORMAT"
},
{
"declarator": "DEFAULT_MS_DATE_FORMATTER = FastDateFormat.getInstance(\n DEFAULT_MS_DATE_FORMAT, TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID))",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_MS_DATE_FORMATTER = FastDateFormat.getInstance(\n DEFAULT_MS_DATE_FORMAT, TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID));",
"type": "Format",
"var_name": "DEFAULT_MS_DATE_FORMATTER"
},
{
"declarator": "DEFAULT_DATE_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_DATE_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_DATE_FORMAT"
},
{
"declarator": "DEFAULT_DATE_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_DATE_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_DATE_FORMATTER"
},
{
"declarator": "DEFAULT_TIME_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIME_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_TIME_FORMAT"
},
{
"declarator": "DEFAULT_TIME_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_TIME_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_TIME_FORMATTER"
},
{
"declarator": "DEFAULT_TIMESTAMP_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIMESTAMP_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_TIMESTAMP_FORMAT"
},
{
"declarator": "DEFAULT_TIMESTAMP_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_TIMESTAMP_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_TIMESTAMP_FORMATTER"
},
{
"declarator": "ISO_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.dateParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .appendLiteral(' ').toParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.timeParser()).toParser())\n .toFormatter().withChronology(ISOChronology.getInstanceUTC())",
"modifier": "private static final",
"original_string": "private static final DateTimeFormatter ISO_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.dateParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .appendLiteral(' ').toParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.timeParser()).toParser())\n .toFormatter().withChronology(ISOChronology.getInstanceUTC());",
"type": "DateTimeFormatter",
"var_name": "ISO_DATE_TIME_FORMATTER"
},
{
"declarator": "defaultPattern",
"modifier": "private static",
"original_string": "private static String[] defaultPattern;",
"type": "String[]",
"var_name": "defaultPattern"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/DateUtil.java",
"identifier": "DateUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "DateUtil.DateUtil()",
"constructor": true,
"full_signature": "private DateUtil()",
"identifier": "DateUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " DateUtil()",
"testcase": false
},
{
"class_method_signature": "DateUtil.getCodecFor(PDataType type)",
"constructor": false,
"full_signature": "@NonNull public static PDataCodec getCodecFor(PDataType type)",
"identifier": "getCodecFor",
"modifiers": "@NonNull public static",
"parameters": "(PDataType type)",
"return": "PDataCodec",
"signature": "PDataCodec getCodecFor(PDataType type)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimeZone(String timeZoneId)",
"constructor": false,
"full_signature": "public static TimeZone getTimeZone(String timeZoneId)",
"identifier": "getTimeZone",
"modifiers": "public static",
"parameters": "(String timeZoneId)",
"return": "TimeZone",
"signature": "TimeZone getTimeZone(String timeZoneId)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDefaultFormat(PDataType type)",
"constructor": false,
"full_signature": "private static String getDefaultFormat(PDataType type)",
"identifier": "getDefaultFormat",
"modifiers": "private static",
"parameters": "(PDataType type)",
"return": "String",
"signature": "String getDefaultFormat(PDataType type)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"constructor": false,
"full_signature": "public static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"identifier": "getDateTimeParser",
"modifiers": "public static",
"parameters": "(String pattern, PDataType pDataType, String timeZoneId)",
"return": "DateTimeParser",
"signature": "DateTimeParser getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateTimeParser(String pattern, PDataType pDataType)",
"constructor": false,
"full_signature": "public static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType)",
"identifier": "getDateTimeParser",
"modifiers": "public static",
"parameters": "(String pattern, PDataType pDataType)",
"return": "DateTimeParser",
"signature": "DateTimeParser getDateTimeParser(String pattern, PDataType pDataType)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateFormatter(String pattern)",
"constructor": false,
"full_signature": "public static Format getDateFormatter(String pattern)",
"identifier": "getDateFormatter",
"modifiers": "public static",
"parameters": "(String pattern)",
"return": "Format",
"signature": "Format getDateFormatter(String pattern)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getDateFormatter(String pattern, String timeZoneID)",
"identifier": "getDateFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getDateFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimeFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getTimeFormatter(String pattern, String timeZoneID)",
"identifier": "getTimeFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getTimeFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestampFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getTimestampFormatter(String pattern, String timeZoneID)",
"identifier": "getTimestampFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getTimestampFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseDateTime(String dateTimeValue)",
"constructor": false,
"full_signature": "private static long parseDateTime(String dateTimeValue)",
"identifier": "parseDateTime",
"modifiers": "private static",
"parameters": "(String dateTimeValue)",
"return": "long",
"signature": "long parseDateTime(String dateTimeValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseDate(String dateValue)",
"constructor": false,
"full_signature": "public static Date parseDate(String dateValue)",
"identifier": "parseDate",
"modifiers": "public static",
"parameters": "(String dateValue)",
"return": "Date",
"signature": "Date parseDate(String dateValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseTime(String timeValue)",
"constructor": false,
"full_signature": "public static Time parseTime(String timeValue)",
"identifier": "parseTime",
"modifiers": "public static",
"parameters": "(String timeValue)",
"return": "Time",
"signature": "Time parseTime(String timeValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseTimestamp(String timestampValue)",
"constructor": false,
"full_signature": "public static Timestamp parseTimestamp(String timestampValue)",
"identifier": "parseTimestamp",
"modifiers": "public static",
"parameters": "(String timestampValue)",
"return": "Timestamp",
"signature": "Timestamp parseTimestamp(String timestampValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestamp(long millis, int nanos)",
"constructor": false,
"full_signature": "public static Timestamp getTimestamp(long millis, int nanos)",
"identifier": "getTimestamp",
"modifiers": "public static",
"parameters": "(long millis, int nanos)",
"return": "Timestamp",
"signature": "Timestamp getTimestamp(long millis, int nanos)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestamp(BigDecimal bd)",
"constructor": false,
"full_signature": "public static Timestamp getTimestamp(BigDecimal bd)",
"identifier": "getTimestamp",
"modifiers": "public static",
"parameters": "(BigDecimal bd)",
"return": "Timestamp",
"signature": "Timestamp getTimestamp(BigDecimal bd)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static Timestamp parseTimestamp(String timestampValue) {\n Timestamp timestamp = new Timestamp(parseDateTime(timestampValue));\n int period = timestampValue.indexOf('.');\n if (period > 0) {\n String nanosStr = timestampValue.substring(period + 1);\n if (nanosStr.length() > 9)\n throw new IllegalDataException(\"nanos > 999999999 or < 0\");\n if(nanosStr.length() > 3 ) {\n int nanos = Integer.parseInt(nanosStr);\n for (int i = 0; i < 9 - nanosStr.length(); i++) {\n nanos *= 10;\n }\n timestamp.setNanos(nanos);\n }\n }\n return timestamp;\n }",
"class_method_signature": "DateUtil.parseTimestamp(String timestampValue)",
"constructor": false,
"full_signature": "public static Timestamp parseTimestamp(String timestampValue)",
"identifier": "parseTimestamp",
"invocations": [
"parseDateTime",
"indexOf",
"substring",
"length",
"length",
"parseInt",
"length",
"setNanos"
],
"modifiers": "public static",
"parameters": "(String timestampValue)",
"return": "Timestamp",
"signature": "Timestamp parseTimestamp(String timestampValue)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_190 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/schema/PMetaDataImplTest.java",
"identifier": "PMetaDataImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldAlwaysKeepAtLeastOneEntryEvenIfTooLarge() throws Exception {\n TestTimeKeeper timeKeeper = new TestTimeKeeper();\n Map<String, String> props = Maps.newHashMapWithExpectedSize(2);\n props.put(QueryServices.MAX_CLIENT_METADATA_CACHE_SIZE_ATTRIB, \"5\");\n props.put(QueryServices.CLIENT_CACHE_ENCODING, \"object\");\n PMetaData metaData = new PMetaDataImpl(5, timeKeeper, new ReadOnlyProps(props));\n addToTable(metaData, \"a\", 1, timeKeeper);\n assertEquals(1, metaData.size());\n addToTable(metaData, \"b\", 1, timeKeeper);\n assertEquals(2, metaData.size());\n addToTable(metaData, \"c\", 5, timeKeeper);\n assertEquals(1, metaData.size());\n addToTable(metaData, \"d\", 20, timeKeeper);\n assertEquals(1, metaData.size());\n assertNames(metaData, \"d\");\n addToTable(metaData, \"e\", 1, timeKeeper);\n assertEquals(1, metaData.size());\n addToTable(metaData, \"f\", 2, timeKeeper);\n assertEquals(2, metaData.size());\n assertNames(metaData, \"e\", \"f\");\n }",
"class_method_signature": "PMetaDataImplTest.shouldAlwaysKeepAtLeastOneEntryEvenIfTooLarge()",
"constructor": false,
"full_signature": "@Test public void shouldAlwaysKeepAtLeastOneEntryEvenIfTooLarge()",
"identifier": "shouldAlwaysKeepAtLeastOneEntryEvenIfTooLarge",
"invocations": [
"newHashMapWithExpectedSize",
"put",
"put",
"addToTable",
"assertEquals",
"size",
"addToTable",
"assertEquals",
"size",
"addToTable",
"assertEquals",
"size",
"addToTable",
"assertEquals",
"size",
"assertNames",
"addToTable",
"assertEquals",
"size",
"addToTable",
"assertEquals",
"size",
"assertNames"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void shouldAlwaysKeepAtLeastOneEntryEvenIfTooLarge()",
"testcase": true
} | {
"fields": [
{
"declarator": "metaData",
"modifier": "private",
"original_string": "private PMetaDataCache metaData;",
"type": "PMetaDataCache",
"var_name": "metaData"
},
{
"declarator": "timeKeeper",
"modifier": "private final",
"original_string": "private final TimeKeeper timeKeeper;",
"type": "TimeKeeper",
"var_name": "timeKeeper"
},
{
"declarator": "tableRefFactory",
"modifier": "private final",
"original_string": "private final PTableRefFactory tableRefFactory;",
"type": "PTableRefFactory",
"var_name": "tableRefFactory"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/schema/PMetaDataImpl.java",
"identifier": "PMetaDataImpl",
"interfaces": "implements PMetaData",
"methods": [
{
"class_method_signature": "PMetaDataImpl.PMetaDataImpl(int initialCapacity, ReadOnlyProps props)",
"constructor": true,
"full_signature": "public PMetaDataImpl(int initialCapacity, ReadOnlyProps props)",
"identifier": "PMetaDataImpl",
"modifiers": "public",
"parameters": "(int initialCapacity, ReadOnlyProps props)",
"return": "",
"signature": " PMetaDataImpl(int initialCapacity, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.PMetaDataImpl(int initialCapacity, TimeKeeper timeKeeper, ReadOnlyProps props)",
"constructor": true,
"full_signature": "public PMetaDataImpl(int initialCapacity, TimeKeeper timeKeeper, ReadOnlyProps props)",
"identifier": "PMetaDataImpl",
"modifiers": "public",
"parameters": "(int initialCapacity, TimeKeeper timeKeeper, ReadOnlyProps props)",
"return": "",
"signature": " PMetaDataImpl(int initialCapacity, TimeKeeper timeKeeper, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.PMetaDataImpl(PMetaDataCache metaData, TimeKeeper timeKeeper, PTableRefFactory tableRefFactory)",
"constructor": true,
"full_signature": "private PMetaDataImpl(PMetaDataCache metaData, TimeKeeper timeKeeper, PTableRefFactory tableRefFactory)",
"identifier": "PMetaDataImpl",
"modifiers": "private",
"parameters": "(PMetaDataCache metaData, TimeKeeper timeKeeper, PTableRefFactory tableRefFactory)",
"return": "",
"signature": " PMetaDataImpl(PMetaDataCache metaData, TimeKeeper timeKeeper, PTableRefFactory tableRefFactory)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.clone()",
"constructor": false,
"full_signature": "@Override public PMetaDataImpl clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "PMetaDataImpl",
"signature": "PMetaDataImpl clone()",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.getTableRef(PTableKey key)",
"constructor": false,
"full_signature": "@Override public PTableRef getTableRef(PTableKey key)",
"identifier": "getTableRef",
"modifiers": "@Override public",
"parameters": "(PTableKey key)",
"return": "PTableRef",
"signature": "PTableRef getTableRef(PTableKey key)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.getFunction(PTableKey key)",
"constructor": false,
"full_signature": "@Override public PFunction getFunction(PTableKey key)",
"identifier": "getFunction",
"modifiers": "@Override public",
"parameters": "(PTableKey key)",
"return": "PFunction",
"signature": "PFunction getFunction(PTableKey key)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int size()",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.updateResolvedTimestamp(PTable table, long resolvedTimestamp)",
"constructor": false,
"full_signature": "@Override public void updateResolvedTimestamp(PTable table, long resolvedTimestamp)",
"identifier": "updateResolvedTimestamp",
"modifiers": "@Override public",
"parameters": "(PTable table, long resolvedTimestamp)",
"return": "void",
"signature": "void updateResolvedTimestamp(PTable table, long resolvedTimestamp)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.addTable(PTable table, long resolvedTime)",
"constructor": false,
"full_signature": "@Override public void addTable(PTable table, long resolvedTime)",
"identifier": "addTable",
"modifiers": "@Override public",
"parameters": "(PTable table, long resolvedTime)",
"return": "void",
"signature": "void addTable(PTable table, long resolvedTime)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.removeTable(PName tenantId, String tableName, String parentTableName, long tableTimeStamp)",
"constructor": false,
"full_signature": "@Override public void removeTable(PName tenantId, String tableName, String parentTableName, long tableTimeStamp)",
"identifier": "removeTable",
"modifiers": "@Override public",
"parameters": "(PName tenantId, String tableName, String parentTableName, long tableTimeStamp)",
"return": "void",
"signature": "void removeTable(PName tenantId, String tableName, String parentTableName, long tableTimeStamp)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.removeColumn(PName tenantId, String tableName, List<PColumn> columnsToRemove, long tableTimeStamp, long tableSeqNum, long resolvedTime)",
"constructor": false,
"full_signature": "@Override public void removeColumn(PName tenantId, String tableName, List<PColumn> columnsToRemove, long tableTimeStamp, long tableSeqNum, long resolvedTime)",
"identifier": "removeColumn",
"modifiers": "@Override public",
"parameters": "(PName tenantId, String tableName, List<PColumn> columnsToRemove, long tableTimeStamp, long tableSeqNum, long resolvedTime)",
"return": "void",
"signature": "void removeColumn(PName tenantId, String tableName, List<PColumn> columnsToRemove, long tableTimeStamp, long tableSeqNum, long resolvedTime)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.pruneTables(Pruner pruner)",
"constructor": false,
"full_signature": "@Override public void pruneTables(Pruner pruner)",
"identifier": "pruneTables",
"modifiers": "@Override public",
"parameters": "(Pruner pruner)",
"return": "void",
"signature": "void pruneTables(Pruner pruner)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.iterator()",
"constructor": false,
"full_signature": "@Override public Iterator<PTable> iterator()",
"identifier": "iterator",
"modifiers": "@Override public",
"parameters": "()",
"return": "Iterator<PTable>",
"signature": "Iterator<PTable> iterator()",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.addFunction(PFunction function)",
"constructor": false,
"full_signature": "@Override public void addFunction(PFunction function)",
"identifier": "addFunction",
"modifiers": "@Override public",
"parameters": "(PFunction function)",
"return": "void",
"signature": "void addFunction(PFunction function)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.removeFunction(PName tenantId, String function, long functionTimeStamp)",
"constructor": false,
"full_signature": "@Override public void removeFunction(PName tenantId, String function, long functionTimeStamp)",
"identifier": "removeFunction",
"modifiers": "@Override public",
"parameters": "(PName tenantId, String function, long functionTimeStamp)",
"return": "void",
"signature": "void removeFunction(PName tenantId, String function, long functionTimeStamp)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.pruneFunctions(Pruner pruner)",
"constructor": false,
"full_signature": "@Override public void pruneFunctions(Pruner pruner)",
"identifier": "pruneFunctions",
"modifiers": "@Override public",
"parameters": "(Pruner pruner)",
"return": "void",
"signature": "void pruneFunctions(Pruner pruner)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.getAge(PTableRef ref)",
"constructor": false,
"full_signature": "@Override public long getAge(PTableRef ref)",
"identifier": "getAge",
"modifiers": "@Override public",
"parameters": "(PTableRef ref)",
"return": "long",
"signature": "long getAge(PTableRef ref)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.addSchema(PSchema schema)",
"constructor": false,
"full_signature": "@Override public void addSchema(PSchema schema)",
"identifier": "addSchema",
"modifiers": "@Override public",
"parameters": "(PSchema schema)",
"return": "void",
"signature": "void addSchema(PSchema schema)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.getSchema(PTableKey key)",
"constructor": false,
"full_signature": "@Override public PSchema getSchema(PTableKey key)",
"identifier": "getSchema",
"modifiers": "@Override public",
"parameters": "(PTableKey key)",
"return": "PSchema",
"signature": "PSchema getSchema(PTableKey key)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.removeSchema(PSchema schema, long schemaTimeStamp)",
"constructor": false,
"full_signature": "@Override public void removeSchema(PSchema schema, long schemaTimeStamp)",
"identifier": "removeSchema",
"modifiers": "@Override public",
"parameters": "(PSchema schema, long schemaTimeStamp)",
"return": "void",
"signature": "void removeSchema(PSchema schema, long schemaTimeStamp)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public int size() {\n return metaData.size();\n }",
"class_method_signature": "PMetaDataImpl.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"invocations": [
"size"
],
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int size()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_169 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixDriverTest.java",
"identifier": "PhoenixDriverTest",
"interfaces": "",
"superclass": "extends BaseConnectionlessQueryTest"
} | {
"body": "@Test\n public void testFirstConnectionWhenPropsHasTenantId() throws Exception {\n Properties props = new Properties();\n final String tenantId = \"00Dxx0000001234\";\n props.put(PhoenixRuntime.TENANT_ID_ATTRIB, tenantId);\n\n Connection connection = new PhoenixTestDriver().connect(getUrl(), props);\n assertEquals(tenantId, connection.getClientInfo(PhoenixRuntime.TENANT_ID_ATTRIB));\n }",
"class_method_signature": "PhoenixDriverTest.testFirstConnectionWhenPropsHasTenantId()",
"constructor": false,
"full_signature": "@Test public void testFirstConnectionWhenPropsHasTenantId()",
"identifier": "testFirstConnectionWhenPropsHasTenantId",
"invocations": [
"put",
"connect",
"getUrl",
"assertEquals",
"getClientInfo"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testFirstConnectionWhenPropsHasTenantId()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(PhoenixDriver.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PhoenixDriver.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "INSTANCE",
"modifier": "public static final",
"original_string": "public static final PhoenixDriver INSTANCE;",
"type": "PhoenixDriver",
"var_name": "INSTANCE"
},
{
"declarator": "driverShutdownMsg",
"modifier": "private static volatile",
"original_string": "private static volatile String driverShutdownMsg;",
"type": "String",
"var_name": "driverShutdownMsg"
},
{
"declarator": "connectionQueryServicesCache =\n initializeConnectionCache()",
"modifier": "private final",
"original_string": "private final Cache<ConnectionInfo, ConnectionQueryServices> connectionQueryServicesCache =\n initializeConnectionCache();",
"type": "Cache<ConnectionInfo, ConnectionQueryServices>",
"var_name": "connectionQueryServicesCache"
},
{
"declarator": "services",
"modifier": "private volatile",
"original_string": "private volatile QueryServices services;",
"type": "QueryServices",
"var_name": "services"
},
{
"declarator": "closed = false",
"modifier": "@GuardedBy(\"closeLock\")\n private volatile",
"original_string": "@GuardedBy(\"closeLock\")\n private volatile boolean closed = false;",
"type": "boolean",
"var_name": "closed"
},
{
"declarator": "closeLock = new ReentrantReadWriteLock()",
"modifier": "private final",
"original_string": "private final ReadWriteLock closeLock = new ReentrantReadWriteLock();",
"type": "ReadWriteLock",
"var_name": "closeLock"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java",
"identifier": "PhoenixDriver",
"interfaces": "",
"methods": [
{
"class_method_signature": "PhoenixDriver.closeInstance(PhoenixDriver instance)",
"constructor": false,
"full_signature": "private static void closeInstance(PhoenixDriver instance)",
"identifier": "closeInstance",
"modifiers": "private static",
"parameters": "(PhoenixDriver instance)",
"return": "void",
"signature": "void closeInstance(PhoenixDriver instance)",
"testcase": false
},
{
"class_method_signature": "PhoenixDriver.PhoenixDriver()",
"constructor": true,
"full_signature": "public PhoenixDriver()",
"identifier": "PhoenixDriver",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " PhoenixDriver()",
"testcase": false
},
{
"class_method_signature": "PhoenixDriver.initializeConnectionCache()",
"constructor": false,
"full_signature": "private Cache<ConnectionInfo, ConnectionQueryServices> initializeConnectionCache()",
"identifier": "initializeConnectionCache",
"modifiers": "private",
"parameters": "()",
"return": "Cache<ConnectionInfo, ConnectionQueryServices>",
"signature": "Cache<ConnectionInfo, ConnectionQueryServices> initializeConnectionCache()",
"testcase": false
},
{
"class_method_signature": "PhoenixDriver.getQueryServices()",
"constructor": false,
"full_signature": "@Override public QueryServices getQueryServices()",
"identifier": "getQueryServices",
"modifiers": "@Override public",
"parameters": "()",
"return": "QueryServices",
"signature": "QueryServices getQueryServices()",
"testcase": false
},
{
"class_method_signature": "PhoenixDriver.acceptsURL(String url)",
"constructor": false,
"full_signature": "@Override public boolean acceptsURL(String url)",
"identifier": "acceptsURL",
"modifiers": "@Override public",
"parameters": "(String url)",
"return": "boolean",
"signature": "boolean acceptsURL(String url)",
"testcase": false
},
{
"class_method_signature": "PhoenixDriver.connect(String url, Properties info)",
"constructor": false,
"full_signature": "@Override public Connection connect(String url, Properties info)",
"identifier": "connect",
"modifiers": "@Override public",
"parameters": "(String url, Properties info)",
"return": "Connection",
"signature": "Connection connect(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "PhoenixDriver.getConnectionQueryServices(String url, final Properties info)",
"constructor": false,
"full_signature": "@Override protected ConnectionQueryServices getConnectionQueryServices(String url, final Properties info)",
"identifier": "getConnectionQueryServices",
"modifiers": "@Override protected",
"parameters": "(String url, final Properties info)",
"return": "ConnectionQueryServices",
"signature": "ConnectionQueryServices getConnectionQueryServices(String url, final Properties info)",
"testcase": false
},
{
"class_method_signature": "PhoenixDriver.checkClosed()",
"constructor": false,
"full_signature": "@GuardedBy(\"closeLock\") private void checkClosed()",
"identifier": "checkClosed",
"modifiers": "@GuardedBy(\"closeLock\") private",
"parameters": "()",
"return": "void",
"signature": "void checkClosed()",
"testcase": false
},
{
"class_method_signature": "PhoenixDriver.throwDriverClosedException()",
"constructor": false,
"full_signature": "private void throwDriverClosedException()",
"identifier": "throwDriverClosedException",
"modifiers": "private",
"parameters": "()",
"return": "void",
"signature": "void throwDriverClosedException()",
"testcase": false
},
{
"class_method_signature": "PhoenixDriver.close()",
"constructor": false,
"full_signature": "@Override public synchronized void close()",
"identifier": "close",
"modifiers": "@Override public synchronized",
"parameters": "()",
"return": "void",
"signature": "void close()",
"testcase": false
},
{
"class_method_signature": "PhoenixDriver.lockInterruptibly(LockMode mode)",
"constructor": false,
"full_signature": "private void lockInterruptibly(LockMode mode)",
"identifier": "lockInterruptibly",
"modifiers": "private",
"parameters": "(LockMode mode)",
"return": "void",
"signature": "void lockInterruptibly(LockMode mode)",
"testcase": false
},
{
"class_method_signature": "PhoenixDriver.unlock(LockMode mode)",
"constructor": false,
"full_signature": "private void unlock(LockMode mode)",
"identifier": "unlock",
"modifiers": "private",
"parameters": "(LockMode mode)",
"return": "void",
"signature": "void unlock(LockMode mode)",
"testcase": false
}
],
"superclass": "extends PhoenixEmbeddedDriver"
} | {
"body": "@Override\n public Connection connect(String url, Properties info) throws SQLException {\n if (!acceptsURL(url)) {\n return null;\n }\n try {\n lockInterruptibly(LockMode.READ);\n checkClosed();\n return createConnection(url, info);\n } finally {\n unlock(LockMode.READ);\n }\n }",
"class_method_signature": "PhoenixDriver.connect(String url, Properties info)",
"constructor": false,
"full_signature": "@Override public Connection connect(String url, Properties info)",
"identifier": "connect",
"invocations": [
"acceptsURL",
"lockInterruptibly",
"checkClosed",
"createConnection",
"unlock"
],
"modifiers": "@Override public",
"parameters": "(String url, Properties info)",
"return": "Connection",
"signature": "Connection connect(String url, Properties info)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_186 | {
"fields": [
{
"declarator": "region",
"modifier": "private",
"original_string": "private Region region;",
"type": "Region",
"var_name": "region"
},
{
"declarator": "rsServices",
"modifier": "private",
"original_string": "private RegionServerServices rsServices;",
"type": "RegionServerServices",
"var_name": "rsServices"
},
{
"declarator": "statsWriter",
"modifier": "private",
"original_string": "private StatisticsWriter statsWriter;",
"type": "StatisticsWriter",
"var_name": "statsWriter"
},
{
"declarator": "callable",
"modifier": "private",
"original_string": "private StatisticsScannerCallable callable;",
"type": "StatisticsScannerCallable",
"var_name": "callable"
},
{
"declarator": "runTracker",
"modifier": "private",
"original_string": "private StatisticsCollectionRunTracker runTracker;",
"type": "StatisticsCollectionRunTracker",
"var_name": "runTracker"
},
{
"declarator": "mockScanner",
"modifier": "private",
"original_string": "private StatisticsScanner mockScanner;",
"type": "StatisticsScanner",
"var_name": "mockScanner"
},
{
"declarator": "tracker",
"modifier": "private",
"original_string": "private StatisticsCollector tracker;",
"type": "StatisticsCollector",
"var_name": "tracker"
},
{
"declarator": "delegate",
"modifier": "private",
"original_string": "private InternalScanner delegate;",
"type": "InternalScanner",
"var_name": "delegate"
},
{
"declarator": "regionInfo",
"modifier": "private",
"original_string": "private RegionInfo regionInfo;",
"type": "RegionInfo",
"var_name": "regionInfo"
},
{
"declarator": "config",
"modifier": "private",
"original_string": "private Configuration config;",
"type": "Configuration",
"var_name": "config"
},
{
"declarator": "env",
"modifier": "private",
"original_string": "private RegionCoprocessorEnvironment env;",
"type": "RegionCoprocessorEnvironment",
"var_name": "env"
},
{
"declarator": "conn",
"modifier": "private",
"original_string": "private Connection conn;",
"type": "Connection",
"var_name": "conn"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/schema/stats/StatisticsScannerTest.java",
"identifier": "StatisticsScannerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckRegionServerStoppedOnClose() throws Exception {\n when(conn.isClosed()).thenReturn(false);\n when(conn.isAborted()).thenReturn(true);\n\n mockScanner.close();\n\n verify(conn).isClosed();\n verify(conn).isAborted();\n verify(callable, never()).call();\n verify(runTracker, never()).runTask(callable);\n }",
"class_method_signature": "StatisticsScannerTest.testCheckRegionServerStoppedOnClose()",
"constructor": false,
"full_signature": "@Test public void testCheckRegionServerStoppedOnClose()",
"identifier": "testCheckRegionServerStoppedOnClose",
"invocations": [
"thenReturn",
"when",
"isClosed",
"thenReturn",
"when",
"isAborted",
"close",
"isClosed",
"verify",
"isAborted",
"verify",
"call",
"verify",
"never",
"runTask",
"verify",
"never"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCheckRegionServerStoppedOnClose()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(StatisticsScanner.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(StatisticsScanner.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "delegate",
"modifier": "private",
"original_string": "private InternalScanner delegate;",
"type": "InternalScanner",
"var_name": "delegate"
},
{
"declarator": "statsWriter",
"modifier": "private",
"original_string": "private StatisticsWriter statsWriter;",
"type": "StatisticsWriter",
"var_name": "statsWriter"
},
{
"declarator": "region",
"modifier": "private",
"original_string": "private Region region;",
"type": "Region",
"var_name": "region"
},
{
"declarator": "tracker",
"modifier": "private",
"original_string": "private StatisticsCollector tracker;",
"type": "StatisticsCollector",
"var_name": "tracker"
},
{
"declarator": "family",
"modifier": "private",
"original_string": "private ImmutableBytesPtr family;",
"type": "ImmutableBytesPtr",
"var_name": "family"
},
{
"declarator": "config",
"modifier": "private final",
"original_string": "private final Configuration config;",
"type": "Configuration",
"var_name": "config"
},
{
"declarator": "env",
"modifier": "private final",
"original_string": "private final RegionCoprocessorEnvironment env;",
"type": "RegionCoprocessorEnvironment",
"var_name": "env"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsScanner.java",
"identifier": "StatisticsScanner",
"interfaces": "implements InternalScanner",
"methods": [
{
"class_method_signature": "StatisticsScanner.StatisticsScanner(StatisticsCollector tracker, StatisticsWriter stats, RegionCoprocessorEnvironment env,\n InternalScanner delegate, ImmutableBytesPtr family)",
"constructor": true,
"full_signature": "public StatisticsScanner(StatisticsCollector tracker, StatisticsWriter stats, RegionCoprocessorEnvironment env,\n InternalScanner delegate, ImmutableBytesPtr family)",
"identifier": "StatisticsScanner",
"modifiers": "public",
"parameters": "(StatisticsCollector tracker, StatisticsWriter stats, RegionCoprocessorEnvironment env,\n InternalScanner delegate, ImmutableBytesPtr family)",
"return": "",
"signature": " StatisticsScanner(StatisticsCollector tracker, StatisticsWriter stats, RegionCoprocessorEnvironment env,\n InternalScanner delegate, ImmutableBytesPtr family)",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.next(List<Cell> result)",
"constructor": false,
"full_signature": "@Override public boolean next(List<Cell> result)",
"identifier": "next",
"modifiers": "@Override public",
"parameters": "(List<Cell> result)",
"return": "boolean",
"signature": "boolean next(List<Cell> result)",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.next(List<Cell> result, ScannerContext scannerContext)",
"constructor": false,
"full_signature": "@Override public boolean next(List<Cell> result, ScannerContext scannerContext)",
"identifier": "next",
"modifiers": "@Override public",
"parameters": "(List<Cell> result, ScannerContext scannerContext)",
"return": "boolean",
"signature": "boolean next(List<Cell> result, ScannerContext scannerContext)",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.updateStats(final List<Cell> results)",
"constructor": false,
"full_signature": "private void updateStats(final List<Cell> results)",
"identifier": "updateStats",
"modifiers": "private",
"parameters": "(final List<Cell> results)",
"return": "void",
"signature": "void updateStats(final List<Cell> results)",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.close()",
"constructor": false,
"full_signature": "@Override public void close()",
"identifier": "close",
"modifiers": "@Override public",
"parameters": "()",
"return": "void",
"signature": "void close()",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.getStatsCollectionRunTracker(Configuration c)",
"constructor": false,
"full_signature": " StatisticsCollectionRunTracker getStatsCollectionRunTracker(Configuration c)",
"identifier": "getStatsCollectionRunTracker",
"modifiers": "",
"parameters": "(Configuration c)",
"return": "StatisticsCollectionRunTracker",
"signature": "StatisticsCollectionRunTracker getStatsCollectionRunTracker(Configuration c)",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.getConfig()",
"constructor": false,
"full_signature": " Configuration getConfig()",
"identifier": "getConfig",
"modifiers": "",
"parameters": "()",
"return": "Configuration",
"signature": "Configuration getConfig()",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.getStatisticsWriter()",
"constructor": false,
"full_signature": " StatisticsWriter getStatisticsWriter()",
"identifier": "getStatisticsWriter",
"modifiers": "",
"parameters": "()",
"return": "StatisticsWriter",
"signature": "StatisticsWriter getStatisticsWriter()",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.getRegion()",
"constructor": false,
"full_signature": " Region getRegion()",
"identifier": "getRegion",
"modifiers": "",
"parameters": "()",
"return": "Region",
"signature": "Region getRegion()",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.getConnection()",
"constructor": false,
"full_signature": " Connection getConnection()",
"identifier": "getConnection",
"modifiers": "",
"parameters": "()",
"return": "Connection",
"signature": "Connection getConnection()",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.createCallable()",
"constructor": false,
"full_signature": " StatisticsScannerCallable createCallable()",
"identifier": "createCallable",
"modifiers": "",
"parameters": "()",
"return": "StatisticsScannerCallable",
"signature": "StatisticsScannerCallable createCallable()",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.getTracker()",
"constructor": false,
"full_signature": " StatisticsCollector getTracker()",
"identifier": "getTracker",
"modifiers": "",
"parameters": "()",
"return": "StatisticsCollector",
"signature": "StatisticsCollector getTracker()",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.getDelegate()",
"constructor": false,
"full_signature": " InternalScanner getDelegate()",
"identifier": "getDelegate",
"modifiers": "",
"parameters": "()",
"return": "InternalScanner",
"signature": "InternalScanner getDelegate()",
"testcase": false
},
{
"class_method_signature": "StatisticsScanner.isConnectionClosed()",
"constructor": false,
"full_signature": "private boolean isConnectionClosed()",
"identifier": "isConnectionClosed",
"modifiers": "private",
"parameters": "()",
"return": "boolean",
"signature": "boolean isConnectionClosed()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public void close() throws IOException {\n boolean async = getConfig().getBoolean(COMMIT_STATS_ASYNC, DEFAULT_COMMIT_STATS_ASYNC);\n StatisticsCollectionRunTracker collectionTracker = getStatsCollectionRunTracker(config);\n StatisticsScannerCallable callable = createCallable();\n if (isConnectionClosed()) {\n LOGGER.debug(\"Not updating table statistics because the server is stopping/stopped\");\n return;\n }\n if (!async) {\n callable.call();\n } else {\n collectionTracker.runTask(callable);\n }\n }",
"class_method_signature": "StatisticsScanner.close()",
"constructor": false,
"full_signature": "@Override public void close()",
"identifier": "close",
"invocations": [
"getBoolean",
"getConfig",
"getStatsCollectionRunTracker",
"createCallable",
"isConnectionClosed",
"debug",
"call",
"runTask"
],
"modifiers": "@Override public",
"parameters": "()",
"return": "void",
"signature": "void close()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_93 | {
"fields": [
{
"declarator": "ROW = Bytes.toBytes(\"row\")",
"modifier": "private static final",
"original_string": "private static final byte[] ROW = Bytes.toBytes(\"row\");",
"type": "byte[]",
"var_name": "ROW"
},
{
"declarator": "QUALIFIER = Bytes.toBytes(\"qual\")",
"modifier": "private static final",
"original_string": "private static final byte[] QUALIFIER = Bytes.toBytes(\"qual\");",
"type": "byte[]",
"var_name": "QUALIFIER"
},
{
"declarator": "ORIGINAL_VALUE = Bytes.toBytes(\"generic-value\")",
"modifier": "private static final",
"original_string": "private static final byte[] ORIGINAL_VALUE = Bytes.toBytes(\"generic-value\");",
"type": "byte[]",
"var_name": "ORIGINAL_VALUE"
},
{
"declarator": "DUMMY_TAGS = Bytes.toBytes(\"tags\")",
"modifier": "private static final",
"original_string": "private static final byte[] DUMMY_TAGS = Bytes.toBytes(\"tags\");",
"type": "byte[]",
"var_name": "DUMMY_TAGS"
},
{
"declarator": "mockBuilder = Mockito.mock(ExtendedCellBuilder.class)",
"modifier": "private final",
"original_string": "private final ExtendedCellBuilder mockBuilder = Mockito.mock(ExtendedCellBuilder.class);",
"type": "ExtendedCellBuilder",
"var_name": "mockBuilder"
},
{
"declarator": "mockCellWithTags = Mockito.mock(ExtendedCell.class)",
"modifier": "private final",
"original_string": "private final ExtendedCell mockCellWithTags = Mockito.mock(ExtendedCell.class);",
"type": "ExtendedCell",
"var_name": "mockCellWithTags"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/MetaDataUtilTest.java",
"identifier": "MetaDataUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetMutationKeyValue() throws Exception {\n String version = VersionInfo.getVersion();\n KeyValueBuilder builder = KeyValueBuilder.get(version);\n KeyValue kv = builder.buildPut(wrap(ROW), wrap(TABLE_FAMILY_BYTES), wrap(QUALIFIER),\n wrap(ORIGINAL_VALUE));\n Put put = new Put(ROW);\n KeyValueBuilder.addQuietly(put, kv);\n\n // read back out the value\n ImmutableBytesPtr ptr = new ImmutableBytesPtr();\n assertTrue(MetaDataUtil.getMutationValue(put, QUALIFIER, builder, ptr));\n assertEquals(\"Value returned doesn't match stored value for \" + builder.getClass().getName()\n + \"!\", 0,\n ByteUtil.BYTES_PTR_COMPARATOR.compare(ptr, wrap(ORIGINAL_VALUE)));\n\n // try again, this time with the clientkeyvalue builder\n if (builder != GenericKeyValueBuilder.INSTANCE) {\n builder = GenericKeyValueBuilder.INSTANCE;\n byte[] value = Bytes.toBytes(\"client-value\");\n kv = builder.buildPut(wrap(ROW), wrap(TABLE_FAMILY_BYTES), wrap(QUALIFIER), wrap(value));\n put = new Put(ROW);\n KeyValueBuilder.addQuietly(put, kv);\n \n // read back out the value\n assertTrue(MetaDataUtil.getMutationValue(put, QUALIFIER, builder, ptr));\n assertEquals(\"Value returned doesn't match stored value for \" + builder.getClass().getName()\n + \"!\", 0,\n ByteUtil.BYTES_PTR_COMPARATOR.compare(ptr, wrap(value)));\n \n // ensure that we don't get matches for qualifiers that don't match\n assertFalse(MetaDataUtil.getMutationValue(put, Bytes.toBytes(\"not a match\"), builder, ptr));\n }\n }",
"class_method_signature": "MetaDataUtilTest.testGetMutationKeyValue()",
"constructor": false,
"full_signature": "@Test public void testGetMutationKeyValue()",
"identifier": "testGetMutationKeyValue",
"invocations": [
"getVersion",
"get",
"buildPut",
"wrap",
"wrap",
"wrap",
"wrap",
"addQuietly",
"assertTrue",
"getMutationValue",
"assertEquals",
"getName",
"getClass",
"compare",
"wrap",
"toBytes",
"buildPut",
"wrap",
"wrap",
"wrap",
"wrap",
"addQuietly",
"assertTrue",
"getMutationValue",
"assertEquals",
"getName",
"getClass",
"compare",
"wrap",
"assertFalse",
"getMutationValue",
"toBytes"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetMutationKeyValue()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MetaDataUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataUtil.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "VIEW_INDEX_TABLE_PREFIX = \"_IDX_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_TABLE_PREFIX = \"_IDX_\";",
"type": "String",
"var_name": "VIEW_INDEX_TABLE_PREFIX"
},
{
"declarator": "LOCAL_INDEX_TABLE_PREFIX = \"_LOCAL_IDX_\"",
"modifier": "public static final",
"original_string": "public static final String LOCAL_INDEX_TABLE_PREFIX = \"_LOCAL_IDX_\";",
"type": "String",
"var_name": "LOCAL_INDEX_TABLE_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_PREFIX = \"_SEQ_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_SEQUENCE_PREFIX = \"_SEQ_\";",
"type": "String",
"var_name": "VIEW_INDEX_SEQUENCE_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_NAME_PREFIX = \"_ID_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_SEQUENCE_NAME_PREFIX = \"_ID_\";",
"type": "String",
"var_name": "VIEW_INDEX_SEQUENCE_NAME_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_PREFIX_BYTES = Bytes.toBytes(VIEW_INDEX_SEQUENCE_PREFIX)",
"modifier": "public static final",
"original_string": "public static final byte[] VIEW_INDEX_SEQUENCE_PREFIX_BYTES = Bytes.toBytes(VIEW_INDEX_SEQUENCE_PREFIX);",
"type": "byte[]",
"var_name": "VIEW_INDEX_SEQUENCE_PREFIX_BYTES"
},
{
"declarator": "VIEW_INDEX_ID_COLUMN_NAME = \"_INDEX_ID\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_ID_COLUMN_NAME = \"_INDEX_ID\";",
"type": "String",
"var_name": "VIEW_INDEX_ID_COLUMN_NAME"
},
{
"declarator": "PARENT_TABLE_KEY = \"PARENT_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String PARENT_TABLE_KEY = \"PARENT_TABLE\";",
"type": "String",
"var_name": "PARENT_TABLE_KEY"
},
{
"declarator": "IS_VIEW_INDEX_TABLE_PROP_NAME = \"IS_VIEW_INDEX_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String IS_VIEW_INDEX_TABLE_PROP_NAME = \"IS_VIEW_INDEX_TABLE\";",
"type": "String",
"var_name": "IS_VIEW_INDEX_TABLE_PROP_NAME"
},
{
"declarator": "IS_VIEW_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_VIEW_INDEX_TABLE_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] IS_VIEW_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_VIEW_INDEX_TABLE_PROP_NAME);",
"type": "byte[]",
"var_name": "IS_VIEW_INDEX_TABLE_PROP_BYTES"
},
{
"declarator": "IS_LOCAL_INDEX_TABLE_PROP_NAME = \"IS_LOCAL_INDEX_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String IS_LOCAL_INDEX_TABLE_PROP_NAME = \"IS_LOCAL_INDEX_TABLE\";",
"type": "String",
"var_name": "IS_LOCAL_INDEX_TABLE_PROP_NAME"
},
{
"declarator": "IS_LOCAL_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_LOCAL_INDEX_TABLE_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] IS_LOCAL_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_LOCAL_INDEX_TABLE_PROP_NAME);",
"type": "byte[]",
"var_name": "IS_LOCAL_INDEX_TABLE_PROP_BYTES"
},
{
"declarator": "DATA_TABLE_NAME_PROP_NAME = \"DATA_TABLE_NAME\"",
"modifier": "public static final",
"original_string": "public static final String DATA_TABLE_NAME_PROP_NAME = \"DATA_TABLE_NAME\";",
"type": "String",
"var_name": "DATA_TABLE_NAME_PROP_NAME"
},
{
"declarator": "DATA_TABLE_NAME_PROP_BYTES = Bytes.toBytes(DATA_TABLE_NAME_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] DATA_TABLE_NAME_PROP_BYTES = Bytes.toBytes(DATA_TABLE_NAME_PROP_NAME);",
"type": "byte[]",
"var_name": "DATA_TABLE_NAME_PROP_BYTES"
},
{
"declarator": "SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES = ImmutableList.of(\n ColumnFamilyDescriptorBuilder.TTL,\n ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS,\n ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE)",
"modifier": "public static final",
"original_string": "public static final List<String> SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES = ImmutableList.of(\n ColumnFamilyDescriptorBuilder.TTL,\n ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS,\n ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE);",
"type": "List<String>",
"var_name": "SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/MetaDataUtil.java",
"identifier": "MetaDataUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "MetaDataUtil.areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"constructor": false,
"full_signature": "public static ClientServerCompatibility areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"identifier": "areClientAndServerCompatible",
"modifiers": "public static",
"parameters": "(long serverHBaseAndPhoenixVersion)",
"return": "ClientServerCompatibility",
"signature": "ClientServerCompatibility areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"constructor": false,
"full_signature": "@VisibleForTesting static ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"identifier": "areClientAndServerCompatible",
"modifiers": "@VisibleForTesting static",
"parameters": "(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"return": "ClientServerCompatibility",
"signature": "ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodePhoenixVersion(long version)",
"constructor": false,
"full_signature": "public static int decodePhoenixVersion(long version)",
"identifier": "decodePhoenixVersion",
"modifiers": "public static",
"parameters": "(long version)",
"return": "int",
"signature": "int decodePhoenixVersion(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.encodeHasIndexWALCodec(long version, boolean isValid)",
"constructor": false,
"full_signature": "public static long encodeHasIndexWALCodec(long version, boolean isValid)",
"identifier": "encodeHasIndexWALCodec",
"modifiers": "public static",
"parameters": "(long version, boolean isValid)",
"return": "long",
"signature": "long encodeHasIndexWALCodec(long version, boolean isValid)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHasIndexWALCodec(long version)",
"constructor": false,
"full_signature": "public static boolean decodeHasIndexWALCodec(long version)",
"identifier": "decodeHasIndexWALCodec",
"modifiers": "public static",
"parameters": "(long version)",
"return": "boolean",
"signature": "boolean decodeHasIndexWALCodec(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHBaseVersion(long version)",
"constructor": false,
"full_signature": "public static int decodeHBaseVersion(long version)",
"identifier": "decodeHBaseVersion",
"modifiers": "public static",
"parameters": "(long version)",
"return": "int",
"signature": "int decodeHBaseVersion(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHBaseVersionAsString(int version)",
"constructor": false,
"full_signature": "public static String decodeHBaseVersionAsString(int version)",
"identifier": "decodeHBaseVersionAsString",
"modifiers": "public static",
"parameters": "(int version)",
"return": "String",
"signature": "String decodeHBaseVersionAsString(int version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeTableNamespaceMappingEnabled(long version)",
"constructor": false,
"full_signature": "public static boolean decodeTableNamespaceMappingEnabled(long version)",
"identifier": "decodeTableNamespaceMappingEnabled",
"modifiers": "public static",
"parameters": "(long version)",
"return": "boolean",
"signature": "boolean decodeTableNamespaceMappingEnabled(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.encodeVersion(String hbaseVersionStr, Configuration config)",
"constructor": false,
"full_signature": "public static long encodeVersion(String hbaseVersionStr, Configuration config)",
"identifier": "encodeVersion",
"modifiers": "public static",
"parameters": "(String hbaseVersionStr, Configuration config)",
"return": "long",
"signature": "long encodeVersion(String hbaseVersionStr, Configuration config)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(Mutation someRow)",
"constructor": false,
"full_signature": "public static byte[] getTenantIdAndSchemaAndTableName(Mutation someRow)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(Mutation someRow)",
"return": "byte[]",
"signature": "byte[] getTenantIdAndSchemaAndTableName(Mutation someRow)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(Result result)",
"constructor": false,
"full_signature": "public static byte[] getTenantIdAndSchemaAndTableName(Result result)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(Result result)",
"return": "byte[]",
"signature": "byte[] getTenantIdAndSchemaAndTableName(Result result)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"constructor": false,
"full_signature": "public static void getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"return": "void",
"signature": "void getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getBaseColumnCount(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static int getBaseColumnCount(List<Mutation> tableMetadata)",
"identifier": "getBaseColumnCount",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "int",
"signature": "int getBaseColumnCount(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"constructor": false,
"full_signature": "public static void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"identifier": "mutatePutValue",
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"return": "void",
"signature": "void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"constructor": false,
"full_signature": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"identifier": "conditionallyAddTagsToPutCells",
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"return": "void",
"signature": "void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"constructor": false,
"full_signature": "public static Put cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"identifier": "cloneDeleteToPutAndAddColumn",
"modifiers": "public static",
"parameters": "(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"return": "Put",
"signature": "Put cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"constructor": false,
"full_signature": "public static void getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"identifier": "getTenantIdAndFunctionName",
"modifiers": "public static",
"parameters": "(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"return": "void",
"signature": "void getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentTableName(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static byte[] getParentTableName(List<Mutation> tableMetadata)",
"identifier": "getParentTableName",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "byte[]",
"signature": "byte[] getParentTableName(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSequenceNumber(Mutation tableMutation)",
"constructor": false,
"full_signature": "public static long getSequenceNumber(Mutation tableMutation)",
"identifier": "getSequenceNumber",
"modifiers": "public static",
"parameters": "(Mutation tableMutation)",
"return": "long",
"signature": "long getSequenceNumber(Mutation tableMutation)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSequenceNumber(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static long getSequenceNumber(List<Mutation> tableMetaData)",
"identifier": "getSequenceNumber",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "long",
"signature": "long getSequenceNumber(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static PTableType getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getTableType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "PTableType",
"signature": "PTableType getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static boolean isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "isNameSpaceMapped",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "boolean",
"signature": "boolean isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static int getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getSaltBuckets",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "int",
"signature": "int getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentSequenceNumber(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static long getParentSequenceNumber(List<Mutation> tableMetaData)",
"identifier": "getParentSequenceNumber",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "long",
"signature": "long getParentSequenceNumber(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Mutation getTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Mutation",
"signature": "Mutation getTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "getMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"constructor": false,
"full_signature": "public static KeyValue getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"identifier": "getMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"return": "KeyValue",
"signature": "KeyValue getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"constructor": false,
"full_signature": "public static boolean setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"identifier": "setMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"return": "boolean",
"signature": "boolean setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Put getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getPutOnlyTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Put",
"signature": "Put getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Put getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"identifier": "getPutOnlyAutoPartitionColumn",
"modifiers": "public static",
"parameters": "(PTable parentTable, List<Mutation> tableMetaData)",
"return": "Put",
"signature": "Put getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Mutation getParentTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getParentTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Mutation",
"signature": "Mutation getParentTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getClientTimeStamp(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static long getClientTimeStamp(List<Mutation> tableMetadata)",
"identifier": "getClientTimeStamp",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "long",
"signature": "long getClientTimeStamp(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getClientTimeStamp(Mutation m)",
"constructor": false,
"full_signature": "public static long getClientTimeStamp(Mutation m)",
"identifier": "getClientTimeStamp",
"modifiers": "public static",
"parameters": "(Mutation m)",
"return": "long",
"signature": "long getClientTimeStamp(Mutation m)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"constructor": false,
"full_signature": "public static byte[] getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"identifier": "getParentLinkKey",
"modifiers": "public static",
"parameters": "(String tenantId, String schemaName, String tableName, String indexName)",
"return": "byte[]",
"signature": "byte[] getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"constructor": false,
"full_signature": "public static byte[] getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"identifier": "getParentLinkKey",
"modifiers": "public static",
"parameters": "(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"return": "byte[]",
"signature": "byte[] getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"constructor": false,
"full_signature": "public static byte[] getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"identifier": "getChildLinkKey",
"modifiers": "public static",
"parameters": "(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"return": "byte[]",
"signature": "byte[] getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getCell(List<Cell> cells, byte[] cq)",
"constructor": false,
"full_signature": "public static Cell getCell(List<Cell> cells, byte[] cq)",
"identifier": "getCell",
"modifiers": "public static",
"parameters": "(List<Cell> cells, byte[] cq)",
"return": "Cell",
"signature": "Cell getCell(List<Cell> cells, byte[] cq)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isMultiTenant",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isTransactional",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isSalted",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexPhysicalName(byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static byte[] getViewIndexPhysicalName(byte[] physicalTableName)",
"identifier": "getViewIndexPhysicalName",
"modifiers": "public static",
"parameters": "(byte[] physicalTableName)",
"return": "byte[]",
"signature": "byte[] getViewIndexPhysicalName(byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexPhysicalName(String physicalTableName)",
"constructor": false,
"full_signature": "public static String getViewIndexPhysicalName(String physicalTableName)",
"identifier": "getViewIndexPhysicalName",
"modifiers": "public static",
"parameters": "(String physicalTableName)",
"return": "String",
"signature": "String getViewIndexPhysicalName(String physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"constructor": false,
"full_signature": "private static byte[] getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"identifier": "getIndexPhysicalName",
"modifiers": "private static",
"parameters": "(byte[] physicalTableName, String indexPrefix)",
"return": "byte[]",
"signature": "byte[] getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"constructor": false,
"full_signature": "private static String getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"identifier": "getIndexPhysicalName",
"modifiers": "private static",
"parameters": "(String physicalTableName, String indexPrefix)",
"return": "String",
"signature": "String getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexPhysicalName(byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static byte[] getLocalIndexPhysicalName(byte[] physicalTableName)",
"identifier": "getLocalIndexPhysicalName",
"modifiers": "public static",
"parameters": "(byte[] physicalTableName)",
"return": "byte[]",
"signature": "byte[] getLocalIndexPhysicalName(byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexTableName(String tableName)",
"constructor": false,
"full_signature": "public static String getLocalIndexTableName(String tableName)",
"identifier": "getLocalIndexTableName",
"modifiers": "public static",
"parameters": "(String tableName)",
"return": "String",
"signature": "String getLocalIndexTableName(String tableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexSchemaName(String schemaName)",
"constructor": false,
"full_signature": "public static String getLocalIndexSchemaName(String schemaName)",
"identifier": "getLocalIndexSchemaName",
"modifiers": "public static",
"parameters": "(String schemaName)",
"return": "String",
"signature": "String getLocalIndexSchemaName(String schemaName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexUserTableName(String localIndexTableName)",
"constructor": false,
"full_signature": "public static String getLocalIndexUserTableName(String localIndexTableName)",
"identifier": "getLocalIndexUserTableName",
"modifiers": "public static",
"parameters": "(String localIndexTableName)",
"return": "String",
"signature": "String getLocalIndexUserTableName(String localIndexTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexUserTableName(String viewIndexTableName)",
"constructor": false,
"full_signature": "public static String getViewIndexUserTableName(String viewIndexTableName)",
"identifier": "getViewIndexUserTableName",
"modifiers": "public static",
"parameters": "(String viewIndexTableName)",
"return": "String",
"signature": "String getViewIndexUserTableName(String viewIndexTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceSchemaName",
"modifiers": "public static",
"parameters": "(PName physicalName, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceName",
"modifiers": "public static",
"parameters": "(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static SequenceKey getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceKey",
"modifiers": "public static",
"parameters": "(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"return": "SequenceKey",
"signature": "SequenceKey getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceSchemaName",
"modifiers": "public static",
"parameters": "(PName physicalName, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceName",
"modifiers": "public static",
"parameters": "(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static SequenceKey getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceKey",
"modifiers": "public static",
"parameters": "(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"return": "SequenceKey",
"signature": "SequenceKey getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexIdDataType()",
"constructor": false,
"full_signature": "public static PDataType getViewIndexIdDataType()",
"identifier": "getViewIndexIdDataType",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getViewIndexIdDataType()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLegacyViewIndexIdDataType()",
"constructor": false,
"full_signature": "public static PDataType getLegacyViewIndexIdDataType()",
"identifier": "getLegacyViewIndexIdDataType",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getLegacyViewIndexIdDataType()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexIdColumnName()",
"constructor": false,
"full_signature": "public static String getViewIndexIdColumnName()",
"identifier": "getViewIndexIdColumnName",
"modifiers": "public static",
"parameters": "()",
"return": "String",
"signature": "String getViewIndexIdColumnName()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"constructor": false,
"full_signature": "public static boolean hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"identifier": "hasViewIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName physicalName)",
"return": "boolean",
"signature": "boolean hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static boolean hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"identifier": "hasViewIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, byte[] physicalTableName)",
"return": "boolean",
"signature": "boolean hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"identifier": "hasLocalIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName physicalName)",
"return": "boolean",
"signature": "boolean hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"identifier": "hasLocalIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, byte[] physicalTableName)",
"return": "boolean",
"signature": "boolean hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexColumnFamily(TableDescriptor desc)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexColumnFamily(TableDescriptor desc)",
"identifier": "hasLocalIndexColumnFamily",
"modifiers": "public static",
"parameters": "(TableDescriptor desc)",
"return": "boolean",
"signature": "boolean hasLocalIndexColumnFamily(TableDescriptor desc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"constructor": false,
"full_signature": "public static List<byte[]> getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"identifier": "getNonLocalIndexColumnFamilies",
"modifiers": "public static",
"parameters": "(TableDescriptor desc)",
"return": "List<byte[]>",
"signature": "List<byte[]> getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static List<byte[]> getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"identifier": "getLocalIndexColumnFamilies",
"modifiers": "public static",
"parameters": "(PhoenixConnection conn, byte[] physicalTableName)",
"return": "List<byte[]>",
"signature": "List<byte[]> getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static void deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"identifier": "deleteViewIndexSequences",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"return": "void",
"signature": "void deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.tableRegionsOnline(Configuration conf, PTable table)",
"constructor": false,
"full_signature": "public static boolean tableRegionsOnline(Configuration conf, PTable table)",
"identifier": "tableRegionsOnline",
"modifiers": "public static",
"parameters": "(Configuration conf, PTable table)",
"return": "boolean",
"signature": "boolean tableRegionsOnline(Configuration conf, PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.propertyNotAllowedToBeOutOfSync(String colFamProp)",
"constructor": false,
"full_signature": "public static boolean propertyNotAllowedToBeOutOfSync(String colFamProp)",
"identifier": "propertyNotAllowedToBeOutOfSync",
"modifiers": "public static",
"parameters": "(String colFamProp)",
"return": "boolean",
"signature": "boolean propertyNotAllowedToBeOutOfSync(String colFamProp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"constructor": false,
"full_signature": "public static Map<String, Object> getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"identifier": "getSyncedProps",
"modifiers": "public static",
"parameters": "(ColumnFamilyDescriptor defaultCFDesc)",
"return": "Map<String, Object>",
"signature": "Map<String, Object> getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"constructor": false,
"full_signature": "public static Scan newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"identifier": "newTableRowsScan",
"modifiers": "public static",
"parameters": "(byte[] key, long startTimeStamp, long stopTimeStamp)",
"return": "Scan",
"signature": "Scan newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"constructor": false,
"full_signature": "public static Scan newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"identifier": "newTableRowsScan",
"modifiers": "public static",
"parameters": "(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"return": "Scan",
"signature": "Scan newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLinkType(Mutation tableMutation)",
"constructor": false,
"full_signature": "public static LinkType getLinkType(Mutation tableMutation)",
"identifier": "getLinkType",
"modifiers": "public static",
"parameters": "(Mutation tableMutation)",
"return": "LinkType",
"signature": "LinkType getLinkType(Mutation tableMutation)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLinkType(Collection<Cell> kvs)",
"constructor": false,
"full_signature": "public static LinkType getLinkType(Collection<Cell> kvs)",
"identifier": "getLinkType",
"modifiers": "public static",
"parameters": "(Collection<Cell> kvs)",
"return": "LinkType",
"signature": "LinkType getLinkType(Collection<Cell> kvs)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndex(String physicalName)",
"constructor": false,
"full_signature": "public static boolean isLocalIndex(String physicalName)",
"identifier": "isLocalIndex",
"modifiers": "public static",
"parameters": "(String physicalName)",
"return": "boolean",
"signature": "boolean isLocalIndex(String physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isViewIndex(String physicalName)",
"constructor": false,
"full_signature": "public static boolean isViewIndex(String physicalName)",
"identifier": "isViewIndex",
"modifiers": "public static",
"parameters": "(String physicalName)",
"return": "boolean",
"signature": "boolean isViewIndex(String physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getAutoPartitionColumnName(PTable parentTable)",
"constructor": false,
"full_signature": "public static String getAutoPartitionColumnName(PTable parentTable)",
"identifier": "getAutoPartitionColumnName",
"modifiers": "public static",
"parameters": "(PTable parentTable)",
"return": "String",
"signature": "String getAutoPartitionColumnName(PTable parentTable)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getAutoPartitionColIndex(PTable parentTable)",
"constructor": false,
"full_signature": "public static int getAutoPartitionColIndex(PTable parentTable)",
"identifier": "getAutoPartitionColIndex",
"modifiers": "public static",
"parameters": "(PTable parentTable)",
"return": "int",
"signature": "int getAutoPartitionColIndex(PTable parentTable)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getJdbcUrl(RegionCoprocessorEnvironment env)",
"constructor": false,
"full_signature": "public static String getJdbcUrl(RegionCoprocessorEnvironment env)",
"identifier": "getJdbcUrl",
"modifiers": "public static",
"parameters": "(RegionCoprocessorEnvironment env)",
"return": "String",
"signature": "String getJdbcUrl(RegionCoprocessorEnvironment env)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isHColumnProperty(String propName)",
"constructor": false,
"full_signature": "public static boolean isHColumnProperty(String propName)",
"identifier": "isHColumnProperty",
"modifiers": "public static",
"parameters": "(String propName)",
"return": "boolean",
"signature": "boolean isHColumnProperty(String propName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isHTableProperty(String propName)",
"constructor": false,
"full_signature": "public static boolean isHTableProperty(String propName)",
"identifier": "isHTableProperty",
"modifiers": "public static",
"parameters": "(String propName)",
"return": "boolean",
"signature": "boolean isHTableProperty(String propName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"constructor": false,
"full_signature": "public static boolean isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"identifier": "isLocalIndexFamily",
"modifiers": "public static",
"parameters": "(ImmutableBytesPtr cfPtr)",
"return": "boolean",
"signature": "boolean isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndexFamily(byte[] cf)",
"constructor": false,
"full_signature": "public static boolean isLocalIndexFamily(byte[] cf)",
"identifier": "isLocalIndexFamily",
"modifiers": "public static",
"parameters": "(byte[] cf)",
"return": "boolean",
"signature": "boolean isLocalIndexFamily(byte[] cf)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPhysicalTableRowForView(PTable view)",
"constructor": false,
"full_signature": "public static final byte[] getPhysicalTableRowForView(PTable view)",
"identifier": "getPhysicalTableRowForView",
"modifiers": "public static final",
"parameters": "(PTable view)",
"return": "byte[]",
"signature": "byte[] getPhysicalTableRowForView(PTable view)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.removeChildLinkMutations(List<Mutation> metadataMutations)",
"constructor": false,
"full_signature": "public static List<Mutation> removeChildLinkMutations(List<Mutation> metadataMutations)",
"identifier": "removeChildLinkMutations",
"modifiers": "public static",
"parameters": "(List<Mutation> metadataMutations)",
"return": "List<Mutation>",
"signature": "List<Mutation> removeChildLinkMutations(List<Mutation> metadataMutations)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static IndexType getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getIndexType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "IndexType",
"signature": "IndexType getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static PDataType<?> getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"identifier": "getIndexDataType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"return": "PDataType<?>",
"signature": "PDataType<?> getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"constructor": false,
"full_signature": "public static PColumn getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"identifier": "getColumn",
"modifiers": "public static",
"parameters": "(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"return": "PColumn",
"signature": "PColumn getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"constructor": false,
"full_signature": "public static void deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"identifier": "deleteFromStatsTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"return": "void",
"signature": "void deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr) {\n List<Cell> kvs = headerRow.getFamilyCellMap().get(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES);\n if (kvs != null) {\n for (Cell cell : kvs) {\n KeyValue kv = PhoenixKeyValueUtil.maybeCopyCell(cell);\n if (builder.compareQualifier(kv, key, 0, key.length) ==0) {\n builder.getValueAsPtr(kv, ptr);\n return true;\n }\n }\n }\n return false;\n }",
"class_method_signature": "MetaDataUtil.getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "getMutationValue",
"invocations": [
"get",
"getFamilyCellMap",
"maybeCopyCell",
"compareQualifier",
"getValueAsPtr"
],
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_112 | {
"fields": [
{
"declarator": "testCache = null",
"modifier": "static",
"original_string": "static GuidePostsCache testCache = null;",
"type": "GuidePostsCache",
"var_name": "testCache"
},
{
"declarator": "phoenixStatsLoader = null",
"modifier": "static",
"original_string": "static PhoenixStatsLoader phoenixStatsLoader = null;",
"type": "PhoenixStatsLoader",
"var_name": "phoenixStatsLoader"
},
{
"declarator": "helper",
"modifier": "private",
"original_string": "private GuidePostsCacheProvider helper;",
"type": "GuidePostsCacheProvider",
"var_name": "helper"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/query/GuidePostsCacheProviderTest.java",
"identifier": "GuidePostsCacheProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = PhoenixNonRetryableRuntimeException.class)\n public void loadAndGetGuidePostsCacheFactoryNonImplementingClassFailure(){\n helper.loadAndGetGuidePostsCacheFactory(Object.class.getTypeName());\n }",
"class_method_signature": "GuidePostsCacheProviderTest.loadAndGetGuidePostsCacheFactoryNonImplementingClassFailure()",
"constructor": false,
"full_signature": "@Test(expected = PhoenixNonRetryableRuntimeException.class) public void loadAndGetGuidePostsCacheFactoryNonImplementingClassFailure()",
"identifier": "loadAndGetGuidePostsCacheFactoryNonImplementingClassFailure",
"invocations": [
"loadAndGetGuidePostsCacheFactory",
"getTypeName"
],
"modifiers": "@Test(expected = PhoenixNonRetryableRuntimeException.class) public",
"parameters": "()",
"return": "void",
"signature": "void loadAndGetGuidePostsCacheFactoryNonImplementingClassFailure()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "guidePostsCacheFactory = null",
"modifier": "",
"original_string": "GuidePostsCacheFactory guidePostsCacheFactory = null;",
"type": "GuidePostsCacheFactory",
"var_name": "guidePostsCacheFactory"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/query/GuidePostsCacheProvider.java",
"identifier": "GuidePostsCacheProvider",
"interfaces": "",
"methods": [
{
"class_method_signature": "GuidePostsCacheProvider.loadAndGetGuidePostsCacheFactory(String classString)",
"constructor": false,
"full_signature": "@VisibleForTesting GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString)",
"identifier": "loadAndGetGuidePostsCacheFactory",
"modifiers": "@VisibleForTesting",
"parameters": "(String classString)",
"return": "GuidePostsCacheFactory",
"signature": "GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString)",
"testcase": false
},
{
"class_method_signature": "GuidePostsCacheProvider.getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"constructor": false,
"full_signature": "public GuidePostsCacheWrapper getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"identifier": "getGuidePostsCache",
"modifiers": "public",
"parameters": "(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"return": "GuidePostsCacheWrapper",
"signature": "GuidePostsCacheWrapper getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting\n GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString) {\n Preconditions.checkNotNull(classString);\n if (guidePostsCacheFactory == null) {\n try {\n\n Class clazz = Class.forName(classString);\n if (!GuidePostsCacheFactory.class.isAssignableFrom(clazz)) {\n String msg = String.format(\n \"Could not load/instantiate class %s is not an instance of GuidePostsCacheFactory\",\n classString);\n LOGGER.error(msg);\n throw new PhoenixNonRetryableRuntimeException(msg);\n }\n\n List<GuidePostsCacheFactory> factoryList = InstanceResolver.get(GuidePostsCacheFactory.class, null);\n for (GuidePostsCacheFactory factory : factoryList) {\n if (clazz.isInstance(factory)) {\n guidePostsCacheFactory = factory;\n LOGGER.info(String.format(\"Sucessfully loaded class for GuidePostsCacheFactor of type: %s\",\n classString));\n break;\n }\n }\n if (guidePostsCacheFactory == null) {\n String msg = String.format(\"Could not load/instantiate class %s\", classString);\n LOGGER.error(msg);\n throw new PhoenixNonRetryableRuntimeException(msg);\n }\n } catch (ClassNotFoundException e) {\n LOGGER.error(String.format(\"Could not load/instantiate class %s\", classString), e);\n throw new PhoenixNonRetryableRuntimeException(e);\n }\n }\n return guidePostsCacheFactory;\n }",
"class_method_signature": "GuidePostsCacheProvider.loadAndGetGuidePostsCacheFactory(String classString)",
"constructor": false,
"full_signature": "@VisibleForTesting GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString)",
"identifier": "loadAndGetGuidePostsCacheFactory",
"invocations": [
"checkNotNull",
"forName",
"isAssignableFrom",
"format",
"error",
"get",
"isInstance",
"info",
"format",
"format",
"error",
"error",
"format"
],
"modifiers": "@VisibleForTesting",
"parameters": "(String classString)",
"return": "GuidePostsCacheFactory",
"signature": "GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_145 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/mapreduce/CsvBulkImportUtilTest.java",
"identifier": "CsvBulkImportUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetChar_NotPresent() {\n Configuration conf = new Configuration();\n assertNull(CsvBulkImportUtil.getCharacter(conf, \"conf.key\"));\n }",
"class_method_signature": "CsvBulkImportUtilTest.testGetChar_NotPresent()",
"constructor": false,
"full_signature": "@Test public void testGetChar_NotPresent()",
"identifier": "testGetChar_NotPresent",
"invocations": [
"assertNull",
"getCharacter"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetChar_NotPresent()",
"testcase": true
} | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/mapreduce/CsvBulkImportUtil.java",
"identifier": "CsvBulkImportUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "CsvBulkImportUtil.initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"constructor": false,
"full_signature": "public static void initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"identifier": "initCsvImportJob",
"modifiers": "public static",
"parameters": "(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"return": "void",
"signature": "void initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"constructor": false,
"full_signature": "public static void configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"identifier": "configurePreUpsertProcessor",
"modifiers": "public static",
"parameters": "(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"return": "void",
"signature": "void configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.setChar(Configuration conf, String confKey, char charValue)",
"constructor": false,
"full_signature": "@VisibleForTesting static void setChar(Configuration conf, String confKey, char charValue)",
"identifier": "setChar",
"modifiers": "@VisibleForTesting static",
"parameters": "(Configuration conf, String confKey, char charValue)",
"return": "void",
"signature": "void setChar(Configuration conf, String confKey, char charValue)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.getCharacter(Configuration conf, String confKey)",
"constructor": false,
"full_signature": "@VisibleForTesting static Character getCharacter(Configuration conf, String confKey)",
"identifier": "getCharacter",
"modifiers": "@VisibleForTesting static",
"parameters": "(Configuration conf, String confKey)",
"return": "Character",
"signature": "Character getCharacter(Configuration conf, String confKey)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.getOutputPath(Path outputdir, String tableName)",
"constructor": false,
"full_signature": "public static Path getOutputPath(Path outputdir, String tableName)",
"identifier": "getOutputPath",
"modifiers": "public static",
"parameters": "(Path outputdir, String tableName)",
"return": "Path",
"signature": "Path getOutputPath(Path outputdir, String tableName)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting\n static Character getCharacter(Configuration conf, String confKey) {\n String strValue = conf.get(confKey);\n if (strValue == null) {\n return null;\n }\n return new String(Base64.getDecoder().decode(strValue)).charAt(0);\n }",
"class_method_signature": "CsvBulkImportUtil.getCharacter(Configuration conf, String confKey)",
"constructor": false,
"full_signature": "@VisibleForTesting static Character getCharacter(Configuration conf, String confKey)",
"identifier": "getCharacter",
"invocations": [
"get",
"charAt",
"decode",
"getDecoder"
],
"modifiers": "@VisibleForTesting static",
"parameters": "(Configuration conf, String confKey)",
"return": "Character",
"signature": "Character getCharacter(Configuration conf, String confKey)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_50 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java",
"identifier": "JDBCUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetMaxMutateBytes() throws Exception {\n assertEquals(1000L, JDBCUtil.getMutateBatchSizeBytes(\"localhost;\" + PhoenixRuntime.UPSERT_BATCH_SIZE_BYTES_ATTRIB +\n \"=1000\", new Properties(), ReadOnlyProps.EMPTY_PROPS));\n\n Properties props = new Properties();\n props.setProperty(PhoenixRuntime.UPSERT_BATCH_SIZE_BYTES_ATTRIB, \"2000\");\n assertEquals(2000L, JDBCUtil.getMutateBatchSizeBytes(\"localhost\", props, ReadOnlyProps.EMPTY_PROPS));\n\n Map<String, String> propMap = Maps.newHashMap();\n propMap.put(QueryServices.MUTATE_BATCH_SIZE_BYTES_ATTRIB, \"3000\");\n ReadOnlyProps readOnlyProps = new ReadOnlyProps(propMap);\n assertEquals(3000L, JDBCUtil.getMutateBatchSizeBytes(\"localhost\", new Properties(), readOnlyProps));\n }",
"class_method_signature": "JDBCUtilTest.testGetMaxMutateBytes()",
"constructor": false,
"full_signature": "@Test public void testGetMaxMutateBytes()",
"identifier": "testGetMaxMutateBytes",
"invocations": [
"assertEquals",
"getMutateBatchSizeBytes",
"setProperty",
"assertEquals",
"getMutateBatchSizeBytes",
"newHashMap",
"put",
"assertEquals",
"getMutateBatchSizeBytes"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetMaxMutateBytes()",
"testcase": true
} | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java",
"identifier": "JDBCUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "JDBCUtil.JDBCUtil()",
"constructor": true,
"full_signature": "private JDBCUtil()",
"identifier": "JDBCUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " JDBCUtil()",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.findProperty(String url, Properties info, String propName)",
"constructor": false,
"full_signature": "public static String findProperty(String url, Properties info, String propName)",
"identifier": "findProperty",
"modifiers": "public static",
"parameters": "(String url, Properties info, String propName)",
"return": "String",
"signature": "String findProperty(String url, Properties info, String propName)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.removeProperty(String url, String propName)",
"constructor": false,
"full_signature": "public static String removeProperty(String url, String propName)",
"identifier": "removeProperty",
"modifiers": "public static",
"parameters": "(String url, String propName)",
"return": "String",
"signature": "String removeProperty(String url, String propName)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getCombinedConnectionProperties(String url, Properties info)",
"constructor": false,
"full_signature": "private static Map<String, String> getCombinedConnectionProperties(String url, Properties info)",
"identifier": "getCombinedConnectionProperties",
"modifiers": "private static",
"parameters": "(String url, Properties info)",
"return": "Map<String, String>",
"signature": "Map<String, String> getCombinedConnectionProperties(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getAnnotations(@NonNull String url, @NonNull Properties info)",
"constructor": false,
"full_signature": "public static Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info)",
"identifier": "getAnnotations",
"modifiers": "public static",
"parameters": "(@NonNull String url, @NonNull Properties info)",
"return": "Map<String, String>",
"signature": "Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getCurrentSCN(String url, Properties info)",
"constructor": false,
"full_signature": "public static Long getCurrentSCN(String url, Properties info)",
"identifier": "getCurrentSCN",
"modifiers": "public static",
"parameters": "(String url, Properties info)",
"return": "Long",
"signature": "Long getCurrentSCN(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getBuildIndexSCN(String url, Properties info)",
"constructor": false,
"full_signature": "public static Long getBuildIndexSCN(String url, Properties info)",
"identifier": "getBuildIndexSCN",
"modifiers": "public static",
"parameters": "(String url, Properties info)",
"return": "Long",
"signature": "Long getBuildIndexSCN(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static int getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"identifier": "getMutateBatchSize",
"modifiers": "public static",
"parameters": "(String url, Properties info, ReadOnlyProps props)",
"return": "int",
"signature": "int getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"identifier": "getMutateBatchSizeBytes",
"modifiers": "public static",
"parameters": "(String url, Properties info, ReadOnlyProps props)",
"return": "long",
"signature": "long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getTenantId(String url, Properties info)",
"constructor": false,
"full_signature": "public static @Nullable PName getTenantId(String url, Properties info)",
"identifier": "getTenantId",
"modifiers": "public static @Nullable",
"parameters": "(String url, Properties info)",
"return": "PName",
"signature": "PName getTenantId(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getAutoCommit(String url, Properties info, boolean defaultValue)",
"constructor": false,
"full_signature": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"identifier": "getAutoCommit",
"modifiers": "public static",
"parameters": "(String url, Properties info, boolean defaultValue)",
"return": "boolean",
"signature": "boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getConsistencyLevel(String url, Properties info, String defaultValue)",
"constructor": false,
"full_signature": "public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"identifier": "getConsistencyLevel",
"modifiers": "public static",
"parameters": "(String url, Properties info, String defaultValue)",
"return": "Consistency",
"signature": "Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"constructor": false,
"full_signature": "public static boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"identifier": "isCollectingRequestLevelMetricsEnabled",
"modifiers": "public static",
"parameters": "(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"return": "boolean",
"signature": "boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getSchema(String url, Properties info, String defaultValue)",
"constructor": false,
"full_signature": "public static String getSchema(String url, Properties info, String defaultValue)",
"identifier": "getSchema",
"modifiers": "public static",
"parameters": "(String url, Properties info, String defaultValue)",
"return": "String",
"signature": "String getSchema(String url, Properties info, String defaultValue)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props) throws SQLException {\n String batchSizeStr = findProperty(url, info, PhoenixRuntime.UPSERT_BATCH_SIZE_BYTES_ATTRIB);\n return (batchSizeStr == null ? props.getLong(QueryServices.MUTATE_BATCH_SIZE_BYTES_ATTRIB, QueryServicesOptions.DEFAULT_MUTATE_BATCH_SIZE_BYTES) : Long.parseLong(batchSizeStr));\n }",
"class_method_signature": "JDBCUtil.getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"identifier": "getMutateBatchSizeBytes",
"invocations": [
"findProperty",
"getLong",
"parseLong"
],
"modifiers": "public static",
"parameters": "(String url, Properties info, ReadOnlyProps props)",
"return": "long",
"signature": "long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_46 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java",
"identifier": "JDBCUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetAutoCommit_FalseInProperties() {\n Properties props = new Properties();\n props.setProperty(\"AutoCommit\", \"false\");\n assertFalse(JDBCUtil.getAutoCommit(\"localhost\", props, false));\n }",
"class_method_signature": "JDBCUtilTest.testGetAutoCommit_FalseInProperties()",
"constructor": false,
"full_signature": "@Test public void testGetAutoCommit_FalseInProperties()",
"identifier": "testGetAutoCommit_FalseInProperties",
"invocations": [
"setProperty",
"assertFalse",
"getAutoCommit"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetAutoCommit_FalseInProperties()",
"testcase": true
} | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java",
"identifier": "JDBCUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "JDBCUtil.JDBCUtil()",
"constructor": true,
"full_signature": "private JDBCUtil()",
"identifier": "JDBCUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " JDBCUtil()",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.findProperty(String url, Properties info, String propName)",
"constructor": false,
"full_signature": "public static String findProperty(String url, Properties info, String propName)",
"identifier": "findProperty",
"modifiers": "public static",
"parameters": "(String url, Properties info, String propName)",
"return": "String",
"signature": "String findProperty(String url, Properties info, String propName)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.removeProperty(String url, String propName)",
"constructor": false,
"full_signature": "public static String removeProperty(String url, String propName)",
"identifier": "removeProperty",
"modifiers": "public static",
"parameters": "(String url, String propName)",
"return": "String",
"signature": "String removeProperty(String url, String propName)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getCombinedConnectionProperties(String url, Properties info)",
"constructor": false,
"full_signature": "private static Map<String, String> getCombinedConnectionProperties(String url, Properties info)",
"identifier": "getCombinedConnectionProperties",
"modifiers": "private static",
"parameters": "(String url, Properties info)",
"return": "Map<String, String>",
"signature": "Map<String, String> getCombinedConnectionProperties(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getAnnotations(@NonNull String url, @NonNull Properties info)",
"constructor": false,
"full_signature": "public static Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info)",
"identifier": "getAnnotations",
"modifiers": "public static",
"parameters": "(@NonNull String url, @NonNull Properties info)",
"return": "Map<String, String>",
"signature": "Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getCurrentSCN(String url, Properties info)",
"constructor": false,
"full_signature": "public static Long getCurrentSCN(String url, Properties info)",
"identifier": "getCurrentSCN",
"modifiers": "public static",
"parameters": "(String url, Properties info)",
"return": "Long",
"signature": "Long getCurrentSCN(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getBuildIndexSCN(String url, Properties info)",
"constructor": false,
"full_signature": "public static Long getBuildIndexSCN(String url, Properties info)",
"identifier": "getBuildIndexSCN",
"modifiers": "public static",
"parameters": "(String url, Properties info)",
"return": "Long",
"signature": "Long getBuildIndexSCN(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static int getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"identifier": "getMutateBatchSize",
"modifiers": "public static",
"parameters": "(String url, Properties info, ReadOnlyProps props)",
"return": "int",
"signature": "int getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"identifier": "getMutateBatchSizeBytes",
"modifiers": "public static",
"parameters": "(String url, Properties info, ReadOnlyProps props)",
"return": "long",
"signature": "long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getTenantId(String url, Properties info)",
"constructor": false,
"full_signature": "public static @Nullable PName getTenantId(String url, Properties info)",
"identifier": "getTenantId",
"modifiers": "public static @Nullable",
"parameters": "(String url, Properties info)",
"return": "PName",
"signature": "PName getTenantId(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getAutoCommit(String url, Properties info, boolean defaultValue)",
"constructor": false,
"full_signature": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"identifier": "getAutoCommit",
"modifiers": "public static",
"parameters": "(String url, Properties info, boolean defaultValue)",
"return": "boolean",
"signature": "boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getConsistencyLevel(String url, Properties info, String defaultValue)",
"constructor": false,
"full_signature": "public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"identifier": "getConsistencyLevel",
"modifiers": "public static",
"parameters": "(String url, Properties info, String defaultValue)",
"return": "Consistency",
"signature": "Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"constructor": false,
"full_signature": "public static boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"identifier": "isCollectingRequestLevelMetricsEnabled",
"modifiers": "public static",
"parameters": "(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"return": "boolean",
"signature": "boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getSchema(String url, Properties info, String defaultValue)",
"constructor": false,
"full_signature": "public static String getSchema(String url, Properties info, String defaultValue)",
"identifier": "getSchema",
"modifiers": "public static",
"parameters": "(String url, Properties info, String defaultValue)",
"return": "String",
"signature": "String getSchema(String url, Properties info, String defaultValue)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue) {\n String autoCommit = findProperty(url, info, PhoenixRuntime.AUTO_COMMIT_ATTRIB);\n if (autoCommit == null) {\n return defaultValue;\n }\n return Boolean.valueOf(autoCommit);\n }",
"class_method_signature": "JDBCUtil.getAutoCommit(String url, Properties info, boolean defaultValue)",
"constructor": false,
"full_signature": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"identifier": "getAutoCommit",
"invocations": [
"findProperty",
"valueOf"
],
"modifiers": "public static",
"parameters": "(String url, Properties info, boolean defaultValue)",
"return": "boolean",
"signature": "boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_153 | {
"fields": [
{
"declarator": "scanRanges",
"modifier": "private final",
"original_string": "private final ScanRanges scanRanges;",
"type": "ScanRanges",
"var_name": "scanRanges"
},
{
"declarator": "keyRange",
"modifier": "private final",
"original_string": "private final KeyRange keyRange;",
"type": "KeyRange",
"var_name": "keyRange"
},
{
"declarator": "expectedResult",
"modifier": "private final",
"original_string": "private final boolean expectedResult;",
"type": "boolean",
"var_name": "expectedResult"
},
{
"declarator": "ARRAY_TO_LIST = \n new Function<KeyRange[], List<KeyRange>>() {\n @Override \n public List<KeyRange> apply(KeyRange[] input) {\n return Lists.newArrayList(input);\n }\n }",
"modifier": "private static final",
"original_string": "private static final Function<KeyRange[], List<KeyRange>> ARRAY_TO_LIST = \n new Function<KeyRange[], List<KeyRange>>() {\n @Override \n public List<KeyRange> apply(KeyRange[] input) {\n return Lists.newArrayList(input);\n }\n };",
"type": "Function<KeyRange[], List<KeyRange>>",
"var_name": "ARRAY_TO_LIST"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/compile/ScanRangesTest.java",
"identifier": "ScanRangesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() {\n byte[] lowerInclusiveKey = keyRange.getLowerRange();\n if (!keyRange.isLowerInclusive() && !Bytes.equals(lowerInclusiveKey, KeyRange.UNBOUND)) {\n // This assumes the last key is fixed length, otherwise the results may be incorrect\n // since there's no terminating 0 byte for a variable length key and thus we may be\n // incrementing the key too much.\n lowerInclusiveKey = ByteUtil.nextKey(lowerInclusiveKey);\n }\n byte[] upperExclusiveKey = keyRange.getUpperRange();\n if (keyRange.isUpperInclusive()) {\n // This assumes the last key is fixed length, otherwise the results may be incorrect\n // since there's no terminating 0 byte for a variable length key and thus we may be\n // incrementing the key too much.\n upperExclusiveKey = ByteUtil.nextKey(upperExclusiveKey);\n }\n assertEquals(expectedResult, scanRanges.intersectRegion(lowerInclusiveKey,upperExclusiveKey,false));\n }",
"class_method_signature": "ScanRangesTest.test()",
"constructor": false,
"full_signature": "@Test public void test()",
"identifier": "test",
"invocations": [
"getLowerRange",
"isLowerInclusive",
"equals",
"nextKey",
"getUpperRange",
"isUpperInclusive",
"nextKey",
"assertEquals",
"intersectRegion"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void test()",
"testcase": true
} | {
"fields": [
{
"declarator": "EVERYTHING_RANGES = Collections.<List<KeyRange>>emptyList()",
"modifier": "private static final",
"original_string": "private static final List<List<KeyRange>> EVERYTHING_RANGES = Collections.<List<KeyRange>>emptyList();",
"type": "List<List<KeyRange>>",
"var_name": "EVERYTHING_RANGES"
},
{
"declarator": "NOTHING_RANGES = Collections.<List<KeyRange>>singletonList(Collections.<KeyRange>singletonList(KeyRange.EMPTY_RANGE))",
"modifier": "private static final",
"original_string": "private static final List<List<KeyRange>> NOTHING_RANGES = Collections.<List<KeyRange>>singletonList(Collections.<KeyRange>singletonList(KeyRange.EMPTY_RANGE));",
"type": "List<List<KeyRange>>",
"var_name": "NOTHING_RANGES"
},
{
"declarator": "EVERYTHING = new ScanRanges(null,ScanUtil.SINGLE_COLUMN_SLOT_SPAN,EVERYTHING_RANGES, KeyRange.EVERYTHING_RANGE, false, false, null, null)",
"modifier": "public static final",
"original_string": "public static final ScanRanges EVERYTHING = new ScanRanges(null,ScanUtil.SINGLE_COLUMN_SLOT_SPAN,EVERYTHING_RANGES, KeyRange.EVERYTHING_RANGE, false, false, null, null);",
"type": "ScanRanges",
"var_name": "EVERYTHING"
},
{
"declarator": "NOTHING = new ScanRanges(null,ScanUtil.SINGLE_COLUMN_SLOT_SPAN,NOTHING_RANGES, KeyRange.EMPTY_RANGE, false, false, null, null)",
"modifier": "public static final",
"original_string": "public static final ScanRanges NOTHING = new ScanRanges(null,ScanUtil.SINGLE_COLUMN_SLOT_SPAN,NOTHING_RANGES, KeyRange.EMPTY_RANGE, false, false, null, null);",
"type": "ScanRanges",
"var_name": "NOTHING"
},
{
"declarator": "HAS_INTERSECTION = new Scan()",
"modifier": "private static final",
"original_string": "private static final Scan HAS_INTERSECTION = new Scan();",
"type": "Scan",
"var_name": "HAS_INTERSECTION"
},
{
"declarator": "filter",
"modifier": "private",
"original_string": "private SkipScanFilter filter;",
"type": "SkipScanFilter",
"var_name": "filter"
},
{
"declarator": "ranges",
"modifier": "private final",
"original_string": "private final List<List<KeyRange>> ranges;",
"type": "List<List<KeyRange>>",
"var_name": "ranges"
},
{
"declarator": "slotSpan",
"modifier": "private final",
"original_string": "private final int[] slotSpan;",
"type": "int[]",
"var_name": "slotSpan"
},
{
"declarator": "schema",
"modifier": "private final",
"original_string": "private final RowKeySchema schema;",
"type": "RowKeySchema",
"var_name": "schema"
},
{
"declarator": "isPointLookup",
"modifier": "private final",
"original_string": "private final boolean isPointLookup;",
"type": "boolean",
"var_name": "isPointLookup"
},
{
"declarator": "isSalted",
"modifier": "private final",
"original_string": "private final boolean isSalted;",
"type": "boolean",
"var_name": "isSalted"
},
{
"declarator": "useSkipScanFilter",
"modifier": "private final",
"original_string": "private final boolean useSkipScanFilter;",
"type": "boolean",
"var_name": "useSkipScanFilter"
},
{
"declarator": "scanRange",
"modifier": "private final",
"original_string": "private final KeyRange scanRange;",
"type": "KeyRange",
"var_name": "scanRange"
},
{
"declarator": "rowTimestampRange",
"modifier": "private final",
"original_string": "private final TimeRange rowTimestampRange;",
"type": "TimeRange",
"var_name": "rowTimestampRange"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/compile/ScanRanges.java",
"identifier": "ScanRanges",
"interfaces": "",
"methods": [
{
"class_method_signature": "ScanRanges.createPointLookup(List<KeyRange> keys)",
"constructor": false,
"full_signature": "public static ScanRanges createPointLookup(List<KeyRange> keys)",
"identifier": "createPointLookup",
"modifiers": "public static",
"parameters": "(List<KeyRange> keys)",
"return": "ScanRanges",
"signature": "ScanRanges createPointLookup(List<KeyRange> keys)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.createSingleSpan(RowKeySchema schema, List<List<KeyRange>> ranges)",
"constructor": false,
"full_signature": "public static ScanRanges createSingleSpan(RowKeySchema schema, List<List<KeyRange>> ranges)",
"identifier": "createSingleSpan",
"modifiers": "public static",
"parameters": "(RowKeySchema schema, List<List<KeyRange>> ranges)",
"return": "ScanRanges",
"signature": "ScanRanges createSingleSpan(RowKeySchema schema, List<List<KeyRange>> ranges)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.createSingleSpan(RowKeySchema schema, List<List<KeyRange>> ranges, Integer nBuckets, boolean useSkipSan)",
"constructor": false,
"full_signature": "public static ScanRanges createSingleSpan(RowKeySchema schema, List<List<KeyRange>> ranges, Integer nBuckets, boolean useSkipSan)",
"identifier": "createSingleSpan",
"modifiers": "public static",
"parameters": "(RowKeySchema schema, List<List<KeyRange>> ranges, Integer nBuckets, boolean useSkipSan)",
"return": "ScanRanges",
"signature": "ScanRanges createSingleSpan(RowKeySchema schema, List<List<KeyRange>> ranges, Integer nBuckets, boolean useSkipSan)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.create(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, Integer nBuckets, boolean useSkipScan, int rowTimestampColIndex)",
"constructor": false,
"full_signature": "public static ScanRanges create(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, Integer nBuckets, boolean useSkipScan, int rowTimestampColIndex)",
"identifier": "create",
"modifiers": "public static",
"parameters": "(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, Integer nBuckets, boolean useSkipScan, int rowTimestampColIndex)",
"return": "ScanRanges",
"signature": "ScanRanges create(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, Integer nBuckets, boolean useSkipScan, int rowTimestampColIndex)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.create(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, Integer nBuckets, boolean useSkipScan, int rowTimestampColIndex, Optional<byte[]> scanMinOffset)",
"constructor": false,
"full_signature": "public static ScanRanges create(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, Integer nBuckets, boolean useSkipScan, int rowTimestampColIndex, Optional<byte[]> scanMinOffset)",
"identifier": "create",
"modifiers": "public static",
"parameters": "(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, Integer nBuckets, boolean useSkipScan, int rowTimestampColIndex, Optional<byte[]> scanMinOffset)",
"return": "ScanRanges",
"signature": "ScanRanges create(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, Integer nBuckets, boolean useSkipScan, int rowTimestampColIndex, Optional<byte[]> scanMinOffset)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.ScanRanges(RowKeySchema schema, int[] slotSpan, List<List<KeyRange>> ranges, KeyRange scanRange, boolean useSkipScanFilter, boolean isPointLookup, Integer bucketNum, TimeRange rowTimestampRange)",
"constructor": true,
"full_signature": "private ScanRanges(RowKeySchema schema, int[] slotSpan, List<List<KeyRange>> ranges, KeyRange scanRange, boolean useSkipScanFilter, boolean isPointLookup, Integer bucketNum, TimeRange rowTimestampRange)",
"identifier": "ScanRanges",
"modifiers": "private",
"parameters": "(RowKeySchema schema, int[] slotSpan, List<List<KeyRange>> ranges, KeyRange scanRange, boolean useSkipScanFilter, boolean isPointLookup, Integer bucketNum, TimeRange rowTimestampRange)",
"return": "",
"signature": " ScanRanges(RowKeySchema schema, int[] slotSpan, List<List<KeyRange>> ranges, KeyRange scanRange, boolean useSkipScanFilter, boolean isPointLookup, Integer bucketNum, TimeRange rowTimestampRange)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.initializeScan(Scan scan)",
"constructor": false,
"full_signature": "public void initializeScan(Scan scan)",
"identifier": "initializeScan",
"modifiers": "public",
"parameters": "(Scan scan)",
"return": "void",
"signature": "void initializeScan(Scan scan)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.prefixKey(byte[] key, int keyOffset, byte[] prefixKey, int prefixKeyOffset)",
"constructor": false,
"full_signature": "public static byte[] prefixKey(byte[] key, int keyOffset, byte[] prefixKey, int prefixKeyOffset)",
"identifier": "prefixKey",
"modifiers": "public static",
"parameters": "(byte[] key, int keyOffset, byte[] prefixKey, int prefixKeyOffset)",
"return": "byte[]",
"signature": "byte[] prefixKey(byte[] key, int keyOffset, byte[] prefixKey, int prefixKeyOffset)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.prefixKey(byte[] key, int keyOffset, int keyLength, byte[] prefixKey,\n int prefixKeyOffset)",
"constructor": false,
"full_signature": "public static byte[] prefixKey(byte[] key, int keyOffset, int keyLength, byte[] prefixKey,\n int prefixKeyOffset)",
"identifier": "prefixKey",
"modifiers": "public static",
"parameters": "(byte[] key, int keyOffset, int keyLength, byte[] prefixKey,\n int prefixKeyOffset)",
"return": "byte[]",
"signature": "byte[] prefixKey(byte[] key, int keyOffset, int keyLength, byte[] prefixKey,\n int prefixKeyOffset)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.replaceSaltByte(byte[] key, byte[] saltKey)",
"constructor": false,
"full_signature": "private static byte[] replaceSaltByte(byte[] key, byte[] saltKey)",
"identifier": "replaceSaltByte",
"modifiers": "private static",
"parameters": "(byte[] key, byte[] saltKey)",
"return": "byte[]",
"signature": "byte[] replaceSaltByte(byte[] key, byte[] saltKey)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.stripPrefix(byte[] key, int keyOffset)",
"constructor": false,
"full_signature": "public static byte[] stripPrefix(byte[] key, int keyOffset)",
"identifier": "stripPrefix",
"modifiers": "public static",
"parameters": "(byte[] key, int keyOffset)",
"return": "byte[]",
"signature": "byte[] stripPrefix(byte[] key, int keyOffset)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.intersectScan(Scan scan, final byte[] originalStartKey, final byte[] originalStopKey, final int keyOffset, boolean crossesRegionBoundary)",
"constructor": false,
"full_signature": "public Scan intersectScan(Scan scan, final byte[] originalStartKey, final byte[] originalStopKey, final int keyOffset, boolean crossesRegionBoundary)",
"identifier": "intersectScan",
"modifiers": "public",
"parameters": "(Scan scan, final byte[] originalStartKey, final byte[] originalStopKey, final int keyOffset, boolean crossesRegionBoundary)",
"return": "Scan",
"signature": "Scan intersectScan(Scan scan, final byte[] originalStartKey, final byte[] originalStopKey, final int keyOffset, boolean crossesRegionBoundary)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.intersectRegion(byte[] regionStartKey, byte[] regionEndKey, boolean isLocalIndex)",
"constructor": false,
"full_signature": "public boolean intersectRegion(byte[] regionStartKey, byte[] regionEndKey, boolean isLocalIndex)",
"identifier": "intersectRegion",
"modifiers": "public",
"parameters": "(byte[] regionStartKey, byte[] regionEndKey, boolean isLocalIndex)",
"return": "boolean",
"signature": "boolean intersectRegion(byte[] regionStartKey, byte[] regionEndKey, boolean isLocalIndex)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getSkipScanFilter()",
"constructor": false,
"full_signature": "public SkipScanFilter getSkipScanFilter()",
"identifier": "getSkipScanFilter",
"modifiers": "public",
"parameters": "()",
"return": "SkipScanFilter",
"signature": "SkipScanFilter getSkipScanFilter()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getRanges()",
"constructor": false,
"full_signature": "public List<List<KeyRange>> getRanges()",
"identifier": "getRanges",
"modifiers": "public",
"parameters": "()",
"return": "List<List<KeyRange>>",
"signature": "List<List<KeyRange>> getRanges()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getBoundRanges()",
"constructor": false,
"full_signature": "public List<List<KeyRange>> getBoundRanges()",
"identifier": "getBoundRanges",
"modifiers": "public",
"parameters": "()",
"return": "List<List<KeyRange>>",
"signature": "List<List<KeyRange>> getBoundRanges()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getSchema()",
"constructor": false,
"full_signature": "public RowKeySchema getSchema()",
"identifier": "getSchema",
"modifiers": "public",
"parameters": "()",
"return": "RowKeySchema",
"signature": "RowKeySchema getSchema()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.isEverything()",
"constructor": false,
"full_signature": "public boolean isEverything()",
"identifier": "isEverything",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isEverything()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.isDegenerate()",
"constructor": false,
"full_signature": "public boolean isDegenerate()",
"identifier": "isDegenerate",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isDegenerate()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.useSkipScanFilter()",
"constructor": false,
"full_signature": "public boolean useSkipScanFilter()",
"identifier": "useSkipScanFilter",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean useSkipScanFilter()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getBoundPkSpan(List<List<KeyRange>> ranges, int[] slotSpan)",
"constructor": false,
"full_signature": "private static int getBoundPkSpan(List<List<KeyRange>> ranges, int[] slotSpan)",
"identifier": "getBoundPkSpan",
"modifiers": "private static",
"parameters": "(List<List<KeyRange>> ranges, int[] slotSpan)",
"return": "int",
"signature": "int getBoundPkSpan(List<List<KeyRange>> ranges, int[] slotSpan)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.isFullyQualified(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan)",
"constructor": false,
"full_signature": "private static boolean isFullyQualified(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan)",
"identifier": "isFullyQualified",
"modifiers": "private static",
"parameters": "(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan)",
"return": "boolean",
"signature": "boolean isFullyQualified(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.isPointLookup(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, boolean useSkipScan)",
"constructor": false,
"full_signature": "private static boolean isPointLookup(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, boolean useSkipScan)",
"identifier": "isPointLookup",
"modifiers": "private static",
"parameters": "(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, boolean useSkipScan)",
"return": "boolean",
"signature": "boolean isPointLookup(RowKeySchema schema, List<List<KeyRange>> ranges, int[] slotSpan, boolean useSkipScan)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.incrementKey(List<List<KeyRange>> slots, int[] position)",
"constructor": false,
"full_signature": "private static boolean incrementKey(List<List<KeyRange>> slots, int[] position)",
"identifier": "incrementKey",
"modifiers": "private static",
"parameters": "(List<List<KeyRange>> slots, int[] position)",
"return": "boolean",
"signature": "boolean incrementKey(List<List<KeyRange>> slots, int[] position)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getPointKeys(List<List<KeyRange>> ranges, int[] slotSpan, RowKeySchema schema, Integer bucketNum)",
"constructor": false,
"full_signature": "private static List<byte[]> getPointKeys(List<List<KeyRange>> ranges, int[] slotSpan, RowKeySchema schema, Integer bucketNum)",
"identifier": "getPointKeys",
"modifiers": "private static",
"parameters": "(List<List<KeyRange>> ranges, int[] slotSpan, RowKeySchema schema, Integer bucketNum)",
"return": "List<byte[]>",
"signature": "List<byte[]> getPointKeys(List<List<KeyRange>> ranges, int[] slotSpan, RowKeySchema schema, Integer bucketNum)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.isPointLookup()",
"constructor": false,
"full_signature": "public boolean isPointLookup()",
"identifier": "isPointLookup",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isPointLookup()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.isSalted()",
"constructor": false,
"full_signature": "public boolean isSalted()",
"identifier": "isSalted",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean isSalted()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getPointLookupCount()",
"constructor": false,
"full_signature": "public int getPointLookupCount()",
"identifier": "getPointLookupCount",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getPointLookupCount()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getPointLookupCount(boolean isPointLookup, List<List<KeyRange>> ranges)",
"constructor": false,
"full_signature": "private static int getPointLookupCount(boolean isPointLookup, List<List<KeyRange>> ranges)",
"identifier": "getPointLookupCount",
"modifiers": "private static",
"parameters": "(boolean isPointLookup, List<List<KeyRange>> ranges)",
"return": "int",
"signature": "int getPointLookupCount(boolean isPointLookup, List<List<KeyRange>> ranges)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getPointLookupKeyIterator()",
"constructor": false,
"full_signature": "public Iterator<KeyRange> getPointLookupKeyIterator()",
"identifier": "getPointLookupKeyIterator",
"modifiers": "public",
"parameters": "()",
"return": "Iterator<KeyRange>",
"signature": "Iterator<KeyRange> getPointLookupKeyIterator()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getBoundPkColumnCount()",
"constructor": false,
"full_signature": "public int getBoundPkColumnCount()",
"identifier": "getBoundPkColumnCount",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getBoundPkColumnCount()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getBoundSlotCount()",
"constructor": false,
"full_signature": "public int getBoundSlotCount()",
"identifier": "getBoundSlotCount",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getBoundSlotCount()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getSlotSpans()",
"constructor": false,
"full_signature": "public int[] getSlotSpans()",
"identifier": "getSlotSpans",
"modifiers": "public",
"parameters": "()",
"return": "int[]",
"signature": "int[] getSlotSpans()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getScanRange()",
"constructor": false,
"full_signature": "public KeyRange getScanRange()",
"identifier": "getScanRange",
"modifiers": "public",
"parameters": "()",
"return": "KeyRange",
"signature": "KeyRange getScanRange()",
"testcase": false
},
{
"class_method_signature": "ScanRanges.hasEqualityConstraint(int pkPosition)",
"constructor": false,
"full_signature": "public boolean hasEqualityConstraint(int pkPosition)",
"identifier": "hasEqualityConstraint",
"modifiers": "public",
"parameters": "(int pkPosition)",
"return": "boolean",
"signature": "boolean hasEqualityConstraint(int pkPosition)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getRowTimestampColumnRange(List<List<KeyRange>> ranges, RowKeySchema schema, int rowTimestampColPos)",
"constructor": false,
"full_signature": "private static TimeRange getRowTimestampColumnRange(List<List<KeyRange>> ranges, RowKeySchema schema, int rowTimestampColPos)",
"identifier": "getRowTimestampColumnRange",
"modifiers": "private static",
"parameters": "(List<List<KeyRange>> ranges, RowKeySchema schema, int rowTimestampColPos)",
"return": "TimeRange",
"signature": "TimeRange getRowTimestampColumnRange(List<List<KeyRange>> ranges, RowKeySchema schema, int rowTimestampColPos)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getAscTimeRange(KeyRange lowestRange, KeyRange highestRange, Field f)",
"constructor": false,
"full_signature": "private static TimeRange getAscTimeRange(KeyRange lowestRange, KeyRange highestRange, Field f)",
"identifier": "getAscTimeRange",
"modifiers": "private static",
"parameters": "(KeyRange lowestRange, KeyRange highestRange, Field f)",
"return": "TimeRange",
"signature": "TimeRange getAscTimeRange(KeyRange lowestRange, KeyRange highestRange, Field f)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getDescTimeRange(KeyRange lowestKeyRange, KeyRange highestKeyRange, Field f)",
"constructor": false,
"full_signature": "public static TimeRange getDescTimeRange(KeyRange lowestKeyRange, KeyRange highestKeyRange, Field f)",
"identifier": "getDescTimeRange",
"modifiers": "public static",
"parameters": "(KeyRange lowestKeyRange, KeyRange highestKeyRange, Field f)",
"return": "TimeRange",
"signature": "TimeRange getDescTimeRange(KeyRange lowestKeyRange, KeyRange highestKeyRange, Field f)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.safelyIncrement(long value)",
"constructor": false,
"full_signature": "private static long safelyIncrement(long value)",
"identifier": "safelyIncrement",
"modifiers": "private static",
"parameters": "(long value)",
"return": "long",
"signature": "long safelyIncrement(long value)",
"testcase": false
},
{
"class_method_signature": "ScanRanges.getRowTimestampRange()",
"constructor": false,
"full_signature": "public TimeRange getRowTimestampRange()",
"identifier": "getRowTimestampRange",
"modifiers": "public",
"parameters": "()",
"return": "TimeRange",
"signature": "TimeRange getRowTimestampRange()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public boolean intersectRegion(byte[] regionStartKey, byte[] regionEndKey, boolean isLocalIndex) {\n if (isEverything()) {\n return true;\n }\n if (isDegenerate()) {\n return false;\n }\n // Every range intersects all regions of a local index table \n if (isLocalIndex) {\n return true;\n }\n \n boolean crossesSaltBoundary = isSalted && ScanUtil.crossesPrefixBoundary(regionEndKey,\n ScanUtil.getPrefix(regionStartKey, SaltingUtil.NUM_SALTING_BYTES), \n SaltingUtil.NUM_SALTING_BYTES); \n return intersectScan(null, regionStartKey, regionEndKey, 0, crossesSaltBoundary) == HAS_INTERSECTION;\n }",
"class_method_signature": "ScanRanges.intersectRegion(byte[] regionStartKey, byte[] regionEndKey, boolean isLocalIndex)",
"constructor": false,
"full_signature": "public boolean intersectRegion(byte[] regionStartKey, byte[] regionEndKey, boolean isLocalIndex)",
"identifier": "intersectRegion",
"invocations": [
"isEverything",
"isDegenerate",
"crossesPrefixBoundary",
"getPrefix",
"intersectScan"
],
"modifiers": "public",
"parameters": "(byte[] regionStartKey, byte[] regionEndKey, boolean isLocalIndex)",
"return": "boolean",
"signature": "boolean intersectRegion(byte[] regionStartKey, byte[] regionEndKey, boolean isLocalIndex)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_11 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/ColumnInfoTest.java",
"identifier": "ColumnInfoTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected=IllegalArgumentException.class)\n public void testFromString_InvalidString() {\n ColumnInfo.fromString(\"invalid\");\n }",
"class_method_signature": "ColumnInfoTest.testFromString_InvalidString()",
"constructor": false,
"full_signature": "@Test(expected=IllegalArgumentException.class) public void testFromString_InvalidString()",
"identifier": "testFromString_InvalidString",
"invocations": [
"fromString"
],
"modifiers": "@Test(expected=IllegalArgumentException.class) public",
"parameters": "()",
"return": "void",
"signature": "void testFromString_InvalidString()",
"testcase": true
} | {
"fields": [
{
"declarator": "STR_SEPARATOR = \":\"",
"modifier": "private static final",
"original_string": "private static final String STR_SEPARATOR = \":\";",
"type": "String",
"var_name": "STR_SEPARATOR"
},
{
"declarator": "columnName",
"modifier": "private final",
"original_string": "private final String columnName;",
"type": "String",
"var_name": "columnName"
},
{
"declarator": "sqlType",
"modifier": "private final",
"original_string": "private final int sqlType;",
"type": "int",
"var_name": "sqlType"
},
{
"declarator": "precision",
"modifier": "private final",
"original_string": "private final Integer precision;",
"type": "Integer",
"var_name": "precision"
},
{
"declarator": "scale",
"modifier": "private final",
"original_string": "private final Integer scale;",
"type": "Integer",
"var_name": "scale"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/ColumnInfo.java",
"identifier": "ColumnInfo",
"interfaces": "",
"methods": [
{
"class_method_signature": "ColumnInfo.create(String columnName, int sqlType, Integer maxLength, Integer scale)",
"constructor": false,
"full_signature": "public static ColumnInfo create(String columnName, int sqlType, Integer maxLength, Integer scale)",
"identifier": "create",
"modifiers": "public static",
"parameters": "(String columnName, int sqlType, Integer maxLength, Integer scale)",
"return": "ColumnInfo",
"signature": "ColumnInfo create(String columnName, int sqlType, Integer maxLength, Integer scale)",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.ColumnInfo(String columnName, int sqlType)",
"constructor": true,
"full_signature": "public ColumnInfo(String columnName, int sqlType)",
"identifier": "ColumnInfo",
"modifiers": "public",
"parameters": "(String columnName, int sqlType)",
"return": "",
"signature": " ColumnInfo(String columnName, int sqlType)",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.ColumnInfo(String columnName, int sqlType, Integer maxLength)",
"constructor": true,
"full_signature": "public ColumnInfo(String columnName, int sqlType, Integer maxLength)",
"identifier": "ColumnInfo",
"modifiers": "public",
"parameters": "(String columnName, int sqlType, Integer maxLength)",
"return": "",
"signature": " ColumnInfo(String columnName, int sqlType, Integer maxLength)",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.ColumnInfo(String columnName, int sqlType, Integer precision, Integer scale)",
"constructor": true,
"full_signature": "public ColumnInfo(String columnName, int sqlType, Integer precision, Integer scale)",
"identifier": "ColumnInfo",
"modifiers": "public",
"parameters": "(String columnName, int sqlType, Integer precision, Integer scale)",
"return": "",
"signature": " ColumnInfo(String columnName, int sqlType, Integer precision, Integer scale)",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.getColumnName()",
"constructor": false,
"full_signature": "public String getColumnName()",
"identifier": "getColumnName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getColumnName()",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.getSqlType()",
"constructor": false,
"full_signature": "public int getSqlType()",
"identifier": "getSqlType",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getSqlType()",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.getPDataType()",
"constructor": false,
"full_signature": "public PDataType getPDataType()",
"identifier": "getPDataType",
"modifiers": "public",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getPDataType()",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.getDisplayName()",
"constructor": false,
"full_signature": "public String getDisplayName()",
"identifier": "getDisplayName",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getDisplayName()",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.toTypeString()",
"constructor": false,
"full_signature": "public String toTypeString()",
"identifier": "toTypeString",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String toTypeString()",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.equals(Object o)",
"constructor": false,
"full_signature": "@Override public boolean equals(Object o)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(Object o)",
"return": "boolean",
"signature": "boolean equals(Object o)",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.fromString(String stringRepresentation)",
"constructor": false,
"full_signature": "public static ColumnInfo fromString(String stringRepresentation)",
"identifier": "fromString",
"modifiers": "public static",
"parameters": "(String stringRepresentation)",
"return": "ColumnInfo",
"signature": "ColumnInfo fromString(String stringRepresentation)",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.getMaxLength()",
"constructor": false,
"full_signature": "public Integer getMaxLength()",
"identifier": "getMaxLength",
"modifiers": "public",
"parameters": "()",
"return": "Integer",
"signature": "Integer getMaxLength()",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.getPrecision()",
"constructor": false,
"full_signature": "public Integer getPrecision()",
"identifier": "getPrecision",
"modifiers": "public",
"parameters": "()",
"return": "Integer",
"signature": "Integer getPrecision()",
"testcase": false
},
{
"class_method_signature": "ColumnInfo.getScale()",
"constructor": false,
"full_signature": "public Integer getScale()",
"identifier": "getScale",
"modifiers": "public",
"parameters": "()",
"return": "Integer",
"signature": "Integer getScale()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static ColumnInfo fromString(String stringRepresentation) {\n List<String> components =\n Lists.newArrayList(stringRepresentation.split(\":\", 2));\n\n if (components.size() != 2) {\n throw new IllegalArgumentException(\"Unparseable string: \" + stringRepresentation);\n }\n\n String[] typeParts = components.get(0).split(\" \");\n String columnName = components.get(1);\n\n Integer maxLength = null;\n Integer scale = null;\n if (typeParts[0].contains(\"(\")) {\n Matcher matcher = Pattern.compile(\"([^\\\\(]+)\\\\((\\\\d+)(?:,(\\\\d+))?\\\\)\").matcher(typeParts[0]);\n if (!matcher.matches() || matcher.groupCount() > 3) {\n throw new IllegalArgumentException(\"Unparseable type string: \" + typeParts[0]);\n }\n maxLength = Integer.valueOf(matcher.group(2));\n if (matcher.group(3) != null) {\n scale = Integer.valueOf(matcher.group(3));\n }\n // Drop the (N) or (N,N) from the original type\n typeParts[0] = matcher.group(1);\n }\n\n // Create the PDataType from the sql type name, including the second 'ARRAY' part if present\n PDataType dataType;\n if(typeParts.length < 2) {\n dataType = PDataType.fromSqlTypeName(typeParts[0]);\n }\n else {\n dataType = PDataType.fromSqlTypeName(typeParts[0] + \" \" + typeParts[1]);\n }\n \n return ColumnInfo.create(columnName, dataType.getSqlType(), maxLength, scale);\n }",
"class_method_signature": "ColumnInfo.fromString(String stringRepresentation)",
"constructor": false,
"full_signature": "public static ColumnInfo fromString(String stringRepresentation)",
"identifier": "fromString",
"invocations": [
"newArrayList",
"split",
"size",
"split",
"get",
"get",
"contains",
"matcher",
"compile",
"matches",
"groupCount",
"valueOf",
"group",
"group",
"valueOf",
"group",
"group",
"fromSqlTypeName",
"fromSqlTypeName",
"create",
"getSqlType"
],
"modifiers": "public static",
"parameters": "(String stringRepresentation)",
"return": "ColumnInfo",
"signature": "ColumnInfo fromString(String stringRepresentation)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_10 | {
"fields": [
{
"declarator": "exit = ExpectedSystemExit.none()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final ExpectedSystemExit exit = ExpectedSystemExit.none();",
"type": "ExpectedSystemExit",
"var_name": "exit"
}
],
"file": "phoenix-pherf/src/test/java/org/apache/phoenix/pherf/PherfTest.java",
"identifier": "PherfTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testInvalidLogPerNRowsArgument() throws Exception {\n Long zero = 0l;\n Long negativeOne = -1l;\n String invaildNum = \"abc\";\n\n String[] args = {\"-listFiles\", \"-log_per_nrows\", zero.toString()};\n assertEquals(Long.valueOf(PherfConstants.LOG_PER_NROWS),\n getLogPerNRowsValue(new Pherf(args).getProperties()));\n\n String[] args2 = {\"-listFiles\", \"-log_per_nrows\", negativeOne.toString()};\n assertEquals(Long.valueOf(PherfConstants.LOG_PER_NROWS),\n getLogPerNRowsValue(new Pherf(args2).getProperties()));\n\n String[] args3 = {\"-listFiles\", \"-log_per_nrows\", invaildNum};\n assertEquals(Long.valueOf(PherfConstants.LOG_PER_NROWS),\n getLogPerNRowsValue(new Pherf(args3).getProperties()));\n }",
"class_method_signature": "PherfTest.testInvalidLogPerNRowsArgument()",
"constructor": false,
"full_signature": "@Test public void testInvalidLogPerNRowsArgument()",
"identifier": "testInvalidLogPerNRowsArgument",
"invocations": [
"toString",
"assertEquals",
"valueOf",
"getLogPerNRowsValue",
"getProperties",
"toString",
"assertEquals",
"valueOf",
"getLogPerNRowsValue",
"getProperties",
"assertEquals",
"valueOf",
"getLogPerNRowsValue",
"getProperties"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testInvalidLogPerNRowsArgument()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(Pherf.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Pherf.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "options = new Options()",
"modifier": "private static final",
"original_string": "private static final Options options = new Options();",
"type": "Options",
"var_name": "options"
},
{
"declarator": "phoenixUtil = PhoenixUtil.create()",
"modifier": "private final",
"original_string": "private final PhoenixUtil phoenixUtil = PhoenixUtil.create();",
"type": "PhoenixUtil",
"var_name": "phoenixUtil"
},
{
"declarator": "zookeeper",
"modifier": "private final",
"original_string": "private final String zookeeper;",
"type": "String",
"var_name": "zookeeper"
},
{
"declarator": "scenarioFile",
"modifier": "private final",
"original_string": "private final String scenarioFile;",
"type": "String",
"var_name": "scenarioFile"
},
{
"declarator": "schemaFile",
"modifier": "private final",
"original_string": "private final String schemaFile;",
"type": "String",
"var_name": "schemaFile"
},
{
"declarator": "queryHint",
"modifier": "private final",
"original_string": "private final String queryHint;",
"type": "String",
"var_name": "queryHint"
},
{
"declarator": "properties",
"modifier": "private final",
"original_string": "private final Properties properties;",
"type": "Properties",
"var_name": "properties"
},
{
"declarator": "preLoadData",
"modifier": "private final",
"original_string": "private final boolean preLoadData;",
"type": "boolean",
"var_name": "preLoadData"
},
{
"declarator": "dropPherfTablesRegEx",
"modifier": "private final",
"original_string": "private final String dropPherfTablesRegEx;",
"type": "String",
"var_name": "dropPherfTablesRegEx"
},
{
"declarator": "executeQuerySets",
"modifier": "private final",
"original_string": "private final boolean executeQuerySets;",
"type": "boolean",
"var_name": "executeQuerySets"
},
{
"declarator": "isFunctional",
"modifier": "private final",
"original_string": "private final boolean isFunctional;",
"type": "boolean",
"var_name": "isFunctional"
},
{
"declarator": "monitor",
"modifier": "private final",
"original_string": "private final boolean monitor;",
"type": "boolean",
"var_name": "monitor"
},
{
"declarator": "rowCountOverride",
"modifier": "private final",
"original_string": "private final int rowCountOverride;",
"type": "int",
"var_name": "rowCountOverride"
},
{
"declarator": "listFiles",
"modifier": "private final",
"original_string": "private final boolean listFiles;",
"type": "boolean",
"var_name": "listFiles"
},
{
"declarator": "applySchema",
"modifier": "private final",
"original_string": "private final boolean applySchema;",
"type": "boolean",
"var_name": "applySchema"
},
{
"declarator": "writeRuntimeResults",
"modifier": "private final",
"original_string": "private final boolean writeRuntimeResults;",
"type": "boolean",
"var_name": "writeRuntimeResults"
},
{
"declarator": "generateStatistics",
"modifier": "private final",
"original_string": "private final GeneratePhoenixStats generateStatistics;",
"type": "GeneratePhoenixStats",
"var_name": "generateStatistics"
},
{
"declarator": "label",
"modifier": "private final",
"original_string": "private final String label;",
"type": "String",
"var_name": "label"
},
{
"declarator": "compareResults",
"modifier": "private final",
"original_string": "private final String compareResults;",
"type": "String",
"var_name": "compareResults"
},
{
"declarator": "compareType",
"modifier": "private final",
"original_string": "private final CompareType compareType;",
"type": "CompareType",
"var_name": "compareType"
},
{
"declarator": "thinDriver",
"modifier": "private final",
"original_string": "private final boolean thinDriver;",
"type": "boolean",
"var_name": "thinDriver"
},
{
"declarator": "queryServerUrl",
"modifier": "private final",
"original_string": "private final String queryServerUrl;",
"type": "String",
"var_name": "queryServerUrl"
},
{
"declarator": "workloadExecutor",
"modifier": "@VisibleForTesting",
"original_string": "@VisibleForTesting\n WorkloadExecutor workloadExecutor;",
"type": "WorkloadExecutor",
"var_name": "workloadExecutor"
}
],
"file": "phoenix-pherf/src/main/java/org/apache/phoenix/pherf/Pherf.java",
"identifier": "Pherf",
"interfaces": "",
"methods": [
{
"class_method_signature": "Pherf.Pherf(String[] args)",
"constructor": true,
"full_signature": "public Pherf(String[] args)",
"identifier": "Pherf",
"modifiers": "public",
"parameters": "(String[] args)",
"return": "",
"signature": " Pherf(String[] args)",
"testcase": false
},
{
"class_method_signature": "Pherf.getLogPerNRow(CommandLine command)",
"constructor": false,
"full_signature": "private String getLogPerNRow(CommandLine command)",
"identifier": "getLogPerNRow",
"modifiers": "private",
"parameters": "(CommandLine command)",
"return": "String",
"signature": "String getLogPerNRow(CommandLine command)",
"testcase": false
},
{
"class_method_signature": "Pherf.getProperties()",
"constructor": false,
"full_signature": "public Properties getProperties()",
"identifier": "getProperties",
"modifiers": "public",
"parameters": "()",
"return": "Properties",
"signature": "Properties getProperties()",
"testcase": false
},
{
"class_method_signature": "Pherf.main(String[] args)",
"constructor": false,
"full_signature": "public static void main(String[] args)",
"identifier": "main",
"modifiers": "public static",
"parameters": "(String[] args)",
"return": "void",
"signature": "void main(String[] args)",
"testcase": false
},
{
"class_method_signature": "Pherf.run()",
"constructor": false,
"full_signature": "public void run()",
"identifier": "run",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void run()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public Properties getProperties() {\n return this.properties;\n }",
"class_method_signature": "Pherf.getProperties()",
"constructor": false,
"full_signature": "public Properties getProperties()",
"identifier": "getProperties",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "Properties",
"signature": "Properties getProperties()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_47 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java",
"identifier": "JDBCUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetConsistency_TIMELINE_InUrl() {\n assertTrue(JDBCUtil.getConsistencyLevel(\"localhost;Consistency=TIMELINE\", new Properties(),\n Consistency.STRONG.toString()) == Consistency.TIMELINE);\n }",
"class_method_signature": "JDBCUtilTest.testGetConsistency_TIMELINE_InUrl()",
"constructor": false,
"full_signature": "@Test public void testGetConsistency_TIMELINE_InUrl()",
"identifier": "testGetConsistency_TIMELINE_InUrl",
"invocations": [
"assertTrue",
"getConsistencyLevel",
"toString"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetConsistency_TIMELINE_InUrl()",
"testcase": true
} | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java",
"identifier": "JDBCUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "JDBCUtil.JDBCUtil()",
"constructor": true,
"full_signature": "private JDBCUtil()",
"identifier": "JDBCUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " JDBCUtil()",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.findProperty(String url, Properties info, String propName)",
"constructor": false,
"full_signature": "public static String findProperty(String url, Properties info, String propName)",
"identifier": "findProperty",
"modifiers": "public static",
"parameters": "(String url, Properties info, String propName)",
"return": "String",
"signature": "String findProperty(String url, Properties info, String propName)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.removeProperty(String url, String propName)",
"constructor": false,
"full_signature": "public static String removeProperty(String url, String propName)",
"identifier": "removeProperty",
"modifiers": "public static",
"parameters": "(String url, String propName)",
"return": "String",
"signature": "String removeProperty(String url, String propName)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getCombinedConnectionProperties(String url, Properties info)",
"constructor": false,
"full_signature": "private static Map<String, String> getCombinedConnectionProperties(String url, Properties info)",
"identifier": "getCombinedConnectionProperties",
"modifiers": "private static",
"parameters": "(String url, Properties info)",
"return": "Map<String, String>",
"signature": "Map<String, String> getCombinedConnectionProperties(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getAnnotations(@NonNull String url, @NonNull Properties info)",
"constructor": false,
"full_signature": "public static Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info)",
"identifier": "getAnnotations",
"modifiers": "public static",
"parameters": "(@NonNull String url, @NonNull Properties info)",
"return": "Map<String, String>",
"signature": "Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getCurrentSCN(String url, Properties info)",
"constructor": false,
"full_signature": "public static Long getCurrentSCN(String url, Properties info)",
"identifier": "getCurrentSCN",
"modifiers": "public static",
"parameters": "(String url, Properties info)",
"return": "Long",
"signature": "Long getCurrentSCN(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getBuildIndexSCN(String url, Properties info)",
"constructor": false,
"full_signature": "public static Long getBuildIndexSCN(String url, Properties info)",
"identifier": "getBuildIndexSCN",
"modifiers": "public static",
"parameters": "(String url, Properties info)",
"return": "Long",
"signature": "Long getBuildIndexSCN(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static int getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"identifier": "getMutateBatchSize",
"modifiers": "public static",
"parameters": "(String url, Properties info, ReadOnlyProps props)",
"return": "int",
"signature": "int getMutateBatchSize(String url, Properties info, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"constructor": false,
"full_signature": "public static long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"identifier": "getMutateBatchSizeBytes",
"modifiers": "public static",
"parameters": "(String url, Properties info, ReadOnlyProps props)",
"return": "long",
"signature": "long getMutateBatchSizeBytes(String url, Properties info, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getTenantId(String url, Properties info)",
"constructor": false,
"full_signature": "public static @Nullable PName getTenantId(String url, Properties info)",
"identifier": "getTenantId",
"modifiers": "public static @Nullable",
"parameters": "(String url, Properties info)",
"return": "PName",
"signature": "PName getTenantId(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getAutoCommit(String url, Properties info, boolean defaultValue)",
"constructor": false,
"full_signature": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"identifier": "getAutoCommit",
"modifiers": "public static",
"parameters": "(String url, Properties info, boolean defaultValue)",
"return": "boolean",
"signature": "boolean getAutoCommit(String url, Properties info, boolean defaultValue)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getConsistencyLevel(String url, Properties info, String defaultValue)",
"constructor": false,
"full_signature": "public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"identifier": "getConsistencyLevel",
"modifiers": "public static",
"parameters": "(String url, Properties info, String defaultValue)",
"return": "Consistency",
"signature": "Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"constructor": false,
"full_signature": "public static boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"identifier": "isCollectingRequestLevelMetricsEnabled",
"modifiers": "public static",
"parameters": "(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"return": "boolean",
"signature": "boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps)",
"testcase": false
},
{
"class_method_signature": "JDBCUtil.getSchema(String url, Properties info, String defaultValue)",
"constructor": false,
"full_signature": "public static String getSchema(String url, Properties info, String defaultValue)",
"identifier": "getSchema",
"modifiers": "public static",
"parameters": "(String url, Properties info, String defaultValue)",
"return": "String",
"signature": "String getSchema(String url, Properties info, String defaultValue)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue) {\n String consistency = findProperty(url, info, PhoenixRuntime.CONSISTENCY_ATTRIB);\n\n if(consistency != null && consistency.equalsIgnoreCase(Consistency.TIMELINE.toString())){\n return Consistency.TIMELINE;\n }\n\n return Consistency.STRONG;\n }",
"class_method_signature": "JDBCUtil.getConsistencyLevel(String url, Properties info, String defaultValue)",
"constructor": false,
"full_signature": "public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"identifier": "getConsistencyLevel",
"invocations": [
"findProperty",
"equalsIgnoreCase",
"toString"
],
"modifiers": "public static",
"parameters": "(String url, Properties info, String defaultValue)",
"return": "Consistency",
"signature": "Consistency getConsistencyLevel(String url, Properties info, String defaultValue)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_152 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/compile/PostIndexDDLCompilerTest.java",
"identifier": "PostIndexDDLCompilerTest",
"interfaces": "",
"superclass": "extends BaseConnectionlessQueryTest"
} | {
"body": "@Test\n public void testCompile() throws Exception {\n try (Connection conn = DriverManager.getConnection(getUrl())) {\n setupTables(conn);\n PhoenixConnection pConn = conn.unwrap(PhoenixConnection.class);\n PTable pDataTable = pConn.getTable(new PTableKey(null, \"T\"));\n PostIndexDDLCompiler compiler = new PostIndexDDLCompiler(pConn, new TableRef(pDataTable));\n MutationPlan plan = compiler.compile(pConn.getTable(new PTableKey(null, \"IDX\")));\n assertEquals(\"T\", plan.getQueryPlan().getTableRef().getTable().getTableName().getString());\n }\n }",
"class_method_signature": "PostIndexDDLCompilerTest.testCompile()",
"constructor": false,
"full_signature": "@Test public void testCompile()",
"identifier": "testCompile",
"invocations": [
"getConnection",
"getUrl",
"setupTables",
"unwrap",
"getTable",
"compile",
"getTable",
"assertEquals",
"getString",
"getTableName",
"getTable",
"getTableRef",
"getQueryPlan"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCompile()",
"testcase": true
} | {
"fields": [
{
"declarator": "connection",
"modifier": "private final",
"original_string": "private final PhoenixConnection connection;",
"type": "PhoenixConnection",
"var_name": "connection"
},
{
"declarator": "dataTableRef",
"modifier": "private final",
"original_string": "private final TableRef dataTableRef;",
"type": "TableRef",
"var_name": "dataTableRef"
},
{
"declarator": "indexColumnNames",
"modifier": "private",
"original_string": "private List<String> indexColumnNames;",
"type": "List<String>",
"var_name": "indexColumnNames"
},
{
"declarator": "dataColumnNames",
"modifier": "private",
"original_string": "private List<String> dataColumnNames;",
"type": "List<String>",
"var_name": "dataColumnNames"
},
{
"declarator": "selectQuery",
"modifier": "private",
"original_string": "private String selectQuery;",
"type": "String",
"var_name": "selectQuery"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/compile/PostIndexDDLCompiler.java",
"identifier": "PostIndexDDLCompiler",
"interfaces": "",
"methods": [
{
"class_method_signature": "PostIndexDDLCompiler.PostIndexDDLCompiler(PhoenixConnection connection, TableRef dataTableRef)",
"constructor": true,
"full_signature": "public PostIndexDDLCompiler(PhoenixConnection connection, TableRef dataTableRef)",
"identifier": "PostIndexDDLCompiler",
"modifiers": "public",
"parameters": "(PhoenixConnection connection, TableRef dataTableRef)",
"return": "",
"signature": " PostIndexDDLCompiler(PhoenixConnection connection, TableRef dataTableRef)",
"testcase": false
},
{
"class_method_signature": "PostIndexDDLCompiler.compile(final PTable indexTable)",
"constructor": false,
"full_signature": "public MutationPlan compile(final PTable indexTable)",
"identifier": "compile",
"modifiers": "public",
"parameters": "(final PTable indexTable)",
"return": "MutationPlan",
"signature": "MutationPlan compile(final PTable indexTable)",
"testcase": false
},
{
"class_method_signature": "PostIndexDDLCompiler.getIndexColumnNames()",
"constructor": false,
"full_signature": "public List<String> getIndexColumnNames()",
"identifier": "getIndexColumnNames",
"modifiers": "public",
"parameters": "()",
"return": "List<String>",
"signature": "List<String> getIndexColumnNames()",
"testcase": false
},
{
"class_method_signature": "PostIndexDDLCompiler.getDataColumnNames()",
"constructor": false,
"full_signature": "public List<String> getDataColumnNames()",
"identifier": "getDataColumnNames",
"modifiers": "public",
"parameters": "()",
"return": "List<String>",
"signature": "List<String> getDataColumnNames()",
"testcase": false
},
{
"class_method_signature": "PostIndexDDLCompiler.getSelectQuery()",
"constructor": false,
"full_signature": "public String getSelectQuery()",
"identifier": "getSelectQuery",
"modifiers": "public",
"parameters": "()",
"return": "String",
"signature": "String getSelectQuery()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public MutationPlan compile(final PTable indexTable) throws SQLException {\n /*\n * Compiles an UPSERT SELECT command to read from the data table and populate the index table\n */\n StringBuilder indexColumns = new StringBuilder();\n StringBuilder dataColumns = new StringBuilder();\n \n // Add the pk index columns\n List<PColumn> indexPKColumns = indexTable.getPKColumns();\n int nIndexPKColumns = indexTable.getPKColumns().size();\n boolean isSalted = indexTable.getBucketNum() != null;\n boolean isMultiTenant = connection.getTenantId() != null && indexTable.isMultiTenant();\n boolean isViewIndex = indexTable.getViewIndexId()!=null;\n int posOffset = (isSalted ? 1 : 0) + (isMultiTenant ? 1 : 0) + (isViewIndex ? 1 : 0);\n for (int i = posOffset; i < nIndexPKColumns; i++) {\n PColumn col = indexPKColumns.get(i);\n String indexColName = col.getName().getString();\n // need to escape backslash as this used in the SELECT statement\n String dataColName = StringUtil.escapeBackslash(col.getExpressionStr());\n dataColumns.append(dataColName).append(\",\");\n indexColumns.append('\"').append(indexColName).append(\"\\\",\");\n indexColumnNames.add(indexColName);\n dataColumnNames.add(dataColName);\n }\n \n // Add the covered columns\n for (PColumnFamily family : indexTable.getColumnFamilies()) {\n for (PColumn col : family.getColumns()) {\n if (col.getViewConstant() == null) {\n String indexColName = col.getName().getString();\n String dataFamilyName = IndexUtil.getDataColumnFamilyName(indexColName);\n String dataColumnName = IndexUtil.getDataColumnName(indexColName);\n if (!dataFamilyName.equals(\"\")) {\n dataColumns.append('\"').append(dataFamilyName).append(\"\\\".\");\n }\n dataColumns.append('\"').append(dataColumnName).append(\"\\\",\");\n indexColumns.append('\"').append(indexColName).append(\"\\\",\");\n indexColumnNames.add(indexColName);\n dataColumnNames.add(dataColumnName);\n }\n }\n }\n\n final PTable dataTable = dataTableRef.getTable();\n dataColumns.setLength(dataColumns.length()-1);\n indexColumns.setLength(indexColumns.length()-1);\n String schemaName = dataTable.getSchemaName().getString();\n String tableName = indexTable.getTableName().getString();\n \n StringBuilder updateStmtStr = new StringBuilder();\n updateStmtStr.append(\"UPSERT /*+ NO_INDEX */ INTO \").append(schemaName.length() == 0 ? \"\" : '\"' + schemaName + \"\\\".\").append('\"').append(tableName).append(\"\\\"(\")\n .append(indexColumns).append(\") \");\n final StringBuilder selectQueryBuilder = new StringBuilder();\n selectQueryBuilder.append(\" SELECT /*+ NO_INDEX */ \").append(dataColumns).append(\" FROM \")\n .append(schemaName.length() == 0 ? \"\" : '\"' + schemaName + \"\\\".\").append('\"').append(dataTable.getTableName().getString()).append('\"');\n this.selectQuery = selectQueryBuilder.toString();\n updateStmtStr.append(this.selectQuery);\n \n try (final PhoenixStatement statement = new PhoenixStatement(connection)) {\n DelegateMutationPlan delegate = new DelegateMutationPlan(statement.compileMutation(updateStmtStr.toString())) {\n @Override\n public MutationState execute() throws SQLException {\n connection.getMutationState().commitDDLFence(dataTable);\n return super.execute();\n }\n };\n return delegate;\n }\n }",
"class_method_signature": "PostIndexDDLCompiler.compile(final PTable indexTable)",
"constructor": false,
"full_signature": "public MutationPlan compile(final PTable indexTable)",
"identifier": "compile",
"invocations": [
"getPKColumns",
"size",
"getPKColumns",
"getBucketNum",
"getTenantId",
"isMultiTenant",
"getViewIndexId",
"get",
"getString",
"getName",
"escapeBackslash",
"getExpressionStr",
"append",
"append",
"append",
"append",
"append",
"add",
"add",
"getColumnFamilies",
"getColumns",
"getViewConstant",
"getString",
"getName",
"getDataColumnFamilyName",
"getDataColumnName",
"equals",
"append",
"append",
"append",
"append",
"append",
"append",
"append",
"append",
"append",
"add",
"add",
"getTable",
"setLength",
"length",
"setLength",
"length",
"getString",
"getSchemaName",
"getString",
"getTableName",
"append",
"append",
"append",
"append",
"append",
"append",
"append",
"length",
"append",
"append",
"append",
"append",
"append",
"append",
"append",
"length",
"getString",
"getTableName",
"toString",
"append",
"compileMutation",
"toString",
"commitDDLFence",
"getMutationState",
"execute"
],
"modifiers": "public",
"parameters": "(final PTable indexTable)",
"return": "MutationPlan",
"signature": "MutationPlan compile(final PTable indexTable)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_144 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/mapreduce/CsvBulkImportUtilTest.java",
"identifier": "CsvBulkImportUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConfigurePreUpsertProcessor() {\n Configuration conf = new Configuration();\n CsvBulkImportUtil.configurePreUpsertProcessor(conf, MockProcessor.class);\n ImportPreUpsertKeyValueProcessor processor = PhoenixConfigurationUtil.loadPreUpsertProcessor(conf);\n assertEquals(MockProcessor.class, processor.getClass());\n }",
"class_method_signature": "CsvBulkImportUtilTest.testConfigurePreUpsertProcessor()",
"constructor": false,
"full_signature": "@Test public void testConfigurePreUpsertProcessor()",
"identifier": "testConfigurePreUpsertProcessor",
"invocations": [
"configurePreUpsertProcessor",
"loadPreUpsertProcessor",
"assertEquals",
"getClass"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testConfigurePreUpsertProcessor()",
"testcase": true
} | {
"fields": [],
"file": "phoenix-core/src/main/java/org/apache/phoenix/mapreduce/CsvBulkImportUtil.java",
"identifier": "CsvBulkImportUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "CsvBulkImportUtil.initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"constructor": false,
"full_signature": "public static void initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"identifier": "initCsvImportJob",
"modifiers": "public static",
"parameters": "(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"return": "void",
"signature": "void initCsvImportJob(Configuration conf, char fieldDelimiter, char quoteChar,\n char escapeChar, String arrayDelimiter, String binaryEncoding)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"constructor": false,
"full_signature": "public static void configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"identifier": "configurePreUpsertProcessor",
"modifiers": "public static",
"parameters": "(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"return": "void",
"signature": "void configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.setChar(Configuration conf, String confKey, char charValue)",
"constructor": false,
"full_signature": "@VisibleForTesting static void setChar(Configuration conf, String confKey, char charValue)",
"identifier": "setChar",
"modifiers": "@VisibleForTesting static",
"parameters": "(Configuration conf, String confKey, char charValue)",
"return": "void",
"signature": "void setChar(Configuration conf, String confKey, char charValue)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.getCharacter(Configuration conf, String confKey)",
"constructor": false,
"full_signature": "@VisibleForTesting static Character getCharacter(Configuration conf, String confKey)",
"identifier": "getCharacter",
"modifiers": "@VisibleForTesting static",
"parameters": "(Configuration conf, String confKey)",
"return": "Character",
"signature": "Character getCharacter(Configuration conf, String confKey)",
"testcase": false
},
{
"class_method_signature": "CsvBulkImportUtil.getOutputPath(Path outputdir, String tableName)",
"constructor": false,
"full_signature": "public static Path getOutputPath(Path outputdir, String tableName)",
"identifier": "getOutputPath",
"modifiers": "public static",
"parameters": "(Path outputdir, String tableName)",
"return": "Path",
"signature": "Path getOutputPath(Path outputdir, String tableName)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static void configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass) {\n conf.setClass(PhoenixConfigurationUtil.UPSERT_HOOK_CLASS_CONFKEY, processorClass,\n ImportPreUpsertKeyValueProcessor.class);\n }",
"class_method_signature": "CsvBulkImportUtil.configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"constructor": false,
"full_signature": "public static void configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"identifier": "configurePreUpsertProcessor",
"invocations": [
"setClass"
],
"modifiers": "public static",
"parameters": "(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"return": "void",
"signature": "void configurePreUpsertProcessor(Configuration conf,\n Class<? extends ImportPreUpsertKeyValueProcessor> processorClass)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_51 | {
"fields": [
{
"declarator": "conn",
"modifier": "private",
"original_string": "private Connection conn;",
"type": "Connection",
"var_name": "conn"
},
{
"declarator": "converter",
"modifier": "private",
"original_string": "private StringToArrayConverter converter;",
"type": "StringToArrayConverter",
"var_name": "converter"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/csv/StringToArrayConverterTest.java",
"identifier": "StringToArrayConverterTest",
"interfaces": "",
"superclass": "extends BaseConnectionlessQueryTest"
} | {
"body": "@Test\n public void testToArray_EmptyString() throws SQLException {\n Array emptyArray = converter.toArray(\"\");\n assertEquals(0, ((Object[]) emptyArray.getArray()).length);\n }",
"class_method_signature": "StringToArrayConverterTest.testToArray_EmptyString()",
"constructor": false,
"full_signature": "@Test public void testToArray_EmptyString()",
"identifier": "testToArray_EmptyString",
"invocations": [
"toArray",
"assertEquals",
"getArray"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testToArray_EmptyString()",
"testcase": true
} | {
"fields": [
{
"declarator": "splitter",
"modifier": "private final",
"original_string": "private final Splitter splitter;",
"type": "Splitter",
"var_name": "splitter"
},
{
"declarator": "conn",
"modifier": "private final",
"original_string": "private final Connection conn;",
"type": "Connection",
"var_name": "conn"
},
{
"declarator": "elementDataType",
"modifier": "private final",
"original_string": "private final PDataType elementDataType;",
"type": "PDataType",
"var_name": "elementDataType"
},
{
"declarator": "elementConvertFunction",
"modifier": "private final",
"original_string": "private final CsvUpsertExecutor.SimpleDatatypeConversionFunction elementConvertFunction;",
"type": "CsvUpsertExecutor.SimpleDatatypeConversionFunction",
"var_name": "elementConvertFunction"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/csv/StringToArrayConverter.java",
"identifier": "StringToArrayConverter",
"interfaces": "",
"methods": [
{
"class_method_signature": "StringToArrayConverter.StringToArrayConverter(Connection conn, String separatorString,\n PDataType elementDataType)",
"constructor": true,
"full_signature": "public StringToArrayConverter(Connection conn, String separatorString,\n PDataType elementDataType)",
"identifier": "StringToArrayConverter",
"modifiers": "public",
"parameters": "(Connection conn, String separatorString,\n PDataType elementDataType)",
"return": "",
"signature": " StringToArrayConverter(Connection conn, String separatorString,\n PDataType elementDataType)",
"testcase": false
},
{
"class_method_signature": "StringToArrayConverter.toArray(String input)",
"constructor": false,
"full_signature": "public Array toArray(String input)",
"identifier": "toArray",
"modifiers": "public",
"parameters": "(String input)",
"return": "Array",
"signature": "Array toArray(String input)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public Array toArray(String input) throws SQLException {\n if (input == null || input.isEmpty()) {\n return conn.createArrayOf(elementDataType.getSqlTypeName(), new Object[0]);\n }\n return conn.createArrayOf(\n elementDataType.getSqlTypeName(),\n Lists.newArrayList(\n Iterables.transform(\n splitter.split(input),\n elementConvertFunction)).toArray());\n }",
"class_method_signature": "StringToArrayConverter.toArray(String input)",
"constructor": false,
"full_signature": "public Array toArray(String input)",
"identifier": "toArray",
"invocations": [
"isEmpty",
"createArrayOf",
"getSqlTypeName",
"createArrayOf",
"getSqlTypeName",
"toArray",
"newArrayList",
"transform",
"split"
],
"modifiers": "public",
"parameters": "(String input)",
"return": "Array",
"signature": "Array toArray(String input)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_113 | {
"fields": [
{
"declarator": "testCache = null",
"modifier": "static",
"original_string": "static GuidePostsCache testCache = null;",
"type": "GuidePostsCache",
"var_name": "testCache"
},
{
"declarator": "phoenixStatsLoader = null",
"modifier": "static",
"original_string": "static PhoenixStatsLoader phoenixStatsLoader = null;",
"type": "PhoenixStatsLoader",
"var_name": "phoenixStatsLoader"
},
{
"declarator": "helper",
"modifier": "private",
"original_string": "private GuidePostsCacheProvider helper;",
"type": "GuidePostsCacheProvider",
"var_name": "helper"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/query/GuidePostsCacheProviderTest.java",
"identifier": "GuidePostsCacheProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void loadAndGetGuidePostsCacheFactoryTestFactory(){\n GuidePostsCacheFactory factory = helper.loadAndGetGuidePostsCacheFactory(\n TestGuidePostsCacheFactory.class.getTypeName());\n assertTrue(factory instanceof TestGuidePostsCacheFactory);\n }",
"class_method_signature": "GuidePostsCacheProviderTest.loadAndGetGuidePostsCacheFactoryTestFactory()",
"constructor": false,
"full_signature": "@Test public void loadAndGetGuidePostsCacheFactoryTestFactory()",
"identifier": "loadAndGetGuidePostsCacheFactoryTestFactory",
"invocations": [
"loadAndGetGuidePostsCacheFactory",
"getTypeName",
"assertTrue"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void loadAndGetGuidePostsCacheFactoryTestFactory()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "guidePostsCacheFactory = null",
"modifier": "",
"original_string": "GuidePostsCacheFactory guidePostsCacheFactory = null;",
"type": "GuidePostsCacheFactory",
"var_name": "guidePostsCacheFactory"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/query/GuidePostsCacheProvider.java",
"identifier": "GuidePostsCacheProvider",
"interfaces": "",
"methods": [
{
"class_method_signature": "GuidePostsCacheProvider.loadAndGetGuidePostsCacheFactory(String classString)",
"constructor": false,
"full_signature": "@VisibleForTesting GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString)",
"identifier": "loadAndGetGuidePostsCacheFactory",
"modifiers": "@VisibleForTesting",
"parameters": "(String classString)",
"return": "GuidePostsCacheFactory",
"signature": "GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString)",
"testcase": false
},
{
"class_method_signature": "GuidePostsCacheProvider.getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"constructor": false,
"full_signature": "public GuidePostsCacheWrapper getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"identifier": "getGuidePostsCache",
"modifiers": "public",
"parameters": "(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"return": "GuidePostsCacheWrapper",
"signature": "GuidePostsCacheWrapper getGuidePostsCache(String classStr, ConnectionQueryServices queryServices,\n Configuration config)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting\n GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString) {\n Preconditions.checkNotNull(classString);\n if (guidePostsCacheFactory == null) {\n try {\n\n Class clazz = Class.forName(classString);\n if (!GuidePostsCacheFactory.class.isAssignableFrom(clazz)) {\n String msg = String.format(\n \"Could not load/instantiate class %s is not an instance of GuidePostsCacheFactory\",\n classString);\n LOGGER.error(msg);\n throw new PhoenixNonRetryableRuntimeException(msg);\n }\n\n List<GuidePostsCacheFactory> factoryList = InstanceResolver.get(GuidePostsCacheFactory.class, null);\n for (GuidePostsCacheFactory factory : factoryList) {\n if (clazz.isInstance(factory)) {\n guidePostsCacheFactory = factory;\n LOGGER.info(String.format(\"Sucessfully loaded class for GuidePostsCacheFactor of type: %s\",\n classString));\n break;\n }\n }\n if (guidePostsCacheFactory == null) {\n String msg = String.format(\"Could not load/instantiate class %s\", classString);\n LOGGER.error(msg);\n throw new PhoenixNonRetryableRuntimeException(msg);\n }\n } catch (ClassNotFoundException e) {\n LOGGER.error(String.format(\"Could not load/instantiate class %s\", classString), e);\n throw new PhoenixNonRetryableRuntimeException(e);\n }\n }\n return guidePostsCacheFactory;\n }",
"class_method_signature": "GuidePostsCacheProvider.loadAndGetGuidePostsCacheFactory(String classString)",
"constructor": false,
"full_signature": "@VisibleForTesting GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString)",
"identifier": "loadAndGetGuidePostsCacheFactory",
"invocations": [
"checkNotNull",
"forName",
"isAssignableFrom",
"format",
"error",
"get",
"isInstance",
"info",
"format",
"format",
"error",
"error",
"format"
],
"modifiers": "@VisibleForTesting",
"parameters": "(String classString)",
"return": "GuidePostsCacheFactory",
"signature": "GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_168 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java",
"identifier": "PhoenixEmbeddedDriverTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNotAccept() throws Exception {\n Driver driver = new PhoenixDriver();\n assertFalse(driver.acceptsURL(\"jdbc:phoenix://localhost\"));\n assertFalse(driver.acceptsURL(\"jdbc:phoenix:localhost;test=true;bar=foo\"));\n assertFalse(driver.acceptsURL(\"jdbc:phoenix:localhost;test=true\"));\n assertTrue(driver.acceptsURL(\"jdbc:phoenix:localhost:123\"));\n assertTrue(driver.acceptsURL(\"jdbc:phoenix:localhost:123;untest=true\"));\n assertTrue(driver.acceptsURL(\"jdbc:phoenix:localhost:123;untest=true;foo=bar\"));\n DriverManager.deregisterDriver(driver);\n }",
"class_method_signature": "PhoenixEmbeddedDriverTest.testNotAccept()",
"constructor": false,
"full_signature": "@Test public void testNotAccept()",
"identifier": "testNotAccept",
"invocations": [
"assertFalse",
"acceptsURL",
"assertFalse",
"acceptsURL",
"assertFalse",
"acceptsURL",
"assertTrue",
"acceptsURL",
"assertTrue",
"acceptsURL",
"assertTrue",
"acceptsURL",
"deregisterDriver"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testNotAccept()",
"testcase": true
} | {
"fields": [
{
"declarator": "DNC_JDBC_PROTOCOL_SUFFIX = \"//\"",
"modifier": "private final static",
"original_string": "private final static String DNC_JDBC_PROTOCOL_SUFFIX = \"//\";",
"type": "String",
"var_name": "DNC_JDBC_PROTOCOL_SUFFIX"
},
{
"declarator": "DRIVER_NAME = \"PhoenixEmbeddedDriver\"",
"modifier": "private final static",
"original_string": "private final static String DRIVER_NAME = \"PhoenixEmbeddedDriver\";",
"type": "String",
"var_name": "DRIVER_NAME"
},
{
"declarator": "TERMINATOR = \"\" + PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR",
"modifier": "private static final",
"original_string": "private static final String TERMINATOR = \"\" + PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR;",
"type": "String",
"var_name": "TERMINATOR"
},
{
"declarator": "DELIMITERS = TERMINATOR + PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR",
"modifier": "private static final",
"original_string": "private static final String DELIMITERS = TERMINATOR + PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR;",
"type": "String",
"var_name": "DELIMITERS"
},
{
"declarator": "TEST_URL_AT_END = \"\" + PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR + PHOENIX_TEST_DRIVER_URL_PARAM",
"modifier": "private static final",
"original_string": "private static final String TEST_URL_AT_END = \"\" + PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR + PHOENIX_TEST_DRIVER_URL_PARAM;",
"type": "String",
"var_name": "TEST_URL_AT_END"
},
{
"declarator": "TEST_URL_IN_MIDDLE = TEST_URL_AT_END + PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR",
"modifier": "private static final",
"original_string": "private static final String TEST_URL_IN_MIDDLE = TEST_URL_AT_END + PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR;",
"type": "String",
"var_name": "TEST_URL_IN_MIDDLE"
},
{
"declarator": "EMPTY_INFO = new DriverPropertyInfo[0]",
"modifier": "private final static",
"original_string": "private final static DriverPropertyInfo[] EMPTY_INFO = new DriverPropertyInfo[0];",
"type": "DriverPropertyInfo[]",
"var_name": "EMPTY_INFO"
},
{
"declarator": "MAJOR_VERSION_PROP = \"DriverMajorVersion\"",
"modifier": "public final static",
"original_string": "public final static String MAJOR_VERSION_PROP = \"DriverMajorVersion\";",
"type": "String",
"var_name": "MAJOR_VERSION_PROP"
},
{
"declarator": "MINOR_VERSION_PROP = \"DriverMinorVersion\"",
"modifier": "public final static",
"original_string": "public final static String MINOR_VERSION_PROP = \"DriverMinorVersion\";",
"type": "String",
"var_name": "MINOR_VERSION_PROP"
},
{
"declarator": "DRIVER_NAME_PROP = \"DriverName\"",
"modifier": "public final static",
"original_string": "public final static String DRIVER_NAME_PROP = \"DriverName\";",
"type": "String",
"var_name": "DRIVER_NAME_PROP"
},
{
"declarator": "DEFAULT_PROPS = new ReadOnlyProps(\n ImmutableMap.of(\n MAJOR_VERSION_PROP, Integer.toString(MetaDataProtocol.PHOENIX_MAJOR_VERSION),\n MINOR_VERSION_PROP, Integer.toString(MetaDataProtocol.PHOENIX_MINOR_VERSION),\n DRIVER_NAME_PROP, DRIVER_NAME))",
"modifier": "public static final",
"original_string": "public static final ReadOnlyProps DEFAULT_PROPS = new ReadOnlyProps(\n ImmutableMap.of(\n MAJOR_VERSION_PROP, Integer.toString(MetaDataProtocol.PHOENIX_MAJOR_VERSION),\n MINOR_VERSION_PROP, Integer.toString(MetaDataProtocol.PHOENIX_MINOR_VERSION),\n DRIVER_NAME_PROP, DRIVER_NAME));",
"type": "ReadOnlyProps",
"var_name": "DEFAULT_PROPS"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java",
"identifier": "PhoenixEmbeddedDriver",
"interfaces": "implements Driver, SQLCloseable",
"methods": [
{
"class_method_signature": "PhoenixEmbeddedDriver.PhoenixEmbeddedDriver()",
"constructor": true,
"full_signature": " PhoenixEmbeddedDriver()",
"identifier": "PhoenixEmbeddedDriver",
"modifiers": "",
"parameters": "()",
"return": "",
"signature": " PhoenixEmbeddedDriver()",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.getDefaultProps()",
"constructor": false,
"full_signature": "protected ReadOnlyProps getDefaultProps()",
"identifier": "getDefaultProps",
"modifiers": "protected",
"parameters": "()",
"return": "ReadOnlyProps",
"signature": "ReadOnlyProps getDefaultProps()",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.getQueryServices()",
"constructor": false,
"full_signature": "abstract public QueryServices getQueryServices()",
"identifier": "getQueryServices",
"modifiers": "abstract public",
"parameters": "()",
"return": "QueryServices",
"signature": "QueryServices getQueryServices()",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.acceptsURL(String url)",
"constructor": false,
"full_signature": "@Override public boolean acceptsURL(String url)",
"identifier": "acceptsURL",
"modifiers": "@Override public",
"parameters": "(String url)",
"return": "boolean",
"signature": "boolean acceptsURL(String url)",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.connect(String url, Properties info)",
"constructor": false,
"full_signature": "@Override public Connection connect(String url, Properties info)",
"identifier": "connect",
"modifiers": "@Override public",
"parameters": "(String url, Properties info)",
"return": "Connection",
"signature": "Connection connect(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.createConnection(String url, Properties info)",
"constructor": false,
"full_signature": "protected final Connection createConnection(String url, Properties info)",
"identifier": "createConnection",
"modifiers": "protected final",
"parameters": "(String url, Properties info)",
"return": "Connection",
"signature": "Connection createConnection(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.getConnectionQueryServices(String url, Properties info)",
"constructor": false,
"full_signature": "protected abstract ConnectionQueryServices getConnectionQueryServices(String url, Properties info)",
"identifier": "getConnectionQueryServices",
"modifiers": "protected abstract",
"parameters": "(String url, Properties info)",
"return": "ConnectionQueryServices",
"signature": "ConnectionQueryServices getConnectionQueryServices(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.getMajorVersion()",
"constructor": false,
"full_signature": "@Override public int getMajorVersion()",
"identifier": "getMajorVersion",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int getMajorVersion()",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.getMinorVersion()",
"constructor": false,
"full_signature": "@Override public int getMinorVersion()",
"identifier": "getMinorVersion",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int getMinorVersion()",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.getPropertyInfo(String url, Properties info)",
"constructor": false,
"full_signature": "@Override public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)",
"identifier": "getPropertyInfo",
"modifiers": "@Override public",
"parameters": "(String url, Properties info)",
"return": "DriverPropertyInfo[]",
"signature": "DriverPropertyInfo[] getPropertyInfo(String url, Properties info)",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.jdbcCompliant()",
"constructor": false,
"full_signature": "@Override public boolean jdbcCompliant()",
"identifier": "jdbcCompliant",
"modifiers": "@Override public",
"parameters": "()",
"return": "boolean",
"signature": "boolean jdbcCompliant()",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.getParentLogger()",
"constructor": false,
"full_signature": "@Override public Logger getParentLogger()",
"identifier": "getParentLogger",
"modifiers": "@Override public",
"parameters": "()",
"return": "Logger",
"signature": "Logger getParentLogger()",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.close()",
"constructor": false,
"full_signature": "@Override public void close()",
"identifier": "close",
"modifiers": "@Override public",
"parameters": "()",
"return": "void",
"signature": "void close()",
"testcase": false
},
{
"class_method_signature": "PhoenixEmbeddedDriver.isTestUrl(String url)",
"constructor": false,
"full_signature": "public static boolean isTestUrl(String url)",
"identifier": "isTestUrl",
"modifiers": "public static",
"parameters": "(String url)",
"return": "boolean",
"signature": "boolean isTestUrl(String url)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public boolean acceptsURL(String url) throws SQLException {\n if (url.startsWith(PhoenixRuntime.JDBC_PROTOCOL)) {\n // A connection string of \"jdbc:phoenix\" is supported, since\n // all the connection information can potentially be gotten\n // out of the HBase config file\n if (url.length() == PhoenixRuntime.JDBC_PROTOCOL.length()) {\n return true;\n }\n // Same as above, except for \"jdbc:phoenix;prop=<value>...\"\n if (PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR == url.charAt(PhoenixRuntime.JDBC_PROTOCOL.length())) {\n return true;\n }\n if (PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR == url.charAt(PhoenixRuntime.JDBC_PROTOCOL.length())) {\n int protoLength = PhoenixRuntime.JDBC_PROTOCOL.length() + 1;\n // A connection string of \"jdbc:phoenix:\" matches this driver,\n // but will end up as a MALFORMED_CONNECTION_URL exception later.\n if (url.length() == protoLength) {\n return true;\n }\n // Explicitly ignore connections of \"jdbc:phoenix:thin\"; leave them for\n // the thin client\n if (url.startsWith(PhoenixRuntime.JDBC_THIN_PROTOCOL)) {\n return false;\n }\n // A connection string of the form \"jdbc:phoenix://\" means that\n // the driver is remote which isn't supported, so return false.\n if (!url.startsWith(DNC_JDBC_PROTOCOL_SUFFIX, protoLength)) {\n return true;\n }\n }\n }\n return false;\n }",
"class_method_signature": "PhoenixEmbeddedDriver.acceptsURL(String url)",
"constructor": false,
"full_signature": "@Override public boolean acceptsURL(String url)",
"identifier": "acceptsURL",
"invocations": [
"startsWith",
"length",
"length",
"charAt",
"length",
"charAt",
"length",
"length",
"length",
"startsWith",
"startsWith"
],
"modifiers": "@Override public",
"parameters": "(String url)",
"return": "boolean",
"signature": "boolean acceptsURL(String url)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_187 | {
"fields": [
{
"declarator": "schema",
"modifier": "private static",
"original_string": "private static String schema;",
"type": "String",
"var_name": "schema"
},
{
"declarator": "baseTable",
"modifier": "private static",
"original_string": "private static String baseTable;",
"type": "String",
"var_name": "baseTable"
},
{
"declarator": "phxConn",
"modifier": "private static",
"original_string": "private static PhoenixConnection phxConn;",
"type": "PhoenixConnection",
"var_name": "phxConn"
},
{
"declarator": "mockClient",
"modifier": "private static",
"original_string": "private static MetaDataClient mockClient;",
"type": "MetaDataClient",
"var_name": "mockClient"
},
{
"declarator": "ddlFormat",
"modifier": "private static",
"original_string": "private static String ddlFormat;",
"type": "String",
"var_name": "ddlFormat"
},
{
"declarator": "stmt",
"modifier": "private static",
"original_string": "private static CreateTableStatement stmt;",
"type": "CreateTableStatement",
"var_name": "stmt"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/schema/MetaDataClientTest.java",
"identifier": "MetaDataClientTest",
"interfaces": "",
"superclass": "extends BaseConnectionlessQueryTest"
} | {
"body": "@Test\n public void testHandleCreateTableMutationCode() throws SQLException {\n MetaDataProtocol.MetaDataMutationResult result = new MetaDataProtocol.MetaDataMutationResult\n (MetaDataProtocol.MutationCode.UNALLOWED_TABLE_MUTATION ,new PSchema(schema),\n EnvironmentEdgeManager.currentTimeMillis());\n try {\n mockClient.handleCreateTableMutationCode(result, result.getMutationCode(), stmt,\n schema, baseTable, null);\n fail();\n } catch (SQLException e) {\n assertEquals(SQLExceptionCode.CANNOT_MUTATE_TABLE.getErrorCode(), e.getErrorCode());\n }\n }",
"class_method_signature": "MetaDataClientTest.testHandleCreateTableMutationCode()",
"constructor": false,
"full_signature": "@Test public void testHandleCreateTableMutationCode()",
"identifier": "testHandleCreateTableMutationCode",
"invocations": [
"currentTimeMillis",
"handleCreateTableMutationCode",
"getMutationCode",
"fail",
"assertEquals",
"getErrorCode",
"getErrorCode"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testHandleCreateTableMutationCode()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MetaDataClient.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataClient.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "FACTORY = new ParseNodeFactory()",
"modifier": "private static final",
"original_string": "private static final ParseNodeFactory FACTORY = new ParseNodeFactory();",
"type": "ParseNodeFactory",
"var_name": "FACTORY"
},
{
"declarator": "SET_ASYNC_CREATED_DATE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n ASYNC_CREATED_DATE + \" \" + PDate.INSTANCE.getSqlTypeName() +\n \") VALUES (?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String SET_ASYNC_CREATED_DATE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n ASYNC_CREATED_DATE + \" \" + PDate.INSTANCE.getSqlTypeName() +\n \") VALUES (?, ?, ?, ?)\";",
"type": "String",
"var_name": "SET_ASYNC_CREATED_DATE"
},
{
"declarator": "SET_INDEX_SYNC_CREATED_DATE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n SYNC_INDEX_CREATED_DATE + \" \" + PDate.INSTANCE.getSqlTypeName() +\n \") VALUES (?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String SET_INDEX_SYNC_CREATED_DATE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n SYNC_INDEX_CREATED_DATE + \" \" + PDate.INSTANCE.getSqlTypeName() +\n \") VALUES (?, ?, ?, ?)\";",
"type": "String",
"var_name": "SET_INDEX_SYNC_CREATED_DATE"
},
{
"declarator": "CREATE_TABLE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n TABLE_TYPE + \",\" +\n TABLE_SEQ_NUM + \",\" +\n COLUMN_COUNT + \",\" +\n SALT_BUCKETS + \",\" +\n PK_NAME + \",\" +\n DATA_TABLE_NAME + \",\" +\n INDEX_STATE + \",\" +\n IMMUTABLE_ROWS + \",\" +\n DEFAULT_COLUMN_FAMILY_NAME + \",\" +\n VIEW_STATEMENT + \",\" +\n DISABLE_WAL + \",\" +\n MULTI_TENANT + \",\" +\n VIEW_TYPE + \",\" +\n INDEX_TYPE + \",\" +\n STORE_NULLS + \",\" +\n BASE_COLUMN_COUNT + \",\" +\n TRANSACTION_PROVIDER + \",\" +\n UPDATE_CACHE_FREQUENCY + \",\" +\n IS_NAMESPACE_MAPPED + \",\" +\n AUTO_PARTITION_SEQ + \",\" +\n APPEND_ONLY_SCHEMA + \",\" +\n GUIDE_POSTS_WIDTH + \",\" +\n IMMUTABLE_STORAGE_SCHEME + \",\" +\n ENCODING_SCHEME + \",\" +\n USE_STATS_FOR_PARALLELIZATION +\",\" +\n VIEW_INDEX_ID_DATA_TYPE +\",\" +\n PHOENIX_TTL +\",\" +\n PHOENIX_TTL_HWM +\n \") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String CREATE_TABLE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n TABLE_TYPE + \",\" +\n TABLE_SEQ_NUM + \",\" +\n COLUMN_COUNT + \",\" +\n SALT_BUCKETS + \",\" +\n PK_NAME + \",\" +\n DATA_TABLE_NAME + \",\" +\n INDEX_STATE + \",\" +\n IMMUTABLE_ROWS + \",\" +\n DEFAULT_COLUMN_FAMILY_NAME + \",\" +\n VIEW_STATEMENT + \",\" +\n DISABLE_WAL + \",\" +\n MULTI_TENANT + \",\" +\n VIEW_TYPE + \",\" +\n INDEX_TYPE + \",\" +\n STORE_NULLS + \",\" +\n BASE_COLUMN_COUNT + \",\" +\n TRANSACTION_PROVIDER + \",\" +\n UPDATE_CACHE_FREQUENCY + \",\" +\n IS_NAMESPACE_MAPPED + \",\" +\n AUTO_PARTITION_SEQ + \",\" +\n APPEND_ONLY_SCHEMA + \",\" +\n GUIDE_POSTS_WIDTH + \",\" +\n IMMUTABLE_STORAGE_SCHEME + \",\" +\n ENCODING_SCHEME + \",\" +\n USE_STATS_FOR_PARALLELIZATION +\",\" +\n VIEW_INDEX_ID_DATA_TYPE +\",\" +\n PHOENIX_TTL +\",\" +\n PHOENIX_TTL_HWM +\n \") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "CREATE_TABLE"
},
{
"declarator": "CREATE_SCHEMA = \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE\n + \"\\\"( \" + TABLE_SCHEM + \",\" + TABLE_NAME + \") VALUES (?,?)\"",
"modifier": "private static final",
"original_string": "private static final String CREATE_SCHEMA = \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE\n + \"\\\"( \" + TABLE_SCHEM + \",\" + TABLE_NAME + \") VALUES (?,?)\";",
"type": "String",
"var_name": "CREATE_SCHEMA"
},
{
"declarator": "CREATE_LINK =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n LINK_TYPE + \",\" +\n TABLE_SEQ_NUM +\",\"+ // this is actually set to the parent table's sequence number\n TABLE_TYPE +\n \") VALUES (?, ?, ?, ?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String CREATE_LINK =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n LINK_TYPE + \",\" +\n TABLE_SEQ_NUM +\",\"+ // this is actually set to the parent table's sequence number\n TABLE_TYPE +\n \") VALUES (?, ?, ?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "CREATE_LINK"
},
{
"declarator": "CREATE_VIEW_LINK =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n LINK_TYPE + \",\" +\n PARENT_TENANT_ID + \" \" + PVarchar.INSTANCE.getSqlTypeName() + // Dynamic column for now to prevent schema change\n \") VALUES (?, ?, ?, ?, ?, ?)\"",
"modifier": "public static final",
"original_string": "public static final String CREATE_VIEW_LINK =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n LINK_TYPE + \",\" +\n PARENT_TENANT_ID + \" \" + PVarchar.INSTANCE.getSqlTypeName() + // Dynamic column for now to prevent schema change\n \") VALUES (?, ?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "CREATE_VIEW_LINK"
},
{
"declarator": "UPDATE_ENCODED_COLUMN_COUNTER = \n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \", \" + \n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n COLUMN_QUALIFIER_COUNTER + \n \") VALUES (?, ?, ?, ?, ?)\"",
"modifier": "public static final",
"original_string": "public static final String UPDATE_ENCODED_COLUMN_COUNTER = \n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \", \" + \n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n COLUMN_QUALIFIER_COUNTER + \n \") VALUES (?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "UPDATE_ENCODED_COLUMN_COUNTER"
},
{
"declarator": "CREATE_CHILD_LINK =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n LINK_TYPE + \n \") VALUES (?, ?, ?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String CREATE_CHILD_LINK =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n LINK_TYPE + \n \") VALUES (?, ?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "CREATE_CHILD_LINK"
},
{
"declarator": "CREATE_VIEW_INDEX_PARENT_LINK =\n \t\t\"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n LINK_TYPE + \n \") VALUES (?, ?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String CREATE_VIEW_INDEX_PARENT_LINK =\n \t\t\"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n LINK_TYPE + \n \") VALUES (?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "CREATE_VIEW_INDEX_PARENT_LINK"
},
{
"declarator": "INCREMENT_SEQ_NUM =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n TABLE_SEQ_NUM +\n \") VALUES (?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String INCREMENT_SEQ_NUM =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n TABLE_SEQ_NUM +\n \") VALUES (?, ?, ?, ?)\";",
"type": "String",
"var_name": "INCREMENT_SEQ_NUM"
},
{
"declarator": "MUTATE_TABLE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n TABLE_TYPE + \",\" +\n TABLE_SEQ_NUM + \",\" +\n COLUMN_COUNT +\n \") VALUES (?, ?, ?, ?, ?, ?)\"",
"modifier": "public static final",
"original_string": "public static final String MUTATE_TABLE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n TABLE_TYPE + \",\" +\n TABLE_SEQ_NUM + \",\" +\n COLUMN_COUNT +\n \") VALUES (?, ?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "MUTATE_TABLE"
},
{
"declarator": "UPDATE_INDEX_STATE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n INDEX_STATE + \",\" +\n ASYNC_REBUILD_TIMESTAMP + \" \" + PLong.INSTANCE.getSqlTypeName() +\n \") VALUES (?, ?, ?, ?, ?)\"",
"modifier": "public static final",
"original_string": "public static final String UPDATE_INDEX_STATE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n INDEX_STATE + \",\" +\n ASYNC_REBUILD_TIMESTAMP + \" \" + PLong.INSTANCE.getSqlTypeName() +\n \") VALUES (?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "UPDATE_INDEX_STATE"
},
{
"declarator": "UPDATE_INDEX_REBUILD_ASYNC_STATE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n ASYNC_REBUILD_TIMESTAMP + \" \" + PLong.INSTANCE.getSqlTypeName() +\n \") VALUES (?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String UPDATE_INDEX_REBUILD_ASYNC_STATE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n ASYNC_REBUILD_TIMESTAMP + \" \" + PLong.INSTANCE.getSqlTypeName() +\n \") VALUES (?, ?, ?, ?)\";",
"type": "String",
"var_name": "UPDATE_INDEX_REBUILD_ASYNC_STATE"
},
{
"declarator": "UPDATE_INDEX_STATE_TO_ACTIVE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n INDEX_STATE + \",\" +\n INDEX_DISABLE_TIMESTAMP +\",\"+\n ASYNC_REBUILD_TIMESTAMP + \" \" + PLong.INSTANCE.getSqlTypeName() +\n \") VALUES (?, ?, ?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String UPDATE_INDEX_STATE_TO_ACTIVE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n INDEX_STATE + \",\" +\n INDEX_DISABLE_TIMESTAMP +\",\"+\n ASYNC_REBUILD_TIMESTAMP + \" \" + PLong.INSTANCE.getSqlTypeName() +\n \") VALUES (?, ?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "UPDATE_INDEX_STATE_TO_ACTIVE"
},
{
"declarator": "INSERT_COLUMN_CREATE_TABLE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n DATA_TYPE + \",\" +\n NULLABLE + \",\" +\n COLUMN_SIZE + \",\" +\n DECIMAL_DIGITS + \",\" +\n ORDINAL_POSITION + \",\" +\n SORT_ORDER + \",\" +\n DATA_TABLE_NAME + \",\" + // write this both in the column and table rows for access by metadata APIs\n ARRAY_SIZE + \",\" +\n VIEW_CONSTANT + \",\" +\n IS_VIEW_REFERENCED + \",\" +\n PK_NAME + \",\" + // write this both in the column and table rows for access by metadata APIs\n KEY_SEQ + \",\" +\n COLUMN_DEF + \",\" +\n COLUMN_QUALIFIER + \", \" +\n IS_ROW_TIMESTAMP +\n \") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String INSERT_COLUMN_CREATE_TABLE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n DATA_TYPE + \",\" +\n NULLABLE + \",\" +\n COLUMN_SIZE + \",\" +\n DECIMAL_DIGITS + \",\" +\n ORDINAL_POSITION + \",\" +\n SORT_ORDER + \",\" +\n DATA_TABLE_NAME + \",\" + // write this both in the column and table rows for access by metadata APIs\n ARRAY_SIZE + \",\" +\n VIEW_CONSTANT + \",\" +\n IS_VIEW_REFERENCED + \",\" +\n PK_NAME + \",\" + // write this both in the column and table rows for access by metadata APIs\n KEY_SEQ + \",\" +\n COLUMN_DEF + \",\" +\n COLUMN_QUALIFIER + \", \" +\n IS_ROW_TIMESTAMP +\n \") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "INSERT_COLUMN_CREATE_TABLE"
},
{
"declarator": "ALTER_SYSCATALOG_TABLE_UPGRADE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n DATA_TYPE + \",\" +\n NULLABLE + \",\" +\n COLUMN_SIZE + \",\" +\n DECIMAL_DIGITS + \",\" +\n ORDINAL_POSITION + \",\" +\n SORT_ORDER + \",\" +\n DATA_TABLE_NAME + \",\" + // write this both in the column and table rows for access by metadata APIs\n ARRAY_SIZE + \",\" +\n VIEW_CONSTANT + \",\" +\n IS_VIEW_REFERENCED + \",\" +\n PK_NAME + \",\" + // write this both in the column and table rows for access by metadata APIs\n KEY_SEQ + \",\" +\n COLUMN_DEF +\n \") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String ALTER_SYSCATALOG_TABLE_UPGRADE =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\"( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n DATA_TYPE + \",\" +\n NULLABLE + \",\" +\n COLUMN_SIZE + \",\" +\n DECIMAL_DIGITS + \",\" +\n ORDINAL_POSITION + \",\" +\n SORT_ORDER + \",\" +\n DATA_TABLE_NAME + \",\" + // write this both in the column and table rows for access by metadata APIs\n ARRAY_SIZE + \",\" +\n VIEW_CONSTANT + \",\" +\n IS_VIEW_REFERENCED + \",\" +\n PK_NAME + \",\" + // write this both in the column and table rows for access by metadata APIs\n KEY_SEQ + \",\" +\n COLUMN_DEF +\n \") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "ALTER_SYSCATALOG_TABLE_UPGRADE"
},
{
"declarator": "UPDATE_COLUMN_POSITION =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\" ( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n ORDINAL_POSITION +\n \") VALUES (?, ?, ?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String UPDATE_COLUMN_POSITION =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_CATALOG_TABLE + \"\\\" ( \" +\n TENANT_ID + \",\" +\n TABLE_SCHEM + \",\" +\n TABLE_NAME + \",\" +\n COLUMN_NAME + \",\" +\n COLUMN_FAMILY + \",\" +\n ORDINAL_POSITION +\n \") VALUES (?, ?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "UPDATE_COLUMN_POSITION"
},
{
"declarator": "CREATE_FUNCTION =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_FUNCTION_TABLE + \"\\\" ( \" +\n TENANT_ID +\",\"+\n FUNCTION_NAME + \",\" +\n NUM_ARGS + \",\" +\n CLASS_NAME + \",\" +\n JAR_PATH + \",\" +\n RETURN_TYPE +\n \") VALUES (?, ?, ?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String CREATE_FUNCTION =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_FUNCTION_TABLE + \"\\\" ( \" +\n TENANT_ID +\",\"+\n FUNCTION_NAME + \",\" +\n NUM_ARGS + \",\" +\n CLASS_NAME + \",\" +\n JAR_PATH + \",\" +\n RETURN_TYPE +\n \") VALUES (?, ?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "CREATE_FUNCTION"
},
{
"declarator": "INSERT_FUNCTION_ARGUMENT =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_FUNCTION_TABLE + \"\\\" ( \" +\n TENANT_ID +\",\"+\n FUNCTION_NAME + \",\" +\n TYPE + \",\" +\n ARG_POSITION +\",\"+\n IS_ARRAY + \",\" +\n IS_CONSTANT + \",\" +\n DEFAULT_VALUE + \",\" +\n MIN_VALUE + \",\" +\n MAX_VALUE +\n \") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\"",
"modifier": "private static final",
"original_string": "private static final String INSERT_FUNCTION_ARGUMENT =\n \"UPSERT INTO \" + SYSTEM_CATALOG_SCHEMA + \".\\\"\" + SYSTEM_FUNCTION_TABLE + \"\\\" ( \" +\n TENANT_ID +\",\"+\n FUNCTION_NAME + \",\" +\n TYPE + \",\" +\n ARG_POSITION +\",\"+\n IS_ARRAY + \",\" +\n IS_CONSTANT + \",\" +\n DEFAULT_VALUE + \",\" +\n MIN_VALUE + \",\" +\n MAX_VALUE +\n \") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\";",
"type": "String",
"var_name": "INSERT_FUNCTION_ARGUMENT"
},
{
"declarator": "EMPTY_TABLE = \" \"",
"modifier": "public static final",
"original_string": "public static final String EMPTY_TABLE = \" \";",
"type": "String",
"var_name": "EMPTY_TABLE"
},
{
"declarator": "connection",
"modifier": "private final",
"original_string": "private final PhoenixConnection connection;",
"type": "PhoenixConnection",
"var_name": "connection"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java",
"identifier": "MetaDataClient",
"interfaces": "",
"methods": [
{
"class_method_signature": "MetaDataClient.MetaDataClient(PhoenixConnection connection)",
"constructor": true,
"full_signature": "public MetaDataClient(PhoenixConnection connection)",
"identifier": "MetaDataClient",
"modifiers": "public",
"parameters": "(PhoenixConnection connection)",
"return": "",
"signature": " MetaDataClient(PhoenixConnection connection)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getConnection()",
"constructor": false,
"full_signature": "public PhoenixConnection getConnection()",
"identifier": "getConnection",
"modifiers": "public",
"parameters": "()",
"return": "PhoenixConnection",
"signature": "PhoenixConnection getConnection()",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getCurrentTime(String schemaName, String tableName)",
"constructor": false,
"full_signature": "public long getCurrentTime(String schemaName, String tableName)",
"identifier": "getCurrentTime",
"modifiers": "public",
"parameters": "(String schemaName, String tableName)",
"return": "long",
"signature": "long getCurrentTime(String schemaName, String tableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateCache(String schemaName, String tableName)",
"constructor": false,
"full_signature": "public MetaDataMutationResult updateCache(String schemaName, String tableName)",
"identifier": "updateCache",
"modifiers": "public",
"parameters": "(String schemaName, String tableName)",
"return": "MetaDataMutationResult",
"signature": "MetaDataMutationResult updateCache(String schemaName, String tableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateCache(String schemaName, String tableName,\n boolean alwaysHitServer)",
"constructor": false,
"full_signature": "public MetaDataMutationResult updateCache(String schemaName, String tableName,\n boolean alwaysHitServer)",
"identifier": "updateCache",
"modifiers": "public",
"parameters": "(String schemaName, String tableName,\n boolean alwaysHitServer)",
"return": "MetaDataMutationResult",
"signature": "MetaDataMutationResult updateCache(String schemaName, String tableName,\n boolean alwaysHitServer)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateCache(PName tenantId, String schemaName, String tableName, boolean alwaysHitServer)",
"constructor": false,
"full_signature": "public MetaDataMutationResult updateCache(PName tenantId, String schemaName, String tableName, boolean alwaysHitServer)",
"identifier": "updateCache",
"modifiers": "public",
"parameters": "(PName tenantId, String schemaName, String tableName, boolean alwaysHitServer)",
"return": "MetaDataMutationResult",
"signature": "MetaDataMutationResult updateCache(PName tenantId, String schemaName, String tableName, boolean alwaysHitServer)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateCache(List<String> functionNames)",
"constructor": false,
"full_signature": "public MetaDataMutationResult updateCache(List<String> functionNames)",
"identifier": "updateCache",
"modifiers": "public",
"parameters": "(List<String> functionNames)",
"return": "MetaDataMutationResult",
"signature": "MetaDataMutationResult updateCache(List<String> functionNames)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateCache(List<String> functionNames, boolean alwaysHitServer)",
"constructor": false,
"full_signature": "private MetaDataMutationResult updateCache(List<String> functionNames, boolean alwaysHitServer)",
"identifier": "updateCache",
"modifiers": "private",
"parameters": "(List<String> functionNames, boolean alwaysHitServer)",
"return": "MetaDataMutationResult",
"signature": "MetaDataMutationResult updateCache(List<String> functionNames, boolean alwaysHitServer)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateCache(PName tenantId, List<String> functionNames)",
"constructor": false,
"full_signature": "public MetaDataMutationResult updateCache(PName tenantId, List<String> functionNames)",
"identifier": "updateCache",
"modifiers": "public",
"parameters": "(PName tenantId, List<String> functionNames)",
"return": "MetaDataMutationResult",
"signature": "MetaDataMutationResult updateCache(PName tenantId, List<String> functionNames)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getClientTimeStamp()",
"constructor": false,
"full_signature": "private long getClientTimeStamp()",
"identifier": "getClientTimeStamp",
"modifiers": "private",
"parameters": "()",
"return": "long",
"signature": "long getClientTimeStamp()",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getCurrentScn()",
"constructor": false,
"full_signature": "private long getCurrentScn()",
"identifier": "getCurrentScn",
"modifiers": "private",
"parameters": "()",
"return": "long",
"signature": "long getCurrentScn()",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateCache(PName origTenantId, String schemaName, String tableName,\n boolean alwaysHitServer, Long resolvedTimestamp)",
"constructor": false,
"full_signature": "public MetaDataMutationResult updateCache(PName origTenantId, String schemaName, String tableName,\n boolean alwaysHitServer, Long resolvedTimestamp)",
"identifier": "updateCache",
"modifiers": "public",
"parameters": "(PName origTenantId, String schemaName, String tableName,\n boolean alwaysHitServer, Long resolvedTimestamp)",
"return": "MetaDataMutationResult",
"signature": "MetaDataMutationResult updateCache(PName origTenantId, String schemaName, String tableName,\n boolean alwaysHitServer, Long resolvedTimestamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.avoidRpcToGetTable(boolean alwaysHitServer, Long resolvedTimestamp,\n boolean systemTable, PTable table, PTableRef tableRef, long tableResolvedTimestamp)",
"constructor": false,
"full_signature": "private boolean avoidRpcToGetTable(boolean alwaysHitServer, Long resolvedTimestamp,\n boolean systemTable, PTable table, PTableRef tableRef, long tableResolvedTimestamp)",
"identifier": "avoidRpcToGetTable",
"modifiers": "private",
"parameters": "(boolean alwaysHitServer, Long resolvedTimestamp,\n boolean systemTable, PTable table, PTableRef tableRef, long tableResolvedTimestamp)",
"return": "boolean",
"signature": "boolean avoidRpcToGetTable(boolean alwaysHitServer, Long resolvedTimestamp,\n boolean systemTable, PTable table, PTableRef tableRef, long tableResolvedTimestamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateCache(String schemaName)",
"constructor": false,
"full_signature": "public MetaDataMutationResult updateCache(String schemaName)",
"identifier": "updateCache",
"modifiers": "public",
"parameters": "(String schemaName)",
"return": "MetaDataMutationResult",
"signature": "MetaDataMutationResult updateCache(String schemaName)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateCache(String schemaName, boolean alwaysHitServer)",
"constructor": false,
"full_signature": "public MetaDataMutationResult updateCache(String schemaName, boolean alwaysHitServer)",
"identifier": "updateCache",
"modifiers": "public",
"parameters": "(String schemaName, boolean alwaysHitServer)",
"return": "MetaDataMutationResult",
"signature": "MetaDataMutationResult updateCache(String schemaName, boolean alwaysHitServer)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateCache(PName tenantId, List<String> functionNames,\n boolean alwaysHitServer)",
"constructor": false,
"full_signature": "public MetaDataMutationResult updateCache(PName tenantId, List<String> functionNames,\n boolean alwaysHitServer)",
"identifier": "updateCache",
"modifiers": "public",
"parameters": "(PName tenantId, List<String> functionNames,\n boolean alwaysHitServer)",
"return": "MetaDataMutationResult",
"signature": "MetaDataMutationResult updateCache(PName tenantId, List<String> functionNames,\n boolean alwaysHitServer)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.addColumnsAndIndexesFromAncestors(MetaDataMutationResult result, Long resolvedTimestamp,\n boolean alwaysAddAncestorColumnsAndIndexes)",
"constructor": false,
"full_signature": "private boolean addColumnsAndIndexesFromAncestors(MetaDataMutationResult result, Long resolvedTimestamp,\n boolean alwaysAddAncestorColumnsAndIndexes)",
"identifier": "addColumnsAndIndexesFromAncestors",
"modifiers": "private",
"parameters": "(MetaDataMutationResult result, Long resolvedTimestamp,\n boolean alwaysAddAncestorColumnsAndIndexes)",
"return": "boolean",
"signature": "boolean addColumnsAndIndexesFromAncestors(MetaDataMutationResult result, Long resolvedTimestamp,\n boolean alwaysAddAncestorColumnsAndIndexes)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.addColumnMutation(String schemaName, String tableName, PColumn column, PreparedStatement colUpsert, String parentTableName, String pkName, Short keySeq, boolean isSalted)",
"constructor": false,
"full_signature": "private void addColumnMutation(String schemaName, String tableName, PColumn column, PreparedStatement colUpsert, String parentTableName, String pkName, Short keySeq, boolean isSalted)",
"identifier": "addColumnMutation",
"modifiers": "private",
"parameters": "(String schemaName, String tableName, PColumn column, PreparedStatement colUpsert, String parentTableName, String pkName, Short keySeq, boolean isSalted)",
"return": "void",
"signature": "void addColumnMutation(String schemaName, String tableName, PColumn column, PreparedStatement colUpsert, String parentTableName, String pkName, Short keySeq, boolean isSalted)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.addFunctionArgMutation(String functionName, FunctionArgument arg, PreparedStatement argUpsert, int position)",
"constructor": false,
"full_signature": "private void addFunctionArgMutation(String functionName, FunctionArgument arg, PreparedStatement argUpsert, int position)",
"identifier": "addFunctionArgMutation",
"modifiers": "private",
"parameters": "(String functionName, FunctionArgument arg, PreparedStatement argUpsert, int position)",
"return": "void",
"signature": "void addFunctionArgMutation(String functionName, FunctionArgument arg, PreparedStatement argUpsert, int position)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.newColumn(int position, ColumnDef def, PrimaryKeyConstraint pkConstraint, String defaultColumnFamily,\n boolean addingToPK, byte[] columnQualifierBytes, boolean isImmutableRows)",
"constructor": false,
"full_signature": "private PColumn newColumn(int position, ColumnDef def, PrimaryKeyConstraint pkConstraint, String defaultColumnFamily,\n boolean addingToPK, byte[] columnQualifierBytes, boolean isImmutableRows)",
"identifier": "newColumn",
"modifiers": "private",
"parameters": "(int position, ColumnDef def, PrimaryKeyConstraint pkConstraint, String defaultColumnFamily,\n boolean addingToPK, byte[] columnQualifierBytes, boolean isImmutableRows)",
"return": "PColumn",
"signature": "PColumn newColumn(int position, ColumnDef def, PrimaryKeyConstraint pkConstraint, String defaultColumnFamily,\n boolean addingToPK, byte[] columnQualifierBytes, boolean isImmutableRows)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.createTable(CreateTableStatement statement, byte[][] splits, PTable parent, String viewStatement, ViewType viewType, PDataType viewIndexIdType, byte[][] viewColumnConstants, BitSet isViewColumnReferenced)",
"constructor": false,
"full_signature": "public MutationState createTable(CreateTableStatement statement, byte[][] splits, PTable parent, String viewStatement, ViewType viewType, PDataType viewIndexIdType, byte[][] viewColumnConstants, BitSet isViewColumnReferenced)",
"identifier": "createTable",
"modifiers": "public",
"parameters": "(CreateTableStatement statement, byte[][] splits, PTable parent, String viewStatement, ViewType viewType, PDataType viewIndexIdType, byte[][] viewColumnConstants, BitSet isViewColumnReferenced)",
"return": "MutationState",
"signature": "MutationState createTable(CreateTableStatement statement, byte[][] splits, PTable parent, String viewStatement, ViewType viewType, PDataType viewIndexIdType, byte[][] viewColumnConstants, BitSet isViewColumnReferenced)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.populatePropertyMaps(ListMultimap<String,Pair<String,Object>> statementProps, Map<String, Object> tableProps,\n Map<String, Object> commonFamilyProps, PTableType tableType)",
"constructor": false,
"full_signature": "private void populatePropertyMaps(ListMultimap<String,Pair<String,Object>> statementProps, Map<String, Object> tableProps,\n Map<String, Object> commonFamilyProps, PTableType tableType)",
"identifier": "populatePropertyMaps",
"modifiers": "private",
"parameters": "(ListMultimap<String,Pair<String,Object>> statementProps, Map<String, Object> tableProps,\n Map<String, Object> commonFamilyProps, PTableType tableType)",
"return": "void",
"signature": "void populatePropertyMaps(ListMultimap<String,Pair<String,Object>> statementProps, Map<String, Object> tableProps,\n Map<String, Object> commonFamilyProps, PTableType tableType)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateStatistics(UpdateStatisticsStatement updateStatisticsStmt)",
"constructor": false,
"full_signature": "public MutationState updateStatistics(UpdateStatisticsStatement updateStatisticsStmt)",
"identifier": "updateStatistics",
"modifiers": "public",
"parameters": "(UpdateStatisticsStatement updateStatisticsStmt)",
"return": "MutationState",
"signature": "MutationState updateStatistics(UpdateStatisticsStatement updateStatisticsStmt)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateStatisticsInternal(PName physicalName, PTable logicalTable, Map<String, Object> statsProps, boolean checkLastStatsUpdateTime)",
"constructor": false,
"full_signature": "private long updateStatisticsInternal(PName physicalName, PTable logicalTable, Map<String, Object> statsProps, boolean checkLastStatsUpdateTime)",
"identifier": "updateStatisticsInternal",
"modifiers": "private",
"parameters": "(PName physicalName, PTable logicalTable, Map<String, Object> statsProps, boolean checkLastStatsUpdateTime)",
"return": "long",
"signature": "long updateStatisticsInternal(PName physicalName, PTable logicalTable, Map<String, Object> statsProps, boolean checkLastStatsUpdateTime)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.updateStatisticsInternal(PName physicalName, PTable logicalTable, Map<String, Object> statsProps, List<byte[]> cfs, boolean checkLastStatsUpdateTime)",
"constructor": false,
"full_signature": "private long updateStatisticsInternal(PName physicalName, PTable logicalTable, Map<String, Object> statsProps, List<byte[]> cfs, boolean checkLastStatsUpdateTime)",
"identifier": "updateStatisticsInternal",
"modifiers": "private",
"parameters": "(PName physicalName, PTable logicalTable, Map<String, Object> statsProps, List<byte[]> cfs, boolean checkLastStatsUpdateTime)",
"return": "long",
"signature": "long updateStatisticsInternal(PName physicalName, PTable logicalTable, Map<String, Object> statsProps, List<byte[]> cfs, boolean checkLastStatsUpdateTime)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.buildIndexAtTimeStamp(PTable index, NamedTableNode dataTableNode)",
"constructor": false,
"full_signature": "private MutationState buildIndexAtTimeStamp(PTable index, NamedTableNode dataTableNode)",
"identifier": "buildIndexAtTimeStamp",
"modifiers": "private",
"parameters": "(PTable index, NamedTableNode dataTableNode)",
"return": "MutationState",
"signature": "MutationState buildIndexAtTimeStamp(PTable index, NamedTableNode dataTableNode)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getMutationPlanForBuildingIndex(PTable index, TableRef dataTableRef)",
"constructor": false,
"full_signature": "private MutationPlan getMutationPlanForBuildingIndex(PTable index, TableRef dataTableRef)",
"identifier": "getMutationPlanForBuildingIndex",
"modifiers": "private",
"parameters": "(PTable index, TableRef dataTableRef)",
"return": "MutationPlan",
"signature": "MutationPlan getMutationPlanForBuildingIndex(PTable index, TableRef dataTableRef)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.buildIndex(PTable index, TableRef dataTableRef)",
"constructor": false,
"full_signature": "private MutationState buildIndex(PTable index, TableRef dataTableRef)",
"identifier": "buildIndex",
"modifiers": "private",
"parameters": "(PTable index, TableRef dataTableRef)",
"return": "MutationState",
"signature": "MutationState buildIndex(PTable index, TableRef dataTableRef)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getFullTableName(TableRef dataTableRef)",
"constructor": false,
"full_signature": "private String getFullTableName(TableRef dataTableRef)",
"identifier": "getFullTableName",
"modifiers": "private",
"parameters": "(TableRef dataTableRef)",
"return": "String",
"signature": "String getFullTableName(TableRef dataTableRef)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.declareCursor(DeclareCursorStatement statement, QueryPlan queryPlan)",
"constructor": false,
"full_signature": "public MutationState declareCursor(DeclareCursorStatement statement, QueryPlan queryPlan)",
"identifier": "declareCursor",
"modifiers": "public",
"parameters": "(DeclareCursorStatement statement, QueryPlan queryPlan)",
"return": "MutationState",
"signature": "MutationState declareCursor(DeclareCursorStatement statement, QueryPlan queryPlan)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.open(OpenStatement statement)",
"constructor": false,
"full_signature": "public MutationState open(OpenStatement statement)",
"identifier": "open",
"modifiers": "public",
"parameters": "(OpenStatement statement)",
"return": "MutationState",
"signature": "MutationState open(OpenStatement statement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.close(CloseStatement statement)",
"constructor": false,
"full_signature": "public MutationState close(CloseStatement statement)",
"identifier": "close",
"modifiers": "public",
"parameters": "(CloseStatement statement)",
"return": "MutationState",
"signature": "MutationState close(CloseStatement statement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getViewIndexDataType()",
"constructor": false,
"full_signature": "private PDataType getViewIndexDataType()",
"identifier": "getViewIndexDataType",
"modifiers": "private",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getViewIndexDataType()",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.createIndex(CreateIndexStatement statement, byte[][] splits)",
"constructor": false,
"full_signature": "public MutationState createIndex(CreateIndexStatement statement, byte[][] splits)",
"identifier": "createIndex",
"modifiers": "public",
"parameters": "(CreateIndexStatement statement, byte[][] splits)",
"return": "MutationState",
"signature": "MutationState createIndex(CreateIndexStatement statement, byte[][] splits)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.dropSequence(DropSequenceStatement statement)",
"constructor": false,
"full_signature": "public MutationState dropSequence(DropSequenceStatement statement)",
"identifier": "dropSequence",
"modifiers": "public",
"parameters": "(DropSequenceStatement statement)",
"return": "MutationState",
"signature": "MutationState dropSequence(DropSequenceStatement statement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.createSequence(CreateSequenceStatement statement, long startWith,\n long incrementBy, long cacheSize, long minValue, long maxValue)",
"constructor": false,
"full_signature": "public MutationState createSequence(CreateSequenceStatement statement, long startWith,\n long incrementBy, long cacheSize, long minValue, long maxValue)",
"identifier": "createSequence",
"modifiers": "public",
"parameters": "(CreateSequenceStatement statement, long startWith,\n long incrementBy, long cacheSize, long minValue, long maxValue)",
"return": "MutationState",
"signature": "MutationState createSequence(CreateSequenceStatement statement, long startWith,\n long incrementBy, long cacheSize, long minValue, long maxValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.createSequence(String tenantId, String schemaName, String sequenceName,\n boolean ifNotExists, long startWith, long incrementBy, long cacheSize, boolean cycle,\n long minValue, long maxValue, long timestamp)",
"constructor": false,
"full_signature": "private MutationState createSequence(String tenantId, String schemaName, String sequenceName,\n boolean ifNotExists, long startWith, long incrementBy, long cacheSize, boolean cycle,\n long minValue, long maxValue, long timestamp)",
"identifier": "createSequence",
"modifiers": "private",
"parameters": "(String tenantId, String schemaName, String sequenceName,\n boolean ifNotExists, long startWith, long incrementBy, long cacheSize, boolean cycle,\n long minValue, long maxValue, long timestamp)",
"return": "MutationState",
"signature": "MutationState createSequence(String tenantId, String schemaName, String sequenceName,\n boolean ifNotExists, long startWith, long incrementBy, long cacheSize, boolean cycle,\n long minValue, long maxValue, long timestamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.createFunction(CreateFunctionStatement stmt)",
"constructor": false,
"full_signature": "public MutationState createFunction(CreateFunctionStatement stmt)",
"identifier": "createFunction",
"modifiers": "public",
"parameters": "(CreateFunctionStatement stmt)",
"return": "MutationState",
"signature": "MutationState createFunction(CreateFunctionStatement stmt)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.findColumnDefOrNull(List<ColumnDef> colDefs, ColumnName colName)",
"constructor": false,
"full_signature": "private static ColumnDef findColumnDefOrNull(List<ColumnDef> colDefs, ColumnName colName)",
"identifier": "findColumnDefOrNull",
"modifiers": "private static",
"parameters": "(List<ColumnDef> colDefs, ColumnName colName)",
"return": "ColumnDef",
"signature": "ColumnDef findColumnDefOrNull(List<ColumnDef> colDefs, ColumnName colName)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.checkAndValidateRowTimestampCol(ColumnDef colDef, PrimaryKeyConstraint pkConstraint,\n boolean rowTimeStampColAlreadyFound, PTableType tableType)",
"constructor": false,
"full_signature": "private static boolean checkAndValidateRowTimestampCol(ColumnDef colDef, PrimaryKeyConstraint pkConstraint,\n boolean rowTimeStampColAlreadyFound, PTableType tableType)",
"identifier": "checkAndValidateRowTimestampCol",
"modifiers": "private static",
"parameters": "(ColumnDef colDef, PrimaryKeyConstraint pkConstraint,\n boolean rowTimeStampColAlreadyFound, PTableType tableType)",
"return": "boolean",
"signature": "boolean checkAndValidateRowTimestampCol(ColumnDef colDef, PrimaryKeyConstraint pkConstraint,\n boolean rowTimeStampColAlreadyFound, PTableType tableType)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.writeCell(String tenantId, String schemaName, String tableName, String columnName)",
"constructor": false,
"full_signature": "private boolean writeCell(String tenantId, String schemaName, String tableName, String columnName)",
"identifier": "writeCell",
"modifiers": "private",
"parameters": "(String tenantId, String schemaName, String tableName, String columnName)",
"return": "boolean",
"signature": "boolean writeCell(String tenantId, String schemaName, String tableName, String columnName)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.deleteCell(String tenantId, String schemaName, String tableName, String columnName)",
"constructor": false,
"full_signature": "private void deleteCell(String tenantId, String schemaName, String tableName, String columnName)",
"identifier": "deleteCell",
"modifiers": "private",
"parameters": "(String tenantId, String schemaName, String tableName, String columnName)",
"return": "void",
"signature": "void deleteCell(String tenantId, String schemaName, String tableName, String columnName)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.populateFamilyPropsList(Map<String, PName> familyNames, Map<String,Object> commonFamilyProps,\n CreateTableStatement statement, String defaultFamilyName, boolean isLocalIndex,\n final List<Pair<byte[],Map<String,Object>>> familyPropList)",
"constructor": false,
"full_signature": "private void populateFamilyPropsList(Map<String, PName> familyNames, Map<String,Object> commonFamilyProps,\n CreateTableStatement statement, String defaultFamilyName, boolean isLocalIndex,\n final List<Pair<byte[],Map<String,Object>>> familyPropList)",
"identifier": "populateFamilyPropsList",
"modifiers": "private",
"parameters": "(Map<String, PName> familyNames, Map<String,Object> commonFamilyProps,\n CreateTableStatement statement, String defaultFamilyName, boolean isLocalIndex,\n final List<Pair<byte[],Map<String,Object>>> familyPropList)",
"return": "void",
"signature": "void populateFamilyPropsList(Map<String, PName> familyNames, Map<String,Object> commonFamilyProps,\n CreateTableStatement statement, String defaultFamilyName, boolean isLocalIndex,\n final List<Pair<byte[],Map<String,Object>>> familyPropList)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.createTableInternal(CreateTableStatement statement, byte[][] splits,\n final PTable parent, String viewStatement, ViewType viewType, PDataType viewIndexIdType,\n final byte[][] viewColumnConstants, final BitSet isViewColumnReferenced, boolean allocateIndexId,\n IndexType indexType, Date asyncCreatedDate,\n Map<String,Object> tableProps,\n Map<String,Object> commonFamilyProps)",
"constructor": false,
"full_signature": "private PTable createTableInternal(CreateTableStatement statement, byte[][] splits,\n final PTable parent, String viewStatement, ViewType viewType, PDataType viewIndexIdType,\n final byte[][] viewColumnConstants, final BitSet isViewColumnReferenced, boolean allocateIndexId,\n IndexType indexType, Date asyncCreatedDate,\n Map<String,Object> tableProps,\n Map<String,Object> commonFamilyProps)",
"identifier": "createTableInternal",
"modifiers": "private",
"parameters": "(CreateTableStatement statement, byte[][] splits,\n final PTable parent, String viewStatement, ViewType viewType, PDataType viewIndexIdType,\n final byte[][] viewColumnConstants, final BitSet isViewColumnReferenced, boolean allocateIndexId,\n IndexType indexType, Date asyncCreatedDate,\n Map<String,Object> tableProps,\n Map<String,Object> commonFamilyProps)",
"return": "PTable",
"signature": "PTable createTableInternal(CreateTableStatement statement, byte[][] splits,\n final PTable parent, String viewStatement, ViewType viewType, PDataType viewIndexIdType,\n final byte[][] viewColumnConstants, final BitSet isViewColumnReferenced, boolean allocateIndexId,\n IndexType indexType, Date asyncCreatedDate,\n Map<String,Object> tableProps,\n Map<String,Object> commonFamilyProps)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.handleCreateTableMutationCode(MetaDataMutationResult result, MutationCode code,\n CreateTableStatement statement, String schemaName, String tableName,\n PTable parent)",
"constructor": false,
"full_signature": "@VisibleForTesting public boolean handleCreateTableMutationCode(MetaDataMutationResult result, MutationCode code,\n CreateTableStatement statement, String schemaName, String tableName,\n PTable parent)",
"identifier": "handleCreateTableMutationCode",
"modifiers": "@VisibleForTesting public",
"parameters": "(MetaDataMutationResult result, MutationCode code,\n CreateTableStatement statement, String schemaName, String tableName,\n PTable parent)",
"return": "boolean",
"signature": "boolean handleCreateTableMutationCode(MetaDataMutationResult result, MutationCode code,\n CreateTableStatement statement, String schemaName, String tableName,\n PTable parent)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.throwsSQLExceptionUtil(String code,String schemaName, String tableName)",
"constructor": false,
"full_signature": "private void throwsSQLExceptionUtil(String code,String schemaName, String tableName)",
"identifier": "throwsSQLExceptionUtil",
"modifiers": "private",
"parameters": "(String code,String schemaName, String tableName)",
"return": "void",
"signature": "void throwsSQLExceptionUtil(String code,String schemaName, String tableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.isPkColumn(PrimaryKeyConstraint pkConstraint, ColumnDef colDef)",
"constructor": false,
"full_signature": "private static boolean isPkColumn(PrimaryKeyConstraint pkConstraint, ColumnDef colDef)",
"identifier": "isPkColumn",
"modifiers": "private static",
"parameters": "(PrimaryKeyConstraint pkConstraint, ColumnDef colDef)",
"return": "boolean",
"signature": "boolean isPkColumn(PrimaryKeyConstraint pkConstraint, ColumnDef colDef)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.throwIfInsufficientColumns(String schemaName, String tableName, Collection<PColumn> columns, boolean isSalted, boolean isMultiTenant)",
"constructor": false,
"full_signature": "private static void throwIfInsufficientColumns(String schemaName, String tableName, Collection<PColumn> columns, boolean isSalted, boolean isMultiTenant)",
"identifier": "throwIfInsufficientColumns",
"modifiers": "private static",
"parameters": "(String schemaName, String tableName, Collection<PColumn> columns, boolean isSalted, boolean isMultiTenant)",
"return": "void",
"signature": "void throwIfInsufficientColumns(String schemaName, String tableName, Collection<PColumn> columns, boolean isSalted, boolean isMultiTenant)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.dropTable(DropTableStatement statement)",
"constructor": false,
"full_signature": "public MutationState dropTable(DropTableStatement statement)",
"identifier": "dropTable",
"modifiers": "public",
"parameters": "(DropTableStatement statement)",
"return": "MutationState",
"signature": "MutationState dropTable(DropTableStatement statement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.dropFunction(DropFunctionStatement statement)",
"constructor": false,
"full_signature": "public MutationState dropFunction(DropFunctionStatement statement)",
"identifier": "dropFunction",
"modifiers": "public",
"parameters": "(DropFunctionStatement statement)",
"return": "MutationState",
"signature": "MutationState dropFunction(DropFunctionStatement statement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.dropIndex(DropIndexStatement statement)",
"constructor": false,
"full_signature": "public MutationState dropIndex(DropIndexStatement statement)",
"identifier": "dropIndex",
"modifiers": "public",
"parameters": "(DropIndexStatement statement)",
"return": "MutationState",
"signature": "MutationState dropIndex(DropIndexStatement statement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.dropFunction(String functionName,\n boolean ifExists)",
"constructor": false,
"full_signature": "private MutationState dropFunction(String functionName,\n boolean ifExists)",
"identifier": "dropFunction",
"modifiers": "private",
"parameters": "(String functionName,\n boolean ifExists)",
"return": "MutationState",
"signature": "MutationState dropFunction(String functionName,\n boolean ifExists)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.dropTable(String schemaName, String tableName, String parentTableName, PTableType tableType,\n boolean ifExists, boolean cascade, boolean skipAddingParentColumns)",
"constructor": false,
"full_signature": " MutationState dropTable(String schemaName, String tableName, String parentTableName, PTableType tableType,\n boolean ifExists, boolean cascade, boolean skipAddingParentColumns)",
"identifier": "dropTable",
"modifiers": "",
"parameters": "(String schemaName, String tableName, String parentTableName, PTableType tableType,\n boolean ifExists, boolean cascade, boolean skipAddingParentColumns)",
"return": "MutationState",
"signature": "MutationState dropTable(String schemaName, String tableName, String parentTableName, PTableType tableType,\n boolean ifExists, boolean cascade, boolean skipAddingParentColumns)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.processMutationResult(String schemaName, String tableName, MetaDataMutationResult result)",
"constructor": false,
"full_signature": "private MutationCode processMutationResult(String schemaName, String tableName, MetaDataMutationResult result)",
"identifier": "processMutationResult",
"modifiers": "private",
"parameters": "(String schemaName, String tableName, MetaDataMutationResult result)",
"return": "MutationCode",
"signature": "MutationCode processMutationResult(String schemaName, String tableName, MetaDataMutationResult result)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, MetaPropertiesEvaluated metaPropertiesEvaluated)",
"constructor": false,
"full_signature": "private long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, MetaPropertiesEvaluated metaPropertiesEvaluated)",
"identifier": "incrementTableSeqNum",
"modifiers": "private",
"parameters": "(PTable table, PTableType expectedType, int columnCountDelta, MetaPropertiesEvaluated metaPropertiesEvaluated)",
"return": "long",
"signature": "long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, MetaPropertiesEvaluated metaPropertiesEvaluated)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, Boolean isTransactional, Long updateCacheFrequency, Long phoenixTTL)",
"constructor": false,
"full_signature": "private long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, Boolean isTransactional, Long updateCacheFrequency, Long phoenixTTL)",
"identifier": "incrementTableSeqNum",
"modifiers": "private",
"parameters": "(PTable table, PTableType expectedType, int columnCountDelta, Boolean isTransactional, Long updateCacheFrequency, Long phoenixTTL)",
"return": "long",
"signature": "long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, Boolean isTransactional, Long updateCacheFrequency, Long phoenixTTL)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta,\n Boolean isTransactional, TransactionFactory.Provider transactionProvider,\n Long updateCacheFrequency, Boolean isImmutableRows, Boolean disableWAL,\n Boolean isMultiTenant, Boolean storeNulls, Long guidePostWidth, Boolean appendOnlySchema,\n ImmutableStorageScheme immutableStorageScheme, Boolean useStatsForParallelization, Long phoenixTTL)",
"constructor": false,
"full_signature": "private long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta,\n Boolean isTransactional, TransactionFactory.Provider transactionProvider,\n Long updateCacheFrequency, Boolean isImmutableRows, Boolean disableWAL,\n Boolean isMultiTenant, Boolean storeNulls, Long guidePostWidth, Boolean appendOnlySchema,\n ImmutableStorageScheme immutableStorageScheme, Boolean useStatsForParallelization, Long phoenixTTL)",
"identifier": "incrementTableSeqNum",
"modifiers": "private",
"parameters": "(PTable table, PTableType expectedType, int columnCountDelta,\n Boolean isTransactional, TransactionFactory.Provider transactionProvider,\n Long updateCacheFrequency, Boolean isImmutableRows, Boolean disableWAL,\n Boolean isMultiTenant, Boolean storeNulls, Long guidePostWidth, Boolean appendOnlySchema,\n ImmutableStorageScheme immutableStorageScheme, Boolean useStatsForParallelization, Long phoenixTTL)",
"return": "long",
"signature": "long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta,\n Boolean isTransactional, TransactionFactory.Provider transactionProvider,\n Long updateCacheFrequency, Boolean isImmutableRows, Boolean disableWAL,\n Boolean isMultiTenant, Boolean storeNulls, Long guidePostWidth, Boolean appendOnlySchema,\n ImmutableStorageScheme immutableStorageScheme, Boolean useStatsForParallelization, Long phoenixTTL)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.mutateBooleanProperty(String tenantId, String schemaName, String tableName,\n String propertyName, boolean propertyValue)",
"constructor": false,
"full_signature": "private void mutateBooleanProperty(String tenantId, String schemaName, String tableName,\n String propertyName, boolean propertyValue)",
"identifier": "mutateBooleanProperty",
"modifiers": "private",
"parameters": "(String tenantId, String schemaName, String tableName,\n String propertyName, boolean propertyValue)",
"return": "void",
"signature": "void mutateBooleanProperty(String tenantId, String schemaName, String tableName,\n String propertyName, boolean propertyValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.mutateLongProperty(String tenantId, String schemaName, String tableName,\n String propertyName, Long propertyValue)",
"constructor": false,
"full_signature": "private void mutateLongProperty(String tenantId, String schemaName, String tableName,\n String propertyName, Long propertyValue)",
"identifier": "mutateLongProperty",
"modifiers": "private",
"parameters": "(String tenantId, String schemaName, String tableName,\n String propertyName, Long propertyValue)",
"return": "void",
"signature": "void mutateLongProperty(String tenantId, String schemaName, String tableName,\n String propertyName, Long propertyValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.mutateByteProperty(String tenantId, String schemaName, String tableName,\n String propertyName, Byte propertyValue)",
"constructor": false,
"full_signature": "private void mutateByteProperty(String tenantId, String schemaName, String tableName,\n String propertyName, Byte propertyValue)",
"identifier": "mutateByteProperty",
"modifiers": "private",
"parameters": "(String tenantId, String schemaName, String tableName,\n String propertyName, Byte propertyValue)",
"return": "void",
"signature": "void mutateByteProperty(String tenantId, String schemaName, String tableName,\n String propertyName, Byte propertyValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.mutateStringProperty(String tenantId, String schemaName, String tableName,\n String propertyName, String propertyValue)",
"constructor": false,
"full_signature": "private void mutateStringProperty(String tenantId, String schemaName, String tableName,\n String propertyName, String propertyValue)",
"identifier": "mutateStringProperty",
"modifiers": "private",
"parameters": "(String tenantId, String schemaName, String tableName,\n String propertyName, String propertyValue)",
"return": "void",
"signature": "void mutateStringProperty(String tenantId, String schemaName, String tableName,\n String propertyName, String propertyValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.addColumn(AddColumnStatement statement)",
"constructor": false,
"full_signature": "public MutationState addColumn(AddColumnStatement statement)",
"identifier": "addColumn",
"modifiers": "public",
"parameters": "(AddColumnStatement statement)",
"return": "MutationState",
"signature": "MutationState addColumn(AddColumnStatement statement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.addColumn(PTable table, List<ColumnDef> origColumnDefs,\n ListMultimap<String, Pair<String, Object>> stmtProperties, boolean ifNotExists,\n boolean removeTableProps, NamedTableNode namedTableNode, PTableType tableType, boolean cascade, List<NamedNode> indexes)",
"constructor": false,
"full_signature": "public MutationState addColumn(PTable table, List<ColumnDef> origColumnDefs,\n ListMultimap<String, Pair<String, Object>> stmtProperties, boolean ifNotExists,\n boolean removeTableProps, NamedTableNode namedTableNode, PTableType tableType, boolean cascade, List<NamedNode> indexes)",
"identifier": "addColumn",
"modifiers": "public",
"parameters": "(PTable table, List<ColumnDef> origColumnDefs,\n ListMultimap<String, Pair<String, Object>> stmtProperties, boolean ifNotExists,\n boolean removeTableProps, NamedTableNode namedTableNode, PTableType tableType, boolean cascade, List<NamedNode> indexes)",
"return": "MutationState",
"signature": "MutationState addColumn(PTable table, List<ColumnDef> origColumnDefs,\n ListMultimap<String, Pair<String, Object>> stmtProperties, boolean ifNotExists,\n boolean removeTableProps, NamedTableNode namedTableNode, PTableType tableType, boolean cascade, List<NamedNode> indexes)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getIndexesPTableForCascade(List<NamedNode> indexes, PTable table)",
"constructor": false,
"full_signature": "private List<PTable> getIndexesPTableForCascade(List<NamedNode> indexes, PTable table)",
"identifier": "getIndexesPTableForCascade",
"modifiers": "private",
"parameters": "(List<NamedNode> indexes, PTable table)",
"return": "List<PTable>",
"signature": "List<PTable> getIndexesPTableForCascade(List<NamedNode> indexes, PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getPTablePColumnHashMapForCascade(List<PTable> indexesPTable,\n boolean willBeImmutableRows, ColumnDef colDef, String familyName, Map<PTable, Integer> indexToColumnSizeMap)",
"constructor": false,
"full_signature": "private HashMap<PTable, PColumn> getPTablePColumnHashMapForCascade(List<PTable> indexesPTable,\n boolean willBeImmutableRows, ColumnDef colDef, String familyName, Map<PTable, Integer> indexToColumnSizeMap)",
"identifier": "getPTablePColumnHashMapForCascade",
"modifiers": "private",
"parameters": "(List<PTable> indexesPTable,\n boolean willBeImmutableRows, ColumnDef colDef, String familyName, Map<PTable, Integer> indexToColumnSizeMap)",
"return": "HashMap<PTable, PColumn>",
"signature": "HashMap<PTable, PColumn> getPTablePColumnHashMapForCascade(List<PTable> indexesPTable,\n boolean willBeImmutableRows, ColumnDef colDef, String familyName, Map<PTable, Integer> indexToColumnSizeMap)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.deleteMutexCells(String physicalSchemaName, String physicalTableName, Set<String> acquiredColumnMutexSet)",
"constructor": false,
"full_signature": "private void deleteMutexCells(String physicalSchemaName, String physicalTableName, Set<String> acquiredColumnMutexSet)",
"identifier": "deleteMutexCells",
"modifiers": "private",
"parameters": "(String physicalSchemaName, String physicalTableName, Set<String> acquiredColumnMutexSet)",
"return": "void",
"signature": "void deleteMutexCells(String physicalSchemaName, String physicalTableName, Set<String> acquiredColumnMutexSet)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.dropColumnMutations(PTable table, List<PColumn> columnsToDrop)",
"constructor": false,
"full_signature": "private String dropColumnMutations(PTable table, List<PColumn> columnsToDrop)",
"identifier": "dropColumnMutations",
"modifiers": "private",
"parameters": "(PTable table, List<PColumn> columnsToDrop)",
"return": "String",
"signature": "String dropColumnMutations(PTable table, List<PColumn> columnsToDrop)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getNewEmptyColumnFamilyOrNull(PTable table, PColumn columnToDrop)",
"constructor": false,
"full_signature": "private static byte[] getNewEmptyColumnFamilyOrNull(PTable table, PColumn columnToDrop)",
"identifier": "getNewEmptyColumnFamilyOrNull",
"modifiers": "private static",
"parameters": "(PTable table, PColumn columnToDrop)",
"return": "byte[]",
"signature": "byte[] getNewEmptyColumnFamilyOrNull(PTable table, PColumn columnToDrop)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getParentTable(PTable table)",
"constructor": false,
"full_signature": "private PTable getParentTable(PTable table)",
"identifier": "getParentTable",
"modifiers": "private",
"parameters": "(PTable table)",
"return": "PTable",
"signature": "PTable getParentTable(PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.dropColumn(DropColumnStatement statement)",
"constructor": false,
"full_signature": "public MutationState dropColumn(DropColumnStatement statement)",
"identifier": "dropColumn",
"modifiers": "public",
"parameters": "(DropColumnStatement statement)",
"return": "MutationState",
"signature": "MutationState dropColumn(DropColumnStatement statement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.alterIndex(AlterIndexStatement statement)",
"constructor": false,
"full_signature": "public MutationState alterIndex(AlterIndexStatement statement)",
"identifier": "alterIndex",
"modifiers": "public",
"parameters": "(AlterIndexStatement statement)",
"return": "MutationState",
"signature": "MutationState alterIndex(AlterIndexStatement statement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.addTableToCache(MetaDataMutationResult result)",
"constructor": false,
"full_signature": "private PTable addTableToCache(MetaDataMutationResult result)",
"identifier": "addTableToCache",
"modifiers": "private",
"parameters": "(MetaDataMutationResult result)",
"return": "PTable",
"signature": "PTable addTableToCache(MetaDataMutationResult result)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.addTableToCache(MetaDataMutationResult result, long timestamp)",
"constructor": false,
"full_signature": "private PTable addTableToCache(MetaDataMutationResult result, long timestamp)",
"identifier": "addTableToCache",
"modifiers": "private",
"parameters": "(MetaDataMutationResult result, long timestamp)",
"return": "PTable",
"signature": "PTable addTableToCache(MetaDataMutationResult result, long timestamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.addFunctionToCache(MetaDataMutationResult result)",
"constructor": false,
"full_signature": "private List<PFunction> addFunctionToCache(MetaDataMutationResult result)",
"identifier": "addFunctionToCache",
"modifiers": "private",
"parameters": "(MetaDataMutationResult result)",
"return": "List<PFunction>",
"signature": "List<PFunction> addFunctionToCache(MetaDataMutationResult result)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.addSchemaToCache(MetaDataMutationResult result)",
"constructor": false,
"full_signature": "private void addSchemaToCache(MetaDataMutationResult result)",
"identifier": "addSchemaToCache",
"modifiers": "private",
"parameters": "(MetaDataMutationResult result)",
"return": "void",
"signature": "void addSchemaToCache(MetaDataMutationResult result)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.throwIfLastPKOfParentIsVariableLength(PTable parent, String viewSchemaName, String viewName, ColumnDef col)",
"constructor": false,
"full_signature": "private void throwIfLastPKOfParentIsVariableLength(PTable parent, String viewSchemaName, String viewName, ColumnDef col)",
"identifier": "throwIfLastPKOfParentIsVariableLength",
"modifiers": "private",
"parameters": "(PTable parent, String viewSchemaName, String viewName, ColumnDef col)",
"return": "void",
"signature": "void throwIfLastPKOfParentIsVariableLength(PTable parent, String viewSchemaName, String viewName, ColumnDef col)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.isLastPKVariableLength(PTable table)",
"constructor": false,
"full_signature": "private boolean isLastPKVariableLength(PTable table)",
"identifier": "isLastPKVariableLength",
"modifiers": "private",
"parameters": "(PTable table)",
"return": "boolean",
"signature": "boolean isLastPKVariableLength(PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.getParentOfView(PTable view)",
"constructor": false,
"full_signature": "private PTable getParentOfView(PTable view)",
"identifier": "getParentOfView",
"modifiers": "private",
"parameters": "(PTable view)",
"return": "PTable",
"signature": "PTable getParentOfView(PTable view)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.createSchema(CreateSchemaStatement create)",
"constructor": false,
"full_signature": "public MutationState createSchema(CreateSchemaStatement create)",
"identifier": "createSchema",
"modifiers": "public",
"parameters": "(CreateSchemaStatement create)",
"return": "MutationState",
"signature": "MutationState createSchema(CreateSchemaStatement create)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.validateSchema(String schemaName)",
"constructor": false,
"full_signature": "private void validateSchema(String schemaName)",
"identifier": "validateSchema",
"modifiers": "private",
"parameters": "(String schemaName)",
"return": "void",
"signature": "void validateSchema(String schemaName)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.dropSchema(DropSchemaStatement executableDropSchemaStatement)",
"constructor": false,
"full_signature": "public MutationState dropSchema(DropSchemaStatement executableDropSchemaStatement)",
"identifier": "dropSchema",
"modifiers": "public",
"parameters": "(DropSchemaStatement executableDropSchemaStatement)",
"return": "MutationState",
"signature": "MutationState dropSchema(DropSchemaStatement executableDropSchemaStatement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.useSchema(UseSchemaStatement useSchemaStatement)",
"constructor": false,
"full_signature": "public MutationState useSchema(UseSchemaStatement useSchemaStatement)",
"identifier": "useSchema",
"modifiers": "public",
"parameters": "(UseSchemaStatement useSchemaStatement)",
"return": "MutationState",
"signature": "MutationState useSchema(UseSchemaStatement useSchemaStatement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.loadStmtProperties(ListMultimap<String, Pair<String, Object>> stmtProperties, Map<String, List<Pair<String, Object>>> properties, PTable table, boolean removeTableProps)",
"constructor": false,
"full_signature": "private MetaProperties loadStmtProperties(ListMultimap<String, Pair<String, Object>> stmtProperties, Map<String, List<Pair<String, Object>>> properties, PTable table, boolean removeTableProps)",
"identifier": "loadStmtProperties",
"modifiers": "private",
"parameters": "(ListMultimap<String, Pair<String, Object>> stmtProperties, Map<String, List<Pair<String, Object>>> properties, PTable table, boolean removeTableProps)",
"return": "MetaProperties",
"signature": "MetaProperties loadStmtProperties(ListMultimap<String, Pair<String, Object>> stmtProperties, Map<String, List<Pair<String, Object>>> properties, PTable table, boolean removeTableProps)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.evaluateStmtProperties(MetaProperties metaProperties, MetaPropertiesEvaluated metaPropertiesEvaluated, PTable table, String schemaName, String tableName)",
"constructor": false,
"full_signature": "private boolean evaluateStmtProperties(MetaProperties metaProperties, MetaPropertiesEvaluated metaPropertiesEvaluated, PTable table, String schemaName, String tableName)",
"identifier": "evaluateStmtProperties",
"modifiers": "private",
"parameters": "(MetaProperties metaProperties, MetaPropertiesEvaluated metaPropertiesEvaluated, PTable table, String schemaName, String tableName)",
"return": "boolean",
"signature": "boolean evaluateStmtProperties(MetaProperties metaProperties, MetaPropertiesEvaluated metaPropertiesEvaluated, PTable table, String schemaName, String tableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.changePermissions(ChangePermsStatement changePermsStatement)",
"constructor": false,
"full_signature": "public MutationState changePermissions(ChangePermsStatement changePermsStatement)",
"identifier": "changePermissions",
"modifiers": "public",
"parameters": "(ChangePermsStatement changePermsStatement)",
"return": "MutationState",
"signature": "MutationState changePermissions(ChangePermsStatement changePermsStatement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.changePermsOnSchema(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement)",
"constructor": false,
"full_signature": "private void changePermsOnSchema(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement)",
"identifier": "changePermsOnSchema",
"modifiers": "private",
"parameters": "(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement)",
"return": "void",
"signature": "void changePermsOnSchema(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.changePermsOnTables(ClusterConnection clusterConnection, Admin admin, ChangePermsStatement changePermsStatement, PTable inputTable)",
"constructor": false,
"full_signature": "private void changePermsOnTables(ClusterConnection clusterConnection, Admin admin, ChangePermsStatement changePermsStatement, PTable inputTable)",
"identifier": "changePermsOnTables",
"modifiers": "private",
"parameters": "(ClusterConnection clusterConnection, Admin admin, ChangePermsStatement changePermsStatement, PTable inputTable)",
"return": "void",
"signature": "void changePermsOnTables(ClusterConnection clusterConnection, Admin admin, ChangePermsStatement changePermsStatement, PTable inputTable)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.changePermsOnTable(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement, org.apache.hadoop.hbase.TableName tableName)",
"constructor": false,
"full_signature": "private void changePermsOnTable(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement, org.apache.hadoop.hbase.TableName tableName)",
"identifier": "changePermsOnTable",
"modifiers": "private",
"parameters": "(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement, org.apache.hadoop.hbase.TableName tableName)",
"return": "void",
"signature": "void changePermsOnTable(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement, org.apache.hadoop.hbase.TableName tableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataClient.changePermsOnUser(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement)",
"constructor": false,
"full_signature": "private void changePermsOnUser(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement)",
"identifier": "changePermsOnUser",
"modifiers": "private",
"parameters": "(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement)",
"return": "void",
"signature": "void changePermsOnUser(ClusterConnection clusterConnection, ChangePermsStatement changePermsStatement)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting\n public boolean handleCreateTableMutationCode(MetaDataMutationResult result, MutationCode code,\n CreateTableStatement statement, String schemaName, String tableName,\n PTable parent) throws SQLException {\n switch(code) {\n case TABLE_ALREADY_EXISTS:\n if(result.getTable() != null) {\n addTableToCache(result);\n }\n if(!statement.ifNotExists()) {\n throw new TableAlreadyExistsException(schemaName, tableName, result.getTable());\n }\n return true;\n case NEWER_TABLE_FOUND:\n // Add table to ConnectionQueryServices so it's cached, but don't add\n // it to this connection as we can't see it.\n if (!statement.ifNotExists()) {\n throw new NewerTableAlreadyExistsException(schemaName, tableName,\n result.getTable());\n }\n return false;\n case UNALLOWED_TABLE_MUTATION:\n throwsSQLExceptionUtil(\"CANNOT_MUTATE_TABLE\",schemaName,tableName);\n case CONCURRENT_TABLE_MUTATION:\n addTableToCache(result);\n throw new ConcurrentTableMutationException(schemaName, tableName);\n case AUTO_PARTITION_SEQUENCE_NOT_FOUND:\n throw new SQLExceptionInfo.Builder(SQLExceptionCode.AUTO_PARTITION_SEQUENCE_UNDEFINED)\n .setSchemaName(schemaName).setTableName(tableName).build().buildException();\n case CANNOT_COERCE_AUTO_PARTITION_ID:\n case UNABLE_TO_CREATE_CHILD_LINK:\n case PARENT_TABLE_NOT_FOUND:\n case TABLE_NOT_IN_REGION:\n throwsSQLExceptionUtil(String.valueOf(code), schemaName, tableName);\n case TOO_MANY_INDEXES:\n case UNABLE_TO_UPDATE_PARENT_TABLE:\n throwsSQLExceptionUtil(String.valueOf(code), SchemaUtil.getSchemaNameFromFullName(\n parent.getPhysicalName().getString()),SchemaUtil.getTableNameFromFullName(\n parent.getPhysicalName().getString()));\n default:\n // Cannot use SQLExecptionInfo here since not all mutation codes have their\n // corresponding codes in the enum SQLExceptionCode\n throw new SQLExceptionInfo.Builder(SQLExceptionCode.UNEXPECTED_MUTATION_CODE)\n .setSchemaName(schemaName).setTableName(tableName).setMessage(\"mutation code: \"\n + code).build().buildException();\n }\n }",
"class_method_signature": "MetaDataClient.handleCreateTableMutationCode(MetaDataMutationResult result, MutationCode code,\n CreateTableStatement statement, String schemaName, String tableName,\n PTable parent)",
"constructor": false,
"full_signature": "@VisibleForTesting public boolean handleCreateTableMutationCode(MetaDataMutationResult result, MutationCode code,\n CreateTableStatement statement, String schemaName, String tableName,\n PTable parent)",
"identifier": "handleCreateTableMutationCode",
"invocations": [
"getTable",
"addTableToCache",
"ifNotExists",
"getTable",
"ifNotExists",
"getTable",
"throwsSQLExceptionUtil",
"addTableToCache",
"buildException",
"build",
"setTableName",
"setSchemaName",
"throwsSQLExceptionUtil",
"valueOf",
"throwsSQLExceptionUtil",
"valueOf",
"getSchemaNameFromFullName",
"getString",
"getPhysicalName",
"getTableNameFromFullName",
"getString",
"getPhysicalName",
"buildException",
"build",
"setMessage",
"setTableName",
"setSchemaName"
],
"modifiers": "@VisibleForTesting public",
"parameters": "(MetaDataMutationResult result, MutationCode code,\n CreateTableStatement statement, String schemaName, String tableName,\n PTable parent)",
"return": "boolean",
"signature": "boolean handleCreateTableMutationCode(MetaDataMutationResult result, MutationCode code,\n CreateTableStatement statement, String schemaName, String tableName,\n PTable parent)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_92 | {
"fields": [
{
"declarator": "ROW = Bytes.toBytes(\"row\")",
"modifier": "private static final",
"original_string": "private static final byte[] ROW = Bytes.toBytes(\"row\");",
"type": "byte[]",
"var_name": "ROW"
},
{
"declarator": "QUALIFIER = Bytes.toBytes(\"qual\")",
"modifier": "private static final",
"original_string": "private static final byte[] QUALIFIER = Bytes.toBytes(\"qual\");",
"type": "byte[]",
"var_name": "QUALIFIER"
},
{
"declarator": "ORIGINAL_VALUE = Bytes.toBytes(\"generic-value\")",
"modifier": "private static final",
"original_string": "private static final byte[] ORIGINAL_VALUE = Bytes.toBytes(\"generic-value\");",
"type": "byte[]",
"var_name": "ORIGINAL_VALUE"
},
{
"declarator": "DUMMY_TAGS = Bytes.toBytes(\"tags\")",
"modifier": "private static final",
"original_string": "private static final byte[] DUMMY_TAGS = Bytes.toBytes(\"tags\");",
"type": "byte[]",
"var_name": "DUMMY_TAGS"
},
{
"declarator": "mockBuilder = Mockito.mock(ExtendedCellBuilder.class)",
"modifier": "private final",
"original_string": "private final ExtendedCellBuilder mockBuilder = Mockito.mock(ExtendedCellBuilder.class);",
"type": "ExtendedCellBuilder",
"var_name": "mockBuilder"
},
{
"declarator": "mockCellWithTags = Mockito.mock(ExtendedCell.class)",
"modifier": "private final",
"original_string": "private final ExtendedCell mockCellWithTags = Mockito.mock(ExtendedCell.class);",
"type": "ExtendedCell",
"var_name": "mockCellWithTags"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/MetaDataUtilTest.java",
"identifier": "MetaDataUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTaggingAPutDueToDifferentCellValue() throws Exception {\n Put put = generateOriginalPut();\n\n // valueArray is set to a value different than the one in the cell, so we tag the cell\n MetaDataUtil.conditionallyAddTagsToPutCells(put, TABLE_FAMILY_BYTES, QUALIFIER,\n mockBuilder, EMPTY_BYTE_ARRAY, DUMMY_TAGS);\n verify(mockBuilder, times(1)).setTags(Mockito.any(byte[].class));\n Cell newCell = put.getFamilyCellMap().get(TABLE_FAMILY_BYTES).get(0);\n assertEquals(mockCellWithTags, newCell);\n }",
"class_method_signature": "MetaDataUtilTest.testTaggingAPutDueToDifferentCellValue()",
"constructor": false,
"full_signature": "@Test public void testTaggingAPutDueToDifferentCellValue()",
"identifier": "testTaggingAPutDueToDifferentCellValue",
"invocations": [
"generateOriginalPut",
"conditionallyAddTagsToPutCells",
"setTags",
"verify",
"times",
"any",
"get",
"get",
"getFamilyCellMap",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testTaggingAPutDueToDifferentCellValue()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MetaDataUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataUtil.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "VIEW_INDEX_TABLE_PREFIX = \"_IDX_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_TABLE_PREFIX = \"_IDX_\";",
"type": "String",
"var_name": "VIEW_INDEX_TABLE_PREFIX"
},
{
"declarator": "LOCAL_INDEX_TABLE_PREFIX = \"_LOCAL_IDX_\"",
"modifier": "public static final",
"original_string": "public static final String LOCAL_INDEX_TABLE_PREFIX = \"_LOCAL_IDX_\";",
"type": "String",
"var_name": "LOCAL_INDEX_TABLE_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_PREFIX = \"_SEQ_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_SEQUENCE_PREFIX = \"_SEQ_\";",
"type": "String",
"var_name": "VIEW_INDEX_SEQUENCE_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_NAME_PREFIX = \"_ID_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_SEQUENCE_NAME_PREFIX = \"_ID_\";",
"type": "String",
"var_name": "VIEW_INDEX_SEQUENCE_NAME_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_PREFIX_BYTES = Bytes.toBytes(VIEW_INDEX_SEQUENCE_PREFIX)",
"modifier": "public static final",
"original_string": "public static final byte[] VIEW_INDEX_SEQUENCE_PREFIX_BYTES = Bytes.toBytes(VIEW_INDEX_SEQUENCE_PREFIX);",
"type": "byte[]",
"var_name": "VIEW_INDEX_SEQUENCE_PREFIX_BYTES"
},
{
"declarator": "VIEW_INDEX_ID_COLUMN_NAME = \"_INDEX_ID\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_ID_COLUMN_NAME = \"_INDEX_ID\";",
"type": "String",
"var_name": "VIEW_INDEX_ID_COLUMN_NAME"
},
{
"declarator": "PARENT_TABLE_KEY = \"PARENT_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String PARENT_TABLE_KEY = \"PARENT_TABLE\";",
"type": "String",
"var_name": "PARENT_TABLE_KEY"
},
{
"declarator": "IS_VIEW_INDEX_TABLE_PROP_NAME = \"IS_VIEW_INDEX_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String IS_VIEW_INDEX_TABLE_PROP_NAME = \"IS_VIEW_INDEX_TABLE\";",
"type": "String",
"var_name": "IS_VIEW_INDEX_TABLE_PROP_NAME"
},
{
"declarator": "IS_VIEW_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_VIEW_INDEX_TABLE_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] IS_VIEW_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_VIEW_INDEX_TABLE_PROP_NAME);",
"type": "byte[]",
"var_name": "IS_VIEW_INDEX_TABLE_PROP_BYTES"
},
{
"declarator": "IS_LOCAL_INDEX_TABLE_PROP_NAME = \"IS_LOCAL_INDEX_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String IS_LOCAL_INDEX_TABLE_PROP_NAME = \"IS_LOCAL_INDEX_TABLE\";",
"type": "String",
"var_name": "IS_LOCAL_INDEX_TABLE_PROP_NAME"
},
{
"declarator": "IS_LOCAL_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_LOCAL_INDEX_TABLE_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] IS_LOCAL_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_LOCAL_INDEX_TABLE_PROP_NAME);",
"type": "byte[]",
"var_name": "IS_LOCAL_INDEX_TABLE_PROP_BYTES"
},
{
"declarator": "DATA_TABLE_NAME_PROP_NAME = \"DATA_TABLE_NAME\"",
"modifier": "public static final",
"original_string": "public static final String DATA_TABLE_NAME_PROP_NAME = \"DATA_TABLE_NAME\";",
"type": "String",
"var_name": "DATA_TABLE_NAME_PROP_NAME"
},
{
"declarator": "DATA_TABLE_NAME_PROP_BYTES = Bytes.toBytes(DATA_TABLE_NAME_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] DATA_TABLE_NAME_PROP_BYTES = Bytes.toBytes(DATA_TABLE_NAME_PROP_NAME);",
"type": "byte[]",
"var_name": "DATA_TABLE_NAME_PROP_BYTES"
},
{
"declarator": "SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES = ImmutableList.of(\n ColumnFamilyDescriptorBuilder.TTL,\n ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS,\n ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE)",
"modifier": "public static final",
"original_string": "public static final List<String> SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES = ImmutableList.of(\n ColumnFamilyDescriptorBuilder.TTL,\n ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS,\n ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE);",
"type": "List<String>",
"var_name": "SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/MetaDataUtil.java",
"identifier": "MetaDataUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "MetaDataUtil.areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"constructor": false,
"full_signature": "public static ClientServerCompatibility areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"identifier": "areClientAndServerCompatible",
"modifiers": "public static",
"parameters": "(long serverHBaseAndPhoenixVersion)",
"return": "ClientServerCompatibility",
"signature": "ClientServerCompatibility areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"constructor": false,
"full_signature": "@VisibleForTesting static ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"identifier": "areClientAndServerCompatible",
"modifiers": "@VisibleForTesting static",
"parameters": "(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"return": "ClientServerCompatibility",
"signature": "ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodePhoenixVersion(long version)",
"constructor": false,
"full_signature": "public static int decodePhoenixVersion(long version)",
"identifier": "decodePhoenixVersion",
"modifiers": "public static",
"parameters": "(long version)",
"return": "int",
"signature": "int decodePhoenixVersion(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.encodeHasIndexWALCodec(long version, boolean isValid)",
"constructor": false,
"full_signature": "public static long encodeHasIndexWALCodec(long version, boolean isValid)",
"identifier": "encodeHasIndexWALCodec",
"modifiers": "public static",
"parameters": "(long version, boolean isValid)",
"return": "long",
"signature": "long encodeHasIndexWALCodec(long version, boolean isValid)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHasIndexWALCodec(long version)",
"constructor": false,
"full_signature": "public static boolean decodeHasIndexWALCodec(long version)",
"identifier": "decodeHasIndexWALCodec",
"modifiers": "public static",
"parameters": "(long version)",
"return": "boolean",
"signature": "boolean decodeHasIndexWALCodec(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHBaseVersion(long version)",
"constructor": false,
"full_signature": "public static int decodeHBaseVersion(long version)",
"identifier": "decodeHBaseVersion",
"modifiers": "public static",
"parameters": "(long version)",
"return": "int",
"signature": "int decodeHBaseVersion(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHBaseVersionAsString(int version)",
"constructor": false,
"full_signature": "public static String decodeHBaseVersionAsString(int version)",
"identifier": "decodeHBaseVersionAsString",
"modifiers": "public static",
"parameters": "(int version)",
"return": "String",
"signature": "String decodeHBaseVersionAsString(int version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeTableNamespaceMappingEnabled(long version)",
"constructor": false,
"full_signature": "public static boolean decodeTableNamespaceMappingEnabled(long version)",
"identifier": "decodeTableNamespaceMappingEnabled",
"modifiers": "public static",
"parameters": "(long version)",
"return": "boolean",
"signature": "boolean decodeTableNamespaceMappingEnabled(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.encodeVersion(String hbaseVersionStr, Configuration config)",
"constructor": false,
"full_signature": "public static long encodeVersion(String hbaseVersionStr, Configuration config)",
"identifier": "encodeVersion",
"modifiers": "public static",
"parameters": "(String hbaseVersionStr, Configuration config)",
"return": "long",
"signature": "long encodeVersion(String hbaseVersionStr, Configuration config)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(Mutation someRow)",
"constructor": false,
"full_signature": "public static byte[] getTenantIdAndSchemaAndTableName(Mutation someRow)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(Mutation someRow)",
"return": "byte[]",
"signature": "byte[] getTenantIdAndSchemaAndTableName(Mutation someRow)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(Result result)",
"constructor": false,
"full_signature": "public static byte[] getTenantIdAndSchemaAndTableName(Result result)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(Result result)",
"return": "byte[]",
"signature": "byte[] getTenantIdAndSchemaAndTableName(Result result)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"constructor": false,
"full_signature": "public static void getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"return": "void",
"signature": "void getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getBaseColumnCount(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static int getBaseColumnCount(List<Mutation> tableMetadata)",
"identifier": "getBaseColumnCount",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "int",
"signature": "int getBaseColumnCount(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"constructor": false,
"full_signature": "public static void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"identifier": "mutatePutValue",
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"return": "void",
"signature": "void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"constructor": false,
"full_signature": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"identifier": "conditionallyAddTagsToPutCells",
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"return": "void",
"signature": "void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"constructor": false,
"full_signature": "public static Put cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"identifier": "cloneDeleteToPutAndAddColumn",
"modifiers": "public static",
"parameters": "(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"return": "Put",
"signature": "Put cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"constructor": false,
"full_signature": "public static void getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"identifier": "getTenantIdAndFunctionName",
"modifiers": "public static",
"parameters": "(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"return": "void",
"signature": "void getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentTableName(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static byte[] getParentTableName(List<Mutation> tableMetadata)",
"identifier": "getParentTableName",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "byte[]",
"signature": "byte[] getParentTableName(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSequenceNumber(Mutation tableMutation)",
"constructor": false,
"full_signature": "public static long getSequenceNumber(Mutation tableMutation)",
"identifier": "getSequenceNumber",
"modifiers": "public static",
"parameters": "(Mutation tableMutation)",
"return": "long",
"signature": "long getSequenceNumber(Mutation tableMutation)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSequenceNumber(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static long getSequenceNumber(List<Mutation> tableMetaData)",
"identifier": "getSequenceNumber",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "long",
"signature": "long getSequenceNumber(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static PTableType getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getTableType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "PTableType",
"signature": "PTableType getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static boolean isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "isNameSpaceMapped",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "boolean",
"signature": "boolean isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static int getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getSaltBuckets",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "int",
"signature": "int getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentSequenceNumber(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static long getParentSequenceNumber(List<Mutation> tableMetaData)",
"identifier": "getParentSequenceNumber",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "long",
"signature": "long getParentSequenceNumber(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Mutation getTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Mutation",
"signature": "Mutation getTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "getMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"constructor": false,
"full_signature": "public static KeyValue getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"identifier": "getMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"return": "KeyValue",
"signature": "KeyValue getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"constructor": false,
"full_signature": "public static boolean setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"identifier": "setMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"return": "boolean",
"signature": "boolean setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Put getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getPutOnlyTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Put",
"signature": "Put getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Put getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"identifier": "getPutOnlyAutoPartitionColumn",
"modifiers": "public static",
"parameters": "(PTable parentTable, List<Mutation> tableMetaData)",
"return": "Put",
"signature": "Put getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Mutation getParentTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getParentTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Mutation",
"signature": "Mutation getParentTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getClientTimeStamp(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static long getClientTimeStamp(List<Mutation> tableMetadata)",
"identifier": "getClientTimeStamp",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "long",
"signature": "long getClientTimeStamp(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getClientTimeStamp(Mutation m)",
"constructor": false,
"full_signature": "public static long getClientTimeStamp(Mutation m)",
"identifier": "getClientTimeStamp",
"modifiers": "public static",
"parameters": "(Mutation m)",
"return": "long",
"signature": "long getClientTimeStamp(Mutation m)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"constructor": false,
"full_signature": "public static byte[] getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"identifier": "getParentLinkKey",
"modifiers": "public static",
"parameters": "(String tenantId, String schemaName, String tableName, String indexName)",
"return": "byte[]",
"signature": "byte[] getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"constructor": false,
"full_signature": "public static byte[] getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"identifier": "getParentLinkKey",
"modifiers": "public static",
"parameters": "(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"return": "byte[]",
"signature": "byte[] getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"constructor": false,
"full_signature": "public static byte[] getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"identifier": "getChildLinkKey",
"modifiers": "public static",
"parameters": "(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"return": "byte[]",
"signature": "byte[] getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getCell(List<Cell> cells, byte[] cq)",
"constructor": false,
"full_signature": "public static Cell getCell(List<Cell> cells, byte[] cq)",
"identifier": "getCell",
"modifiers": "public static",
"parameters": "(List<Cell> cells, byte[] cq)",
"return": "Cell",
"signature": "Cell getCell(List<Cell> cells, byte[] cq)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isMultiTenant",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isTransactional",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isSalted",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexPhysicalName(byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static byte[] getViewIndexPhysicalName(byte[] physicalTableName)",
"identifier": "getViewIndexPhysicalName",
"modifiers": "public static",
"parameters": "(byte[] physicalTableName)",
"return": "byte[]",
"signature": "byte[] getViewIndexPhysicalName(byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexPhysicalName(String physicalTableName)",
"constructor": false,
"full_signature": "public static String getViewIndexPhysicalName(String physicalTableName)",
"identifier": "getViewIndexPhysicalName",
"modifiers": "public static",
"parameters": "(String physicalTableName)",
"return": "String",
"signature": "String getViewIndexPhysicalName(String physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"constructor": false,
"full_signature": "private static byte[] getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"identifier": "getIndexPhysicalName",
"modifiers": "private static",
"parameters": "(byte[] physicalTableName, String indexPrefix)",
"return": "byte[]",
"signature": "byte[] getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"constructor": false,
"full_signature": "private static String getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"identifier": "getIndexPhysicalName",
"modifiers": "private static",
"parameters": "(String physicalTableName, String indexPrefix)",
"return": "String",
"signature": "String getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexPhysicalName(byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static byte[] getLocalIndexPhysicalName(byte[] physicalTableName)",
"identifier": "getLocalIndexPhysicalName",
"modifiers": "public static",
"parameters": "(byte[] physicalTableName)",
"return": "byte[]",
"signature": "byte[] getLocalIndexPhysicalName(byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexTableName(String tableName)",
"constructor": false,
"full_signature": "public static String getLocalIndexTableName(String tableName)",
"identifier": "getLocalIndexTableName",
"modifiers": "public static",
"parameters": "(String tableName)",
"return": "String",
"signature": "String getLocalIndexTableName(String tableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexSchemaName(String schemaName)",
"constructor": false,
"full_signature": "public static String getLocalIndexSchemaName(String schemaName)",
"identifier": "getLocalIndexSchemaName",
"modifiers": "public static",
"parameters": "(String schemaName)",
"return": "String",
"signature": "String getLocalIndexSchemaName(String schemaName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexUserTableName(String localIndexTableName)",
"constructor": false,
"full_signature": "public static String getLocalIndexUserTableName(String localIndexTableName)",
"identifier": "getLocalIndexUserTableName",
"modifiers": "public static",
"parameters": "(String localIndexTableName)",
"return": "String",
"signature": "String getLocalIndexUserTableName(String localIndexTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexUserTableName(String viewIndexTableName)",
"constructor": false,
"full_signature": "public static String getViewIndexUserTableName(String viewIndexTableName)",
"identifier": "getViewIndexUserTableName",
"modifiers": "public static",
"parameters": "(String viewIndexTableName)",
"return": "String",
"signature": "String getViewIndexUserTableName(String viewIndexTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceSchemaName",
"modifiers": "public static",
"parameters": "(PName physicalName, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceName",
"modifiers": "public static",
"parameters": "(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static SequenceKey getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceKey",
"modifiers": "public static",
"parameters": "(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"return": "SequenceKey",
"signature": "SequenceKey getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceSchemaName",
"modifiers": "public static",
"parameters": "(PName physicalName, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceName",
"modifiers": "public static",
"parameters": "(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static SequenceKey getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceKey",
"modifiers": "public static",
"parameters": "(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"return": "SequenceKey",
"signature": "SequenceKey getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexIdDataType()",
"constructor": false,
"full_signature": "public static PDataType getViewIndexIdDataType()",
"identifier": "getViewIndexIdDataType",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getViewIndexIdDataType()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLegacyViewIndexIdDataType()",
"constructor": false,
"full_signature": "public static PDataType getLegacyViewIndexIdDataType()",
"identifier": "getLegacyViewIndexIdDataType",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getLegacyViewIndexIdDataType()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexIdColumnName()",
"constructor": false,
"full_signature": "public static String getViewIndexIdColumnName()",
"identifier": "getViewIndexIdColumnName",
"modifiers": "public static",
"parameters": "()",
"return": "String",
"signature": "String getViewIndexIdColumnName()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"constructor": false,
"full_signature": "public static boolean hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"identifier": "hasViewIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName physicalName)",
"return": "boolean",
"signature": "boolean hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static boolean hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"identifier": "hasViewIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, byte[] physicalTableName)",
"return": "boolean",
"signature": "boolean hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"identifier": "hasLocalIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName physicalName)",
"return": "boolean",
"signature": "boolean hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"identifier": "hasLocalIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, byte[] physicalTableName)",
"return": "boolean",
"signature": "boolean hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexColumnFamily(TableDescriptor desc)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexColumnFamily(TableDescriptor desc)",
"identifier": "hasLocalIndexColumnFamily",
"modifiers": "public static",
"parameters": "(TableDescriptor desc)",
"return": "boolean",
"signature": "boolean hasLocalIndexColumnFamily(TableDescriptor desc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"constructor": false,
"full_signature": "public static List<byte[]> getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"identifier": "getNonLocalIndexColumnFamilies",
"modifiers": "public static",
"parameters": "(TableDescriptor desc)",
"return": "List<byte[]>",
"signature": "List<byte[]> getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static List<byte[]> getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"identifier": "getLocalIndexColumnFamilies",
"modifiers": "public static",
"parameters": "(PhoenixConnection conn, byte[] physicalTableName)",
"return": "List<byte[]>",
"signature": "List<byte[]> getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static void deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"identifier": "deleteViewIndexSequences",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"return": "void",
"signature": "void deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.tableRegionsOnline(Configuration conf, PTable table)",
"constructor": false,
"full_signature": "public static boolean tableRegionsOnline(Configuration conf, PTable table)",
"identifier": "tableRegionsOnline",
"modifiers": "public static",
"parameters": "(Configuration conf, PTable table)",
"return": "boolean",
"signature": "boolean tableRegionsOnline(Configuration conf, PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.propertyNotAllowedToBeOutOfSync(String colFamProp)",
"constructor": false,
"full_signature": "public static boolean propertyNotAllowedToBeOutOfSync(String colFamProp)",
"identifier": "propertyNotAllowedToBeOutOfSync",
"modifiers": "public static",
"parameters": "(String colFamProp)",
"return": "boolean",
"signature": "boolean propertyNotAllowedToBeOutOfSync(String colFamProp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"constructor": false,
"full_signature": "public static Map<String, Object> getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"identifier": "getSyncedProps",
"modifiers": "public static",
"parameters": "(ColumnFamilyDescriptor defaultCFDesc)",
"return": "Map<String, Object>",
"signature": "Map<String, Object> getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"constructor": false,
"full_signature": "public static Scan newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"identifier": "newTableRowsScan",
"modifiers": "public static",
"parameters": "(byte[] key, long startTimeStamp, long stopTimeStamp)",
"return": "Scan",
"signature": "Scan newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"constructor": false,
"full_signature": "public static Scan newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"identifier": "newTableRowsScan",
"modifiers": "public static",
"parameters": "(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"return": "Scan",
"signature": "Scan newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLinkType(Mutation tableMutation)",
"constructor": false,
"full_signature": "public static LinkType getLinkType(Mutation tableMutation)",
"identifier": "getLinkType",
"modifiers": "public static",
"parameters": "(Mutation tableMutation)",
"return": "LinkType",
"signature": "LinkType getLinkType(Mutation tableMutation)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLinkType(Collection<Cell> kvs)",
"constructor": false,
"full_signature": "public static LinkType getLinkType(Collection<Cell> kvs)",
"identifier": "getLinkType",
"modifiers": "public static",
"parameters": "(Collection<Cell> kvs)",
"return": "LinkType",
"signature": "LinkType getLinkType(Collection<Cell> kvs)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndex(String physicalName)",
"constructor": false,
"full_signature": "public static boolean isLocalIndex(String physicalName)",
"identifier": "isLocalIndex",
"modifiers": "public static",
"parameters": "(String physicalName)",
"return": "boolean",
"signature": "boolean isLocalIndex(String physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isViewIndex(String physicalName)",
"constructor": false,
"full_signature": "public static boolean isViewIndex(String physicalName)",
"identifier": "isViewIndex",
"modifiers": "public static",
"parameters": "(String physicalName)",
"return": "boolean",
"signature": "boolean isViewIndex(String physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getAutoPartitionColumnName(PTable parentTable)",
"constructor": false,
"full_signature": "public static String getAutoPartitionColumnName(PTable parentTable)",
"identifier": "getAutoPartitionColumnName",
"modifiers": "public static",
"parameters": "(PTable parentTable)",
"return": "String",
"signature": "String getAutoPartitionColumnName(PTable parentTable)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getAutoPartitionColIndex(PTable parentTable)",
"constructor": false,
"full_signature": "public static int getAutoPartitionColIndex(PTable parentTable)",
"identifier": "getAutoPartitionColIndex",
"modifiers": "public static",
"parameters": "(PTable parentTable)",
"return": "int",
"signature": "int getAutoPartitionColIndex(PTable parentTable)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getJdbcUrl(RegionCoprocessorEnvironment env)",
"constructor": false,
"full_signature": "public static String getJdbcUrl(RegionCoprocessorEnvironment env)",
"identifier": "getJdbcUrl",
"modifiers": "public static",
"parameters": "(RegionCoprocessorEnvironment env)",
"return": "String",
"signature": "String getJdbcUrl(RegionCoprocessorEnvironment env)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isHColumnProperty(String propName)",
"constructor": false,
"full_signature": "public static boolean isHColumnProperty(String propName)",
"identifier": "isHColumnProperty",
"modifiers": "public static",
"parameters": "(String propName)",
"return": "boolean",
"signature": "boolean isHColumnProperty(String propName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isHTableProperty(String propName)",
"constructor": false,
"full_signature": "public static boolean isHTableProperty(String propName)",
"identifier": "isHTableProperty",
"modifiers": "public static",
"parameters": "(String propName)",
"return": "boolean",
"signature": "boolean isHTableProperty(String propName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"constructor": false,
"full_signature": "public static boolean isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"identifier": "isLocalIndexFamily",
"modifiers": "public static",
"parameters": "(ImmutableBytesPtr cfPtr)",
"return": "boolean",
"signature": "boolean isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndexFamily(byte[] cf)",
"constructor": false,
"full_signature": "public static boolean isLocalIndexFamily(byte[] cf)",
"identifier": "isLocalIndexFamily",
"modifiers": "public static",
"parameters": "(byte[] cf)",
"return": "boolean",
"signature": "boolean isLocalIndexFamily(byte[] cf)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPhysicalTableRowForView(PTable view)",
"constructor": false,
"full_signature": "public static final byte[] getPhysicalTableRowForView(PTable view)",
"identifier": "getPhysicalTableRowForView",
"modifiers": "public static final",
"parameters": "(PTable view)",
"return": "byte[]",
"signature": "byte[] getPhysicalTableRowForView(PTable view)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.removeChildLinkMutations(List<Mutation> metadataMutations)",
"constructor": false,
"full_signature": "public static List<Mutation> removeChildLinkMutations(List<Mutation> metadataMutations)",
"identifier": "removeChildLinkMutations",
"modifiers": "public static",
"parameters": "(List<Mutation> metadataMutations)",
"return": "List<Mutation>",
"signature": "List<Mutation> removeChildLinkMutations(List<Mutation> metadataMutations)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static IndexType getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getIndexType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "IndexType",
"signature": "IndexType getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static PDataType<?> getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"identifier": "getIndexDataType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"return": "PDataType<?>",
"signature": "PDataType<?> getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"constructor": false,
"full_signature": "public static PColumn getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"identifier": "getColumn",
"modifiers": "public static",
"parameters": "(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"return": "PColumn",
"signature": "PColumn getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"constructor": false,
"full_signature": "public static void deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"identifier": "deleteFromStatsTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"return": "void",
"signature": "void deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray) {\n NavigableMap<byte[], List<Cell>> familyCellMap = somePut.getFamilyCellMap();\n List<Cell> cells = familyCellMap.get(family);\n List<Cell> newCells = Lists.newArrayList();\n if (cells != null) {\n for (Cell cell : cells) {\n if (Bytes.compareTo(cell.getQualifierArray(), cell.getQualifierOffset(),\n cell.getQualifierLength(), qualifier, 0, qualifier.length) == 0 &&\n (valueArray == null || !CellUtil.matchingValue(cell, valueArray))) {\n ExtendedCell extendedCell = cellBuilder\n .setRow(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength())\n .setFamily(cell.getFamilyArray(), cell.getFamilyOffset(),\n cell.getFamilyLength())\n .setQualifier(cell.getQualifierArray(), cell.getQualifierOffset(),\n cell.getQualifierLength())\n .setValue(cell.getValueArray(), cell.getValueOffset(),\n cell.getValueLength())\n .setTimestamp(cell.getTimestamp())\n .setType(cell.getType())\n .setTags(TagUtil.concatTags(tagArray, cell))\n .build();\n // Replace existing cell with a cell that has the custom tags list\n newCells.add(extendedCell);\n } else {\n // Add cell as is\n newCells.add(cell);\n }\n }\n familyCellMap.put(family, newCells);\n }\n }",
"class_method_signature": "MetaDataUtil.conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"constructor": false,
"full_signature": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"identifier": "conditionallyAddTagsToPutCells",
"invocations": [
"getFamilyCellMap",
"get",
"newArrayList",
"compareTo",
"getQualifierArray",
"getQualifierOffset",
"getQualifierLength",
"matchingValue",
"build",
"setTags",
"setType",
"setTimestamp",
"setValue",
"setQualifier",
"setFamily",
"setRow",
"getRowArray",
"getRowOffset",
"getRowLength",
"getFamilyArray",
"getFamilyOffset",
"getFamilyLength",
"getQualifierArray",
"getQualifierOffset",
"getQualifierLength",
"getValueArray",
"getValueOffset",
"getValueLength",
"getTimestamp",
"getType",
"concatTags",
"add",
"add",
"put"
],
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"return": "void",
"signature": "void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_200 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/parse/CastParseNodeTest.java",
"identifier": "CastParseNodeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToSQL_ArrayType() {\n ColumnParseNode columnParseNode = new ColumnParseNode(TableName.create(\"SCHEMA1\", \"TABLE1\"), \"V\");\n CastParseNode castParseNode = new CastParseNode(columnParseNode, PLong.INSTANCE, null, null, true);\n StringBuilder stringBuilder = new StringBuilder();\n castParseNode.toSQL(null, stringBuilder);\n assertEquals(\" CAST(TABLE1.V AS BIGINT ARRAY)\", stringBuilder.toString());\n }",
"class_method_signature": "CastParseNodeTest.testToSQL_ArrayType()",
"constructor": false,
"full_signature": "@Test public void testToSQL_ArrayType()",
"identifier": "testToSQL_ArrayType",
"invocations": [
"create",
"toSQL",
"assertEquals",
"toString"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testToSQL_ArrayType()",
"testcase": true
} | {
"fields": [
{
"declarator": "dt",
"modifier": "private final",
"original_string": "private final PDataType dt;",
"type": "PDataType",
"var_name": "dt"
},
{
"declarator": "maxLength",
"modifier": "private final",
"original_string": "private final Integer maxLength;",
"type": "Integer",
"var_name": "maxLength"
},
{
"declarator": "scale",
"modifier": "private final",
"original_string": "private final Integer scale;",
"type": "Integer",
"var_name": "scale"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/parse/CastParseNode.java",
"identifier": "CastParseNode",
"interfaces": "",
"methods": [
{
"class_method_signature": "CastParseNode.CastParseNode(ParseNode expr, String dataType, Integer maxLength, Integer scale, boolean arr)",
"constructor": true,
"full_signature": " CastParseNode(ParseNode expr, String dataType, Integer maxLength, Integer scale, boolean arr)",
"identifier": "CastParseNode",
"modifiers": "",
"parameters": "(ParseNode expr, String dataType, Integer maxLength, Integer scale, boolean arr)",
"return": "",
"signature": " CastParseNode(ParseNode expr, String dataType, Integer maxLength, Integer scale, boolean arr)",
"testcase": false
},
{
"class_method_signature": "CastParseNode.CastParseNode(ParseNode expr, PDataType dataType, Integer maxLength, Integer scale, boolean arr)",
"constructor": true,
"full_signature": " CastParseNode(ParseNode expr, PDataType dataType, Integer maxLength, Integer scale, boolean arr)",
"identifier": "CastParseNode",
"modifiers": "",
"parameters": "(ParseNode expr, PDataType dataType, Integer maxLength, Integer scale, boolean arr)",
"return": "",
"signature": " CastParseNode(ParseNode expr, PDataType dataType, Integer maxLength, Integer scale, boolean arr)",
"testcase": false
},
{
"class_method_signature": "CastParseNode.accept(ParseNodeVisitor<T> visitor)",
"constructor": false,
"full_signature": "@Override public T accept(ParseNodeVisitor<T> visitor)",
"identifier": "accept",
"modifiers": "@Override public",
"parameters": "(ParseNodeVisitor<T> visitor)",
"return": "T",
"signature": "T accept(ParseNodeVisitor<T> visitor)",
"testcase": false
},
{
"class_method_signature": "CastParseNode.getDataType()",
"constructor": false,
"full_signature": "public PDataType getDataType()",
"identifier": "getDataType",
"modifiers": "public",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getDataType()",
"testcase": false
},
{
"class_method_signature": "CastParseNode.getMaxLength()",
"constructor": false,
"full_signature": "public Integer getMaxLength()",
"identifier": "getMaxLength",
"modifiers": "public",
"parameters": "()",
"return": "Integer",
"signature": "Integer getMaxLength()",
"testcase": false
},
{
"class_method_signature": "CastParseNode.getScale()",
"constructor": false,
"full_signature": "public Integer getScale()",
"identifier": "getScale",
"modifiers": "public",
"parameters": "()",
"return": "Integer",
"signature": "Integer getScale()",
"testcase": false
},
{
"class_method_signature": "CastParseNode.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "hashCode",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int hashCode()",
"testcase": false
},
{
"class_method_signature": "CastParseNode.equals(Object obj)",
"constructor": false,
"full_signature": "@Override public boolean equals(Object obj)",
"identifier": "equals",
"modifiers": "@Override public",
"parameters": "(Object obj)",
"return": "boolean",
"signature": "boolean equals(Object obj)",
"testcase": false
},
{
"class_method_signature": "CastParseNode.toSQL(ColumnResolver resolver, StringBuilder buf)",
"constructor": false,
"full_signature": "@Override public void toSQL(ColumnResolver resolver, StringBuilder buf)",
"identifier": "toSQL",
"modifiers": "@Override public",
"parameters": "(ColumnResolver resolver, StringBuilder buf)",
"return": "void",
"signature": "void toSQL(ColumnResolver resolver, StringBuilder buf)",
"testcase": false
}
],
"superclass": "extends UnaryParseNode"
} | {
"body": "@Override\n public void toSQL(ColumnResolver resolver, StringBuilder buf) {\n List<ParseNode> children = getChildren();\n buf.append(\" CAST(\");\n children.get(0).toSQL(resolver, buf);\n buf.append(\" AS \");\n boolean isArray = dt.isArrayType();\n PDataType type = isArray ? PDataType.arrayBaseType(dt) : dt;\n buf.append(type.getSqlTypeName());\n if (maxLength != null) {\n buf.append('(');\n buf.append(maxLength);\n if (scale != null) {\n buf.append(',');\n buf.append(scale); // has both max length and scale. For ex- decimal(10,2)\n } \n buf.append(')');\n }\n if (isArray) {\n buf.append(' ');\n buf.append(PDataType.ARRAY_TYPE_SUFFIX);\n }\n buf.append(\")\");\n }",
"class_method_signature": "CastParseNode.toSQL(ColumnResolver resolver, StringBuilder buf)",
"constructor": false,
"full_signature": "@Override public void toSQL(ColumnResolver resolver, StringBuilder buf)",
"identifier": "toSQL",
"invocations": [
"getChildren",
"append",
"toSQL",
"get",
"append",
"isArrayType",
"arrayBaseType",
"append",
"getSqlTypeName",
"append",
"append",
"append",
"append",
"append",
"append",
"append",
"append"
],
"modifiers": "@Override public",
"parameters": "(ColumnResolver resolver, StringBuilder buf)",
"return": "void",
"signature": "void toSQL(ColumnResolver resolver, StringBuilder buf)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_84 | {
"fields": [
{
"declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L",
"modifier": "private static final",
"original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;",
"type": "long",
"var_name": "ONE_HOUR_IN_MILLIS"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/DateUtilTest.java",
"identifier": "DateUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected=IllegalDataException.class)\n public void testParseTimestamp_negativeNanos() {\n DateUtil.parseTimestamp(\"1970-01-01 00:00:10.-1\");\n }",
"class_method_signature": "DateUtilTest.testParseTimestamp_negativeNanos()",
"constructor": false,
"full_signature": "@Test(expected=IllegalDataException.class) public void testParseTimestamp_negativeNanos()",
"identifier": "testParseTimestamp_negativeNanos",
"invocations": [
"parseTimestamp"
],
"modifiers": "@Test(expected=IllegalDataException.class) public",
"parameters": "()",
"return": "void",
"signature": "void testParseTimestamp_negativeNanos()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";",
"type": "String",
"var_name": "DEFAULT_TIME_ZONE_ID"
},
{
"declarator": "LOCAL_TIME_ZONE_ID = \"LOCAL\"",
"modifier": "public static final",
"original_string": "public static final String LOCAL_TIME_ZONE_ID = \"LOCAL\";",
"type": "String",
"var_name": "LOCAL_TIME_ZONE_ID"
},
{
"declarator": "DEFAULT_TIME_ZONE = TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID)",
"modifier": "private static final",
"original_string": "private static final TimeZone DEFAULT_TIME_ZONE = TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID);",
"type": "TimeZone",
"var_name": "DEFAULT_TIME_ZONE"
},
{
"declarator": "DEFAULT_MS_DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss.SSS\"",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_MS_DATE_FORMAT = \"yyyy-MM-dd HH:mm:ss.SSS\";",
"type": "String",
"var_name": "DEFAULT_MS_DATE_FORMAT"
},
{
"declarator": "DEFAULT_MS_DATE_FORMATTER = FastDateFormat.getInstance(\n DEFAULT_MS_DATE_FORMAT, TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID))",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_MS_DATE_FORMATTER = FastDateFormat.getInstance(\n DEFAULT_MS_DATE_FORMAT, TimeZone.getTimeZone(DEFAULT_TIME_ZONE_ID));",
"type": "Format",
"var_name": "DEFAULT_MS_DATE_FORMATTER"
},
{
"declarator": "DEFAULT_DATE_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_DATE_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_DATE_FORMAT"
},
{
"declarator": "DEFAULT_DATE_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_DATE_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_DATE_FORMATTER"
},
{
"declarator": "DEFAULT_TIME_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIME_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_TIME_FORMAT"
},
{
"declarator": "DEFAULT_TIME_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_TIME_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_TIME_FORMATTER"
},
{
"declarator": "DEFAULT_TIMESTAMP_FORMAT = DEFAULT_MS_DATE_FORMAT",
"modifier": "public static final",
"original_string": "public static final String DEFAULT_TIMESTAMP_FORMAT = DEFAULT_MS_DATE_FORMAT;",
"type": "String",
"var_name": "DEFAULT_TIMESTAMP_FORMAT"
},
{
"declarator": "DEFAULT_TIMESTAMP_FORMATTER = DEFAULT_MS_DATE_FORMATTER",
"modifier": "public static final",
"original_string": "public static final Format DEFAULT_TIMESTAMP_FORMATTER = DEFAULT_MS_DATE_FORMATTER;",
"type": "Format",
"var_name": "DEFAULT_TIMESTAMP_FORMATTER"
},
{
"declarator": "ISO_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.dateParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .appendLiteral(' ').toParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.timeParser()).toParser())\n .toFormatter().withChronology(ISOChronology.getInstanceUTC())",
"modifier": "private static final",
"original_string": "private static final DateTimeFormatter ISO_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.dateParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .appendLiteral(' ').toParser())\n .appendOptional(new DateTimeFormatterBuilder()\n .append(ISODateTimeFormat.timeParser()).toParser())\n .toFormatter().withChronology(ISOChronology.getInstanceUTC());",
"type": "DateTimeFormatter",
"var_name": "ISO_DATE_TIME_FORMATTER"
},
{
"declarator": "defaultPattern",
"modifier": "private static",
"original_string": "private static String[] defaultPattern;",
"type": "String[]",
"var_name": "defaultPattern"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/DateUtil.java",
"identifier": "DateUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "DateUtil.DateUtil()",
"constructor": true,
"full_signature": "private DateUtil()",
"identifier": "DateUtil",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " DateUtil()",
"testcase": false
},
{
"class_method_signature": "DateUtil.getCodecFor(PDataType type)",
"constructor": false,
"full_signature": "@NonNull public static PDataCodec getCodecFor(PDataType type)",
"identifier": "getCodecFor",
"modifiers": "@NonNull public static",
"parameters": "(PDataType type)",
"return": "PDataCodec",
"signature": "PDataCodec getCodecFor(PDataType type)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimeZone(String timeZoneId)",
"constructor": false,
"full_signature": "public static TimeZone getTimeZone(String timeZoneId)",
"identifier": "getTimeZone",
"modifiers": "public static",
"parameters": "(String timeZoneId)",
"return": "TimeZone",
"signature": "TimeZone getTimeZone(String timeZoneId)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDefaultFormat(PDataType type)",
"constructor": false,
"full_signature": "private static String getDefaultFormat(PDataType type)",
"identifier": "getDefaultFormat",
"modifiers": "private static",
"parameters": "(PDataType type)",
"return": "String",
"signature": "String getDefaultFormat(PDataType type)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"constructor": false,
"full_signature": "public static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"identifier": "getDateTimeParser",
"modifiers": "public static",
"parameters": "(String pattern, PDataType pDataType, String timeZoneId)",
"return": "DateTimeParser",
"signature": "DateTimeParser getDateTimeParser(String pattern, PDataType pDataType, String timeZoneId)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateTimeParser(String pattern, PDataType pDataType)",
"constructor": false,
"full_signature": "public static DateTimeParser getDateTimeParser(String pattern, PDataType pDataType)",
"identifier": "getDateTimeParser",
"modifiers": "public static",
"parameters": "(String pattern, PDataType pDataType)",
"return": "DateTimeParser",
"signature": "DateTimeParser getDateTimeParser(String pattern, PDataType pDataType)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateFormatter(String pattern)",
"constructor": false,
"full_signature": "public static Format getDateFormatter(String pattern)",
"identifier": "getDateFormatter",
"modifiers": "public static",
"parameters": "(String pattern)",
"return": "Format",
"signature": "Format getDateFormatter(String pattern)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getDateFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getDateFormatter(String pattern, String timeZoneID)",
"identifier": "getDateFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getDateFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimeFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getTimeFormatter(String pattern, String timeZoneID)",
"identifier": "getTimeFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getTimeFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestampFormatter(String pattern, String timeZoneID)",
"constructor": false,
"full_signature": "public static Format getTimestampFormatter(String pattern, String timeZoneID)",
"identifier": "getTimestampFormatter",
"modifiers": "public static",
"parameters": "(String pattern, String timeZoneID)",
"return": "Format",
"signature": "Format getTimestampFormatter(String pattern, String timeZoneID)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseDateTime(String dateTimeValue)",
"constructor": false,
"full_signature": "private static long parseDateTime(String dateTimeValue)",
"identifier": "parseDateTime",
"modifiers": "private static",
"parameters": "(String dateTimeValue)",
"return": "long",
"signature": "long parseDateTime(String dateTimeValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseDate(String dateValue)",
"constructor": false,
"full_signature": "public static Date parseDate(String dateValue)",
"identifier": "parseDate",
"modifiers": "public static",
"parameters": "(String dateValue)",
"return": "Date",
"signature": "Date parseDate(String dateValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseTime(String timeValue)",
"constructor": false,
"full_signature": "public static Time parseTime(String timeValue)",
"identifier": "parseTime",
"modifiers": "public static",
"parameters": "(String timeValue)",
"return": "Time",
"signature": "Time parseTime(String timeValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.parseTimestamp(String timestampValue)",
"constructor": false,
"full_signature": "public static Timestamp parseTimestamp(String timestampValue)",
"identifier": "parseTimestamp",
"modifiers": "public static",
"parameters": "(String timestampValue)",
"return": "Timestamp",
"signature": "Timestamp parseTimestamp(String timestampValue)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestamp(long millis, int nanos)",
"constructor": false,
"full_signature": "public static Timestamp getTimestamp(long millis, int nanos)",
"identifier": "getTimestamp",
"modifiers": "public static",
"parameters": "(long millis, int nanos)",
"return": "Timestamp",
"signature": "Timestamp getTimestamp(long millis, int nanos)",
"testcase": false
},
{
"class_method_signature": "DateUtil.getTimestamp(BigDecimal bd)",
"constructor": false,
"full_signature": "public static Timestamp getTimestamp(BigDecimal bd)",
"identifier": "getTimestamp",
"modifiers": "public static",
"parameters": "(BigDecimal bd)",
"return": "Timestamp",
"signature": "Timestamp getTimestamp(BigDecimal bd)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static Timestamp parseTimestamp(String timestampValue) {\n Timestamp timestamp = new Timestamp(parseDateTime(timestampValue));\n int period = timestampValue.indexOf('.');\n if (period > 0) {\n String nanosStr = timestampValue.substring(period + 1);\n if (nanosStr.length() > 9)\n throw new IllegalDataException(\"nanos > 999999999 or < 0\");\n if(nanosStr.length() > 3 ) {\n int nanos = Integer.parseInt(nanosStr);\n for (int i = 0; i < 9 - nanosStr.length(); i++) {\n nanos *= 10;\n }\n timestamp.setNanos(nanos);\n }\n }\n return timestamp;\n }",
"class_method_signature": "DateUtil.parseTimestamp(String timestampValue)",
"constructor": false,
"full_signature": "public static Timestamp parseTimestamp(String timestampValue)",
"identifier": "parseTimestamp",
"invocations": [
"parseDateTime",
"indexOf",
"substring",
"length",
"length",
"parseInt",
"length",
"setNanos"
],
"modifiers": "public static",
"parameters": "(String timestampValue)",
"return": "Timestamp",
"signature": "Timestamp parseTimestamp(String timestampValue)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_191 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/schema/PMetaDataImplTest.java",
"identifier": "PMetaDataImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldAlwaysKeepOneEntryIfMaxSizeIsZero() throws Exception {\n TestTimeKeeper timeKeeper = new TestTimeKeeper();\n Map<String, String> props = Maps.newHashMapWithExpectedSize(2);\n props.put(QueryServices.MAX_CLIENT_METADATA_CACHE_SIZE_ATTRIB, \"0\");\n props.put(QueryServices.CLIENT_CACHE_ENCODING, \"object\");\n PMetaData metaData = new PMetaDataImpl(5, timeKeeper, new ReadOnlyProps(props));\n addToTable(metaData, \"a\", 1, timeKeeper);\n assertEquals(1, metaData.size());\n addToTable(metaData, \"b\", 1, timeKeeper);\n assertEquals(1, metaData.size());\n addToTable(metaData, \"c\", 5, timeKeeper);\n assertEquals(1, metaData.size());\n addToTable(metaData, \"d\", 20, timeKeeper);\n assertEquals(1, metaData.size());\n assertNames(metaData, \"d\");\n addToTable(metaData, \"e\", 1, timeKeeper);\n assertEquals(1, metaData.size());\n addToTable(metaData, \"f\", 2, timeKeeper);\n assertEquals(1, metaData.size());\n assertNames(metaData, \"f\");\n }",
"class_method_signature": "PMetaDataImplTest.shouldAlwaysKeepOneEntryIfMaxSizeIsZero()",
"constructor": false,
"full_signature": "@Test public void shouldAlwaysKeepOneEntryIfMaxSizeIsZero()",
"identifier": "shouldAlwaysKeepOneEntryIfMaxSizeIsZero",
"invocations": [
"newHashMapWithExpectedSize",
"put",
"put",
"addToTable",
"assertEquals",
"size",
"addToTable",
"assertEquals",
"size",
"addToTable",
"assertEquals",
"size",
"addToTable",
"assertEquals",
"size",
"assertNames",
"addToTable",
"assertEquals",
"size",
"addToTable",
"assertEquals",
"size",
"assertNames"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void shouldAlwaysKeepOneEntryIfMaxSizeIsZero()",
"testcase": true
} | {
"fields": [
{
"declarator": "metaData",
"modifier": "private",
"original_string": "private PMetaDataCache metaData;",
"type": "PMetaDataCache",
"var_name": "metaData"
},
{
"declarator": "timeKeeper",
"modifier": "private final",
"original_string": "private final TimeKeeper timeKeeper;",
"type": "TimeKeeper",
"var_name": "timeKeeper"
},
{
"declarator": "tableRefFactory",
"modifier": "private final",
"original_string": "private final PTableRefFactory tableRefFactory;",
"type": "PTableRefFactory",
"var_name": "tableRefFactory"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/schema/PMetaDataImpl.java",
"identifier": "PMetaDataImpl",
"interfaces": "implements PMetaData",
"methods": [
{
"class_method_signature": "PMetaDataImpl.PMetaDataImpl(int initialCapacity, ReadOnlyProps props)",
"constructor": true,
"full_signature": "public PMetaDataImpl(int initialCapacity, ReadOnlyProps props)",
"identifier": "PMetaDataImpl",
"modifiers": "public",
"parameters": "(int initialCapacity, ReadOnlyProps props)",
"return": "",
"signature": " PMetaDataImpl(int initialCapacity, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.PMetaDataImpl(int initialCapacity, TimeKeeper timeKeeper, ReadOnlyProps props)",
"constructor": true,
"full_signature": "public PMetaDataImpl(int initialCapacity, TimeKeeper timeKeeper, ReadOnlyProps props)",
"identifier": "PMetaDataImpl",
"modifiers": "public",
"parameters": "(int initialCapacity, TimeKeeper timeKeeper, ReadOnlyProps props)",
"return": "",
"signature": " PMetaDataImpl(int initialCapacity, TimeKeeper timeKeeper, ReadOnlyProps props)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.PMetaDataImpl(PMetaDataCache metaData, TimeKeeper timeKeeper, PTableRefFactory tableRefFactory)",
"constructor": true,
"full_signature": "private PMetaDataImpl(PMetaDataCache metaData, TimeKeeper timeKeeper, PTableRefFactory tableRefFactory)",
"identifier": "PMetaDataImpl",
"modifiers": "private",
"parameters": "(PMetaDataCache metaData, TimeKeeper timeKeeper, PTableRefFactory tableRefFactory)",
"return": "",
"signature": " PMetaDataImpl(PMetaDataCache metaData, TimeKeeper timeKeeper, PTableRefFactory tableRefFactory)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.clone()",
"constructor": false,
"full_signature": "@Override public PMetaDataImpl clone()",
"identifier": "clone",
"modifiers": "@Override public",
"parameters": "()",
"return": "PMetaDataImpl",
"signature": "PMetaDataImpl clone()",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.getTableRef(PTableKey key)",
"constructor": false,
"full_signature": "@Override public PTableRef getTableRef(PTableKey key)",
"identifier": "getTableRef",
"modifiers": "@Override public",
"parameters": "(PTableKey key)",
"return": "PTableRef",
"signature": "PTableRef getTableRef(PTableKey key)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.getFunction(PTableKey key)",
"constructor": false,
"full_signature": "@Override public PFunction getFunction(PTableKey key)",
"identifier": "getFunction",
"modifiers": "@Override public",
"parameters": "(PTableKey key)",
"return": "PFunction",
"signature": "PFunction getFunction(PTableKey key)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int size()",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.updateResolvedTimestamp(PTable table, long resolvedTimestamp)",
"constructor": false,
"full_signature": "@Override public void updateResolvedTimestamp(PTable table, long resolvedTimestamp)",
"identifier": "updateResolvedTimestamp",
"modifiers": "@Override public",
"parameters": "(PTable table, long resolvedTimestamp)",
"return": "void",
"signature": "void updateResolvedTimestamp(PTable table, long resolvedTimestamp)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.addTable(PTable table, long resolvedTime)",
"constructor": false,
"full_signature": "@Override public void addTable(PTable table, long resolvedTime)",
"identifier": "addTable",
"modifiers": "@Override public",
"parameters": "(PTable table, long resolvedTime)",
"return": "void",
"signature": "void addTable(PTable table, long resolvedTime)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.removeTable(PName tenantId, String tableName, String parentTableName, long tableTimeStamp)",
"constructor": false,
"full_signature": "@Override public void removeTable(PName tenantId, String tableName, String parentTableName, long tableTimeStamp)",
"identifier": "removeTable",
"modifiers": "@Override public",
"parameters": "(PName tenantId, String tableName, String parentTableName, long tableTimeStamp)",
"return": "void",
"signature": "void removeTable(PName tenantId, String tableName, String parentTableName, long tableTimeStamp)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.removeColumn(PName tenantId, String tableName, List<PColumn> columnsToRemove, long tableTimeStamp, long tableSeqNum, long resolvedTime)",
"constructor": false,
"full_signature": "@Override public void removeColumn(PName tenantId, String tableName, List<PColumn> columnsToRemove, long tableTimeStamp, long tableSeqNum, long resolvedTime)",
"identifier": "removeColumn",
"modifiers": "@Override public",
"parameters": "(PName tenantId, String tableName, List<PColumn> columnsToRemove, long tableTimeStamp, long tableSeqNum, long resolvedTime)",
"return": "void",
"signature": "void removeColumn(PName tenantId, String tableName, List<PColumn> columnsToRemove, long tableTimeStamp, long tableSeqNum, long resolvedTime)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.pruneTables(Pruner pruner)",
"constructor": false,
"full_signature": "@Override public void pruneTables(Pruner pruner)",
"identifier": "pruneTables",
"modifiers": "@Override public",
"parameters": "(Pruner pruner)",
"return": "void",
"signature": "void pruneTables(Pruner pruner)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.iterator()",
"constructor": false,
"full_signature": "@Override public Iterator<PTable> iterator()",
"identifier": "iterator",
"modifiers": "@Override public",
"parameters": "()",
"return": "Iterator<PTable>",
"signature": "Iterator<PTable> iterator()",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.addFunction(PFunction function)",
"constructor": false,
"full_signature": "@Override public void addFunction(PFunction function)",
"identifier": "addFunction",
"modifiers": "@Override public",
"parameters": "(PFunction function)",
"return": "void",
"signature": "void addFunction(PFunction function)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.removeFunction(PName tenantId, String function, long functionTimeStamp)",
"constructor": false,
"full_signature": "@Override public void removeFunction(PName tenantId, String function, long functionTimeStamp)",
"identifier": "removeFunction",
"modifiers": "@Override public",
"parameters": "(PName tenantId, String function, long functionTimeStamp)",
"return": "void",
"signature": "void removeFunction(PName tenantId, String function, long functionTimeStamp)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.pruneFunctions(Pruner pruner)",
"constructor": false,
"full_signature": "@Override public void pruneFunctions(Pruner pruner)",
"identifier": "pruneFunctions",
"modifiers": "@Override public",
"parameters": "(Pruner pruner)",
"return": "void",
"signature": "void pruneFunctions(Pruner pruner)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.getAge(PTableRef ref)",
"constructor": false,
"full_signature": "@Override public long getAge(PTableRef ref)",
"identifier": "getAge",
"modifiers": "@Override public",
"parameters": "(PTableRef ref)",
"return": "long",
"signature": "long getAge(PTableRef ref)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.addSchema(PSchema schema)",
"constructor": false,
"full_signature": "@Override public void addSchema(PSchema schema)",
"identifier": "addSchema",
"modifiers": "@Override public",
"parameters": "(PSchema schema)",
"return": "void",
"signature": "void addSchema(PSchema schema)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.getSchema(PTableKey key)",
"constructor": false,
"full_signature": "@Override public PSchema getSchema(PTableKey key)",
"identifier": "getSchema",
"modifiers": "@Override public",
"parameters": "(PTableKey key)",
"return": "PSchema",
"signature": "PSchema getSchema(PTableKey key)",
"testcase": false
},
{
"class_method_signature": "PMetaDataImpl.removeSchema(PSchema schema, long schemaTimeStamp)",
"constructor": false,
"full_signature": "@Override public void removeSchema(PSchema schema, long schemaTimeStamp)",
"identifier": "removeSchema",
"modifiers": "@Override public",
"parameters": "(PSchema schema, long schemaTimeStamp)",
"return": "void",
"signature": "void removeSchema(PSchema schema, long schemaTimeStamp)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n public int size() {\n return metaData.size();\n }",
"class_method_signature": "PMetaDataImpl.size()",
"constructor": false,
"full_signature": "@Override public int size()",
"identifier": "size",
"invocations": [
"size"
],
"modifiers": "@Override public",
"parameters": "()",
"return": "int",
"signature": "int size()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_109 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/query/PropertyPolicyProviderTest.java",
"identifier": "PropertyPolicyProviderTest",
"interfaces": "",
"superclass": "extends BaseConnectionlessQueryTest"
} | {
"body": "@Test\n public void testPropertyPolicyProvider() {\n PropertyPolicy provided = PropertyPolicyProvider.getPropertyPolicy();\n assertTrue(provided instanceof TestPropertyPolicy);\n }",
"class_method_signature": "PropertyPolicyProviderTest.testPropertyPolicyProvider()",
"constructor": false,
"full_signature": "@Test public void testPropertyPolicyProvider()",
"identifier": "testPropertyPolicyProvider",
"invocations": [
"getPropertyPolicy",
"assertTrue"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testPropertyPolicyProvider()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_PROPERTY_POLICY = new PropertyPolicy.PropertyPolicyImpl()",
"modifier": "private static final",
"original_string": "private static final PropertyPolicy DEFAULT_PROPERTY_POLICY = new PropertyPolicy.PropertyPolicyImpl();",
"type": "PropertyPolicy",
"var_name": "DEFAULT_PROPERTY_POLICY"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/query/PropertyPolicyProvider.java",
"identifier": "PropertyPolicyProvider",
"interfaces": "",
"methods": [
{
"class_method_signature": "PropertyPolicyProvider.getPropertyPolicy()",
"constructor": false,
"full_signature": "public static PropertyPolicy getPropertyPolicy()",
"identifier": "getPropertyPolicy",
"modifiers": "public static",
"parameters": "()",
"return": "PropertyPolicy",
"signature": "PropertyPolicy getPropertyPolicy()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static PropertyPolicy getPropertyPolicy(){\n return InstanceResolver.getSingleton(PropertyPolicy.class, DEFAULT_PROPERTY_POLICY);\n }",
"class_method_signature": "PropertyPolicyProvider.getPropertyPolicy()",
"constructor": false,
"full_signature": "public static PropertyPolicy getPropertyPolicy()",
"identifier": "getPropertyPolicy",
"invocations": [
"getSingleton"
],
"modifiers": "public static",
"parameters": "()",
"return": "PropertyPolicy",
"signature": "PropertyPolicy getPropertyPolicy()",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_148 | {
"fields": [
{
"declarator": "SCRUTINY_TIME_MILLIS = 1502908914193L",
"modifier": "private static final",
"original_string": "private static final long SCRUTINY_TIME_MILLIS = 1502908914193L;",
"type": "long",
"var_name": "SCRUTINY_TIME_MILLIS"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/mapreduce/index/IndexScrutinyTableOutputTest.java",
"identifier": "IndexScrutinyTableOutputTest",
"interfaces": "",
"superclass": "extends BaseIndexTest"
} | {
"body": "@Test\n public void testGetSqlQueryMissingTargetRows() throws SQLException {\n SourceTargetColumnNames columnNames =\n new SourceTargetColumnNames.DataSourceColNames(pDataTable, pIndexTable);\n String query =\n IndexScrutinyTableOutput.getSqlQueryMissingTargetRows(conn, columnNames,\n SCRUTINY_TIME_MILLIS);\n assertEquals(\"SELECT \\\"SOURCE_TABLE\\\" , \\\"TARGET_TABLE\\\" , \\\"SCRUTINY_EXECUTE_TIME\\\" , \\\"SOURCE_ROW_PK_HASH\\\" , \\\"SOURCE_TS\\\" , \\\"TARGET_TS\\\" , \\\"HAS_TARGET_ROW\\\" , \\\"BEYOND_MAX_LOOKBACK\\\" , \\\"ID\\\" , \\\"PK_PART2\\\" , \\\"NAME\\\" , \\\"ZIP\\\" , \\\":ID\\\" , \\\":PK_PART2\\\" , \\\"0:NAME\\\" , \\\"0:ZIP\\\" FROM PHOENIX_INDEX_SCRUTINY(\\\"ID\\\" INTEGER,\\\"PK_PART2\\\" TINYINT,\\\"NAME\\\" VARCHAR,\\\"ZIP\\\" BIGINT,\\\":ID\\\" INTEGER,\\\":PK_PART2\\\" TINYINT,\\\"0:NAME\\\" VARCHAR,\\\"0:ZIP\\\" BIGINT) WHERE (\\\"SOURCE_TABLE\\\",\\\"TARGET_TABLE\\\",\\\"SCRUTINY_EXECUTE_TIME\\\", \\\"HAS_TARGET_ROW\\\") IN (('TEST_SCHEMA.TEST_INDEX_COLUMN_NAMES_UTIL','TEST_SCHEMA.TEST_ICN_INDEX',1502908914193,false))\",\n query);\n }",
"class_method_signature": "IndexScrutinyTableOutputTest.testGetSqlQueryMissingTargetRows()",
"constructor": false,
"full_signature": "@Test public void testGetSqlQueryMissingTargetRows()",
"identifier": "testGetSqlQueryMissingTargetRows",
"invocations": [
"getSqlQueryMissingTargetRows",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetSqlQueryMissingTargetRows()",
"testcase": true
} | {
"fields": [
{
"declarator": "OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\"",
"modifier": "public static",
"original_string": "public static String OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\";",
"type": "String",
"var_name": "OUTPUT_TABLE_NAME"
},
{
"declarator": "SCRUTINY_EXECUTE_TIME_COL_NAME = \"SCRUTINY_EXECUTE_TIME\"",
"modifier": "public static final",
"original_string": "public static final String SCRUTINY_EXECUTE_TIME_COL_NAME = \"SCRUTINY_EXECUTE_TIME\";",
"type": "String",
"var_name": "SCRUTINY_EXECUTE_TIME_COL_NAME"
},
{
"declarator": "TARGET_TABLE_COL_NAME = \"TARGET_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String TARGET_TABLE_COL_NAME = \"TARGET_TABLE\";",
"type": "String",
"var_name": "TARGET_TABLE_COL_NAME"
},
{
"declarator": "SOURCE_TABLE_COL_NAME = \"SOURCE_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String SOURCE_TABLE_COL_NAME = \"SOURCE_TABLE\";",
"type": "String",
"var_name": "SOURCE_TABLE_COL_NAME"
},
{
"declarator": "OUTPUT_TABLE_DDL =\n \"CREATE TABLE IF NOT EXISTS \" + OUTPUT_TABLE_NAME + \"\\n\" +\n \"(\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \" BIGINT NOT NULL,\\n\" +\n \" SOURCE_ROW_PK_HASH VARCHAR NOT NULL,\\n\" +\n \" SOURCE_TS BIGINT,\\n\" +\n \" TARGET_TS BIGINT,\\n\" +\n \" HAS_TARGET_ROW BOOLEAN,\\n\" +\n \" BEYOND_MAX_LOOKBACK BOOLEAN,\\n\" +\n \" CONSTRAINT PK PRIMARY KEY\\n\" +\n \" (\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \",\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \",\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \",\\n\" + // time at which the scrutiny ran\n \" SOURCE_ROW_PK_HASH\\n\" + // this hash makes the PK unique\n \" )\\n\" + // dynamic columns consisting of the source and target columns will follow\n \") COLUMN_ENCODED_BYTES = 0 \"",
"modifier": "public static final",
"original_string": "public static final String OUTPUT_TABLE_DDL =\n \"CREATE TABLE IF NOT EXISTS \" + OUTPUT_TABLE_NAME + \"\\n\" +\n \"(\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \" BIGINT NOT NULL,\\n\" +\n \" SOURCE_ROW_PK_HASH VARCHAR NOT NULL,\\n\" +\n \" SOURCE_TS BIGINT,\\n\" +\n \" TARGET_TS BIGINT,\\n\" +\n \" HAS_TARGET_ROW BOOLEAN,\\n\" +\n \" BEYOND_MAX_LOOKBACK BOOLEAN,\\n\" +\n \" CONSTRAINT PK PRIMARY KEY\\n\" +\n \" (\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \",\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \",\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \",\\n\" + // time at which the scrutiny ran\n \" SOURCE_ROW_PK_HASH\\n\" + // this hash makes the PK unique\n \" )\\n\" + // dynamic columns consisting of the source and target columns will follow\n \") COLUMN_ENCODED_BYTES = 0 \";",
"type": "String",
"var_name": "OUTPUT_TABLE_DDL"
},
{
"declarator": "OUTPUT_TABLE_BEYOND_LOOKBACK_DDL = \"\" +\n \"ALTER TABLE \" + OUTPUT_TABLE_NAME + \"\\n\" +\n \" ADD IF NOT EXISTS BEYOND_MAX_LOOKBACK BOOLEAN\"",
"modifier": "public static final",
"original_string": "public static final String OUTPUT_TABLE_BEYOND_LOOKBACK_DDL = \"\" +\n \"ALTER TABLE \" + OUTPUT_TABLE_NAME + \"\\n\" +\n \" ADD IF NOT EXISTS BEYOND_MAX_LOOKBACK BOOLEAN\";",
"type": "String",
"var_name": "OUTPUT_TABLE_BEYOND_LOOKBACK_DDL"
},
{
"declarator": "OUTPUT_METADATA_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY_METADATA\"",
"modifier": "public static final",
"original_string": "public static final String OUTPUT_METADATA_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY_METADATA\";",
"type": "String",
"var_name": "OUTPUT_METADATA_TABLE_NAME"
},
{
"declarator": "OUTPUT_METADATA_DDL =\n \"CREATE TABLE IF NOT EXISTS \" + OUTPUT_METADATA_TABLE_NAME + \"\\n\" +\n \"(\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \" BIGINT NOT NULL,\\n\" +\n \" SOURCE_TYPE VARCHAR,\\n\" + // source is either data or index table\n \" CMD_LINE_ARGS VARCHAR,\\n\" + // arguments the tool was run with\n \" INPUT_RECORDS BIGINT,\\n\" +\n \" FAILED_RECORDS BIGINT,\\n\" +\n \" VALID_ROW_COUNT BIGINT,\\n\" +\n \" INVALID_ROW_COUNT BIGINT,\\n\" +\n \" INCORRECT_COVERED_COL_VAL_COUNT BIGINT,\\n\" +\n \" BATCHES_PROCESSED_COUNT BIGINT,\\n\" +\n \" SOURCE_DYNAMIC_COLS VARCHAR,\\n\" +\n \" TARGET_DYNAMIC_COLS VARCHAR,\\n\" +\n \" INVALID_ROWS_QUERY_ALL VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows from the output table\n \" INVALID_ROWS_QUERY_MISSING_TARGET VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows which are missing a target row\n \" INVALID_ROWS_QUERY_BAD_COVERED_COL_VAL VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows which have bad covered column values\n \" INVALID_ROWS_QUERY_BEYOND_MAX_LOOKBACK VARCHAR,\\n\" + // stored sql query to fetch all the potentially invalid rows which are before max lookback age\n \" BEYOND_MAX_LOOKBACK_COUNT BIGINT,\\n\" +\n \" CONSTRAINT PK PRIMARY KEY\\n\" +\n \" (\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \",\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \",\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \"\\n\" +\n \" )\\n\" +\n \")\\n\"",
"modifier": "public static final",
"original_string": "public static final String OUTPUT_METADATA_DDL =\n \"CREATE TABLE IF NOT EXISTS \" + OUTPUT_METADATA_TABLE_NAME + \"\\n\" +\n \"(\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \" VARCHAR NOT NULL,\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \" BIGINT NOT NULL,\\n\" +\n \" SOURCE_TYPE VARCHAR,\\n\" + // source is either data or index table\n \" CMD_LINE_ARGS VARCHAR,\\n\" + // arguments the tool was run with\n \" INPUT_RECORDS BIGINT,\\n\" +\n \" FAILED_RECORDS BIGINT,\\n\" +\n \" VALID_ROW_COUNT BIGINT,\\n\" +\n \" INVALID_ROW_COUNT BIGINT,\\n\" +\n \" INCORRECT_COVERED_COL_VAL_COUNT BIGINT,\\n\" +\n \" BATCHES_PROCESSED_COUNT BIGINT,\\n\" +\n \" SOURCE_DYNAMIC_COLS VARCHAR,\\n\" +\n \" TARGET_DYNAMIC_COLS VARCHAR,\\n\" +\n \" INVALID_ROWS_QUERY_ALL VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows from the output table\n \" INVALID_ROWS_QUERY_MISSING_TARGET VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows which are missing a target row\n \" INVALID_ROWS_QUERY_BAD_COVERED_COL_VAL VARCHAR,\\n\" + // stored sql query to fetch all the invalid rows which have bad covered column values\n \" INVALID_ROWS_QUERY_BEYOND_MAX_LOOKBACK VARCHAR,\\n\" + // stored sql query to fetch all the potentially invalid rows which are before max lookback age\n \" BEYOND_MAX_LOOKBACK_COUNT BIGINT,\\n\" +\n \" CONSTRAINT PK PRIMARY KEY\\n\" +\n \" (\\n\" +\n \" \" + SOURCE_TABLE_COL_NAME + \",\\n\" +\n \" \" + TARGET_TABLE_COL_NAME + \",\\n\" +\n \" \" + SCRUTINY_EXECUTE_TIME_COL_NAME + \"\\n\" +\n \" )\\n\" +\n \")\\n\";",
"type": "String",
"var_name": "OUTPUT_METADATA_DDL"
},
{
"declarator": "OUTPUT_METADATA_BEYOND_LOOKBACK_COUNTER_DDL = \"\" +\n \"ALTER TABLE \" + OUTPUT_METADATA_TABLE_NAME + \"\\n\" +\n \" ADD IF NOT EXISTS INVALID_ROWS_QUERY_BEYOND_MAX_LOOKBACK VARCHAR, \\n\" +\n \" BEYOND_MAX_LOOKBACK_COUNT BIGINT\"",
"modifier": "public static final",
"original_string": "public static final String OUTPUT_METADATA_BEYOND_LOOKBACK_COUNTER_DDL = \"\" +\n \"ALTER TABLE \" + OUTPUT_METADATA_TABLE_NAME + \"\\n\" +\n \" ADD IF NOT EXISTS INVALID_ROWS_QUERY_BEYOND_MAX_LOOKBACK VARCHAR, \\n\" +\n \" BEYOND_MAX_LOOKBACK_COUNT BIGINT\";",
"type": "String",
"var_name": "OUTPUT_METADATA_BEYOND_LOOKBACK_COUNTER_DDL"
},
{
"declarator": "UPSERT_METADATA_SQL = \"UPSERT INTO \" + OUTPUT_METADATA_TABLE_NAME + \" VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\"",
"modifier": "public static final",
"original_string": "public static final String UPSERT_METADATA_SQL = \"UPSERT INTO \" + OUTPUT_METADATA_TABLE_NAME + \" VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";",
"type": "String",
"var_name": "UPSERT_METADATA_SQL"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexScrutinyTableOutput.java",
"identifier": "IndexScrutinyTableOutput",
"interfaces": "",
"methods": [
{
"class_method_signature": "IndexScrutinyTableOutput.constructOutputTableUpsert(List<String> sourceDynamicCols,\n List<String> targetDynamicCols, Connection connection)",
"constructor": false,
"full_signature": "public static String constructOutputTableUpsert(List<String> sourceDynamicCols,\n List<String> targetDynamicCols, Connection connection)",
"identifier": "constructOutputTableUpsert",
"modifiers": "public static",
"parameters": "(List<String> sourceDynamicCols,\n List<String> targetDynamicCols, Connection connection)",
"return": "String",
"signature": "String constructOutputTableUpsert(List<String> sourceDynamicCols,\n List<String> targetDynamicCols, Connection connection)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getSqlQueryAllInvalidRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static String getSqlQueryAllInvalidRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"identifier": "getSqlQueryAllInvalidRows",
"modifiers": "public static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"return": "String",
"signature": "String getSqlQueryAllInvalidRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getSqlQueryMissingTargetRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static String getSqlQueryMissingTargetRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"identifier": "getSqlQueryMissingTargetRows",
"modifiers": "public static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"return": "String",
"signature": "String getSqlQueryMissingTargetRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getSqlQueryBadCoveredColVal(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static String getSqlQueryBadCoveredColVal(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"identifier": "getSqlQueryBadCoveredColVal",
"modifiers": "public static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"return": "String",
"signature": "String getSqlQueryBadCoveredColVal(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getSqlQueryBeyondMaxLookback(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static String getSqlQueryBeyondMaxLookback(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"identifier": "getSqlQueryBeyondMaxLookback",
"modifiers": "public static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"return": "String",
"signature": "String getSqlQueryBeyondMaxLookback(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.queryMetadata(Connection conn, List<String> selectCols,\n String qSourceTableName, String qTargetTableName, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static ResultSet queryMetadata(Connection conn, List<String> selectCols,\n String qSourceTableName, String qTargetTableName, long scrutinyTimeMillis)",
"identifier": "queryMetadata",
"modifiers": "public static",
"parameters": "(Connection conn, List<String> selectCols,\n String qSourceTableName, String qTargetTableName, long scrutinyTimeMillis)",
"return": "ResultSet",
"signature": "ResultSet queryMetadata(Connection conn, List<String> selectCols,\n String qSourceTableName, String qTargetTableName, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.queryAllLatestMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName)",
"constructor": false,
"full_signature": "public static ResultSet queryAllLatestMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName)",
"identifier": "queryAllLatestMetadata",
"modifiers": "public static",
"parameters": "(Connection conn, String qSourceTableName,\n String qTargetTableName)",
"return": "ResultSet",
"signature": "ResultSet queryAllLatestMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.queryAllMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static ResultSet queryAllMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName, long scrutinyTimeMillis)",
"identifier": "queryAllMetadata",
"modifiers": "public static",
"parameters": "(Connection conn, String qSourceTableName,\n String qTargetTableName, long scrutinyTimeMillis)",
"return": "ResultSet",
"signature": "ResultSet queryAllMetadata(Connection conn, String qSourceTableName,\n String qTargetTableName, long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.writeJobResults(Connection conn, String[] cmdLineArgs, List<Job> completedJobs)",
"constructor": false,
"full_signature": "public static void writeJobResults(Connection conn, String[] cmdLineArgs, List<Job> completedJobs)",
"identifier": "writeJobResults",
"modifiers": "public static",
"parameters": "(Connection conn, String[] cmdLineArgs, List<Job> completedJobs)",
"return": "void",
"signature": "void writeJobResults(Connection conn, String[] cmdLineArgs, List<Job> completedJobs)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.constructMetadataParamQuery(List<String> metadataSelectCols)",
"constructor": false,
"full_signature": "static String constructMetadataParamQuery(List<String> metadataSelectCols)",
"identifier": "constructMetadataParamQuery",
"modifiers": "static",
"parameters": "(List<String> metadataSelectCols)",
"return": "String",
"signature": "String constructMetadataParamQuery(List<String> metadataSelectCols)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getAllInvalidParamQuery(Connection conn,\n SourceTargetColumnNames columnNames)",
"constructor": false,
"full_signature": "private static String getAllInvalidParamQuery(Connection conn,\n SourceTargetColumnNames columnNames)",
"identifier": "getAllInvalidParamQuery",
"modifiers": "private static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames)",
"return": "String",
"signature": "String getAllInvalidParamQuery(Connection conn,\n SourceTargetColumnNames columnNames)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.bindPkCols(SourceTargetColumnNames columnNames, long scrutinyTimeMillis,\n String paramQuery)",
"constructor": false,
"full_signature": "private static String bindPkCols(SourceTargetColumnNames columnNames, long scrutinyTimeMillis,\n String paramQuery)",
"identifier": "bindPkCols",
"modifiers": "private static",
"parameters": "(SourceTargetColumnNames columnNames, long scrutinyTimeMillis,\n String paramQuery)",
"return": "String",
"signature": "String bindPkCols(SourceTargetColumnNames columnNames, long scrutinyTimeMillis,\n String paramQuery)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getHasTargetRowQuery(Connection conn, SourceTargetColumnNames columnNames,\n long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "private static String getHasTargetRowQuery(Connection conn, SourceTargetColumnNames columnNames,\n long scrutinyTimeMillis)",
"identifier": "getHasTargetRowQuery",
"modifiers": "private static",
"parameters": "(Connection conn, SourceTargetColumnNames columnNames,\n long scrutinyTimeMillis)",
"return": "String",
"signature": "String getHasTargetRowQuery(Connection conn, SourceTargetColumnNames columnNames,\n long scrutinyTimeMillis)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getPksCsv()",
"constructor": false,
"full_signature": "private static String getPksCsv()",
"identifier": "getPksCsv",
"modifiers": "private static",
"parameters": "()",
"return": "String",
"signature": "String getPksCsv()",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getPkCols()",
"constructor": false,
"full_signature": "private static List<String> getPkCols()",
"identifier": "getPkCols",
"modifiers": "private static",
"parameters": "()",
"return": "List<String>",
"signature": "List<String> getPkCols()",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.constructOutputTableQuery(Connection connection,\n SourceTargetColumnNames columnNames, String conditions)",
"constructor": false,
"full_signature": "private static String constructOutputTableQuery(Connection connection,\n SourceTargetColumnNames columnNames, String conditions)",
"identifier": "constructOutputTableQuery",
"modifiers": "private static",
"parameters": "(Connection connection,\n SourceTargetColumnNames columnNames, String conditions)",
"return": "String",
"signature": "String constructOutputTableQuery(Connection connection,\n SourceTargetColumnNames columnNames, String conditions)",
"testcase": false
},
{
"class_method_signature": "IndexScrutinyTableOutput.getOutputTableColumns(Connection connection)",
"constructor": false,
"full_signature": "private static List<String> getOutputTableColumns(Connection connection)",
"identifier": "getOutputTableColumns",
"modifiers": "private static",
"parameters": "(Connection connection)",
"return": "List<String>",
"signature": "List<String> getOutputTableColumns(Connection connection)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String getSqlQueryMissingTargetRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis) throws SQLException {\n String paramQuery = getHasTargetRowQuery(conn, columnNames, scrutinyTimeMillis);\n return paramQuery.replaceFirst(\"\\\\?\", \"false\");\n }",
"class_method_signature": "IndexScrutinyTableOutput.getSqlQueryMissingTargetRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"constructor": false,
"full_signature": "public static String getSqlQueryMissingTargetRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"identifier": "getSqlQueryMissingTargetRows",
"invocations": [
"getHasTargetRowQuery",
"replaceFirst"
],
"modifiers": "public static",
"parameters": "(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"return": "String",
"signature": "String getSqlQueryMissingTargetRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_164 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/cache/JodaTimezoneCacheTest.java",
"identifier": "JodaTimezoneCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalDataException.class)\n public void testGetInstanceStringUnknown() {\n JodaTimezoneCache.getInstance(\"SOME_UNKNOWN_TIMEZONE\");\n }",
"class_method_signature": "JodaTimezoneCacheTest.testGetInstanceStringUnknown()",
"constructor": false,
"full_signature": "@Test(expected = IllegalDataException.class) public void testGetInstanceStringUnknown()",
"identifier": "testGetInstanceStringUnknown",
"invocations": [
"getInstance"
],
"modifiers": "@Test(expected = IllegalDataException.class) public",
"parameters": "()",
"return": "void",
"signature": "void testGetInstanceStringUnknown()",
"testcase": true
} | {
"fields": [
{
"declarator": "CACHE_EXPRIRE_TIME_MINUTES = 10",
"modifier": "public static final",
"original_string": "public static final int CACHE_EXPRIRE_TIME_MINUTES = 10;",
"type": "int",
"var_name": "CACHE_EXPRIRE_TIME_MINUTES"
},
{
"declarator": "cachedJodaTimeZones = createTimezoneCache()",
"modifier": "private static final",
"original_string": "private static final LoadingCache<ByteBuffer, DateTimeZone> cachedJodaTimeZones = createTimezoneCache();",
"type": "LoadingCache<ByteBuffer, DateTimeZone>",
"var_name": "cachedJodaTimeZones"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/cache/JodaTimezoneCache.java",
"identifier": "JodaTimezoneCache",
"interfaces": "",
"methods": [
{
"class_method_signature": "JodaTimezoneCache.getInstance(ByteBuffer timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ByteBuffer timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(ByteBuffer timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ByteBuffer timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.getInstance(ImmutableBytesWritable timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ImmutableBytesWritable timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(ImmutableBytesWritable timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ImmutableBytesWritable timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.getInstance(String timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(String timezoneId)",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "(String timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(String timezoneId)",
"testcase": false
},
{
"class_method_signature": "JodaTimezoneCache.createTimezoneCache()",
"constructor": false,
"full_signature": "private static LoadingCache<ByteBuffer, DateTimeZone> createTimezoneCache()",
"identifier": "createTimezoneCache",
"modifiers": "private static",
"parameters": "()",
"return": "LoadingCache<ByteBuffer, DateTimeZone>",
"signature": "LoadingCache<ByteBuffer, DateTimeZone> createTimezoneCache()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static DateTimeZone getInstance(ByteBuffer timezoneId) {\n try {\n return cachedJodaTimeZones.get(timezoneId);\n } catch (ExecutionException ex) {\n throw new IllegalDataException(ex);\n } catch (UncheckedExecutionException e) {\n throw new IllegalDataException(\"Unknown timezone \" + Bytes.toString(timezoneId.array()));\n }\n }",
"class_method_signature": "JodaTimezoneCache.getInstance(ByteBuffer timezoneId)",
"constructor": false,
"full_signature": "public static DateTimeZone getInstance(ByteBuffer timezoneId)",
"identifier": "getInstance",
"invocations": [
"get",
"toString",
"array"
],
"modifiers": "public static",
"parameters": "(ByteBuffer timezoneId)",
"return": "DateTimeZone",
"signature": "DateTimeZone getInstance(ByteBuffer timezoneId)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_71 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/Base62EncoderTest.java",
"identifier": "Base62EncoderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public final void testPowersBase62() {\n // add 1 since pow62 doesn't contain it\n long[] pow62 = new long[Base62Encoder.pow62.length + 1];\n pow62[0] = 1;\n System.arraycopy(Base62Encoder.pow62, 0, pow62, 1, Base62Encoder.pow62.length);\n long input = 0l;\n // test 0\n assertEquals(\"Base 62 encoded value for \" + input + \" is incorrect \", \"0\", Base62Encoder.toString(input));\n StringBuilder expectedValBuilder = new StringBuilder(\"1\");\n for (int i = 0; i < pow62.length; ++i) {\n input = pow62[i];\n assertEquals(\"Base 62 encoded value for \" + input + \" is incorrect \", expectedValBuilder.toString(),\n Base62Encoder.toString(input));\n assertEquals(\"Base 62 encoded value for \" + input + \" is incorrect \", \"-\" + expectedValBuilder.toString(),\n Base62Encoder.toString(-input));\n expectedValBuilder.append(\"0\");\n }\n }",
"class_method_signature": "Base62EncoderTest.testPowersBase62()",
"constructor": false,
"full_signature": "@Test public final void testPowersBase62()",
"identifier": "testPowersBase62",
"invocations": [
"arraycopy",
"assertEquals",
"toString",
"assertEquals",
"toString",
"toString",
"assertEquals",
"toString",
"toString",
"append"
],
"modifiers": "@Test public final",
"parameters": "()",
"return": "void",
"signature": "void testPowersBase62()",
"testcase": true
} | {
"fields": [
{
"declarator": "digits = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\".toCharArray()",
"modifier": "public static final",
"original_string": "public static final char[] digits = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\".toCharArray();",
"type": "char[]",
"var_name": "digits"
},
{
"declarator": "DigitTens = new char[3844]",
"modifier": "private static final",
"original_string": "private static final char[] DigitTens = new char[3844];",
"type": "char[]",
"var_name": "DigitTens"
},
{
"declarator": "DigitOnes = new char[3844]",
"modifier": "private static final",
"original_string": "private static final char[] DigitOnes = new char[3844];",
"type": "char[]",
"var_name": "DigitOnes"
},
{
"declarator": "pow62 = { 62, 3844, 238328, 14776336, 916132832, 56800235584L, 3521614606208L,\n 218340105584896L, 13537086546263552L, 839299365868340224L }",
"modifier": "final static",
"original_string": "final static long[] pow62 = { 62, 3844, 238328, 14776336, 916132832, 56800235584L, 3521614606208L,\n 218340105584896L, 13537086546263552L, 839299365868340224L };",
"type": "long[]",
"var_name": "pow62"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/Base62Encoder.java",
"identifier": "Base62Encoder",
"interfaces": "",
"methods": [
{
"class_method_signature": "Base62Encoder.stringSize(long num)",
"constructor": false,
"full_signature": "static int stringSize(long num)",
"identifier": "stringSize",
"modifiers": "static",
"parameters": "(long num)",
"return": "int",
"signature": "int stringSize(long num)",
"testcase": false
},
{
"class_method_signature": "Base62Encoder.getChars(long num, int size, char[] buf)",
"constructor": false,
"full_signature": "static void getChars(long num, int size, char[] buf)",
"identifier": "getChars",
"modifiers": "static",
"parameters": "(long num, int size, char[] buf)",
"return": "void",
"signature": "void getChars(long num, int size, char[] buf)",
"testcase": false
},
{
"class_method_signature": "Base62Encoder.toString(long num)",
"constructor": false,
"full_signature": "public static String toString(long num)",
"identifier": "toString",
"modifiers": "public static",
"parameters": "(long num)",
"return": "String",
"signature": "String toString(long num)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static String toString(long num) {\n if (num == Long.MIN_VALUE)\n return \"-AzL8n0Y58m8\";\n int size = (num < 0) ? stringSize(-num) + 1 : stringSize(num);\n char[] buf = new char[size];\n getChars(num, size, buf);\n return new String(buf);\n }",
"class_method_signature": "Base62Encoder.toString(long num)",
"constructor": false,
"full_signature": "public static String toString(long num)",
"identifier": "toString",
"invocations": [
"stringSize",
"stringSize",
"getChars"
],
"modifiers": "public static",
"parameters": "(long num)",
"return": "String",
"signature": "String toString(long num)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_133 | {
"fields": [
{
"declarator": "overAllQueryMetrics",
"modifier": "private",
"original_string": "private OverAllQueryMetrics overAllQueryMetrics;",
"type": "OverAllQueryMetrics",
"var_name": "overAllQueryMetrics"
},
{
"declarator": "numParallelScans = 10L",
"modifier": "private static final",
"original_string": "private static final long numParallelScans = 10L;",
"type": "long",
"var_name": "numParallelScans"
},
{
"declarator": "delta = 1000L",
"modifier": "private static final",
"original_string": "private static final long delta = 1000L;",
"type": "long",
"var_name": "delta"
},
{
"declarator": "queryTimeouts = 5",
"modifier": "private static final",
"original_string": "private static final int queryTimeouts = 5;",
"type": "int",
"var_name": "queryTimeouts"
},
{
"declarator": "queryFailures = 8",
"modifier": "private static final",
"original_string": "private static final int queryFailures = 8;",
"type": "int",
"var_name": "queryFailures"
},
{
"declarator": "cacheRefreshesDueToSplits = 15",
"modifier": "private static final",
"original_string": "private static final int cacheRefreshesDueToSplits = 15;",
"type": "int",
"var_name": "cacheRefreshesDueToSplits"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/monitoring/OverAllQueryMetricsTest.java",
"identifier": "OverAllQueryMetricsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCombine() {\n OverAllQueryMetrics otherMetrics = new OverAllQueryMetrics(true, LogLevel.TRACE);\n final long otherNumParallelScans = 9L;\n final int otherQueryTimeouts = 8;\n final int otherQueryFailures = 7;\n final int otherCacheRefreshes = 6;\n populateMetrics(otherMetrics, otherNumParallelScans, otherQueryTimeouts, otherQueryFailures,\n otherCacheRefreshes);\n OverAllQueryMetrics finalMetricObj = this.overAllQueryMetrics.combine(otherMetrics);\n assertPublishedMetrics(finalMetricObj.publish(), numParallelScans + otherNumParallelScans,\n queryTimeouts + otherQueryTimeouts, queryFailures + otherQueryFailures,\n cacheRefreshesDueToSplits + otherCacheRefreshes, 0L);\n }",
"class_method_signature": "OverAllQueryMetricsTest.testCombine()",
"constructor": false,
"full_signature": "@Test public void testCombine()",
"identifier": "testCombine",
"invocations": [
"populateMetrics",
"combine",
"assertPublishedMetrics",
"publish"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCombine()",
"testcase": true
} | {
"fields": [
{
"declarator": "queryWatch",
"modifier": "private final",
"original_string": "private final MetricsStopWatch queryWatch;",
"type": "MetricsStopWatch",
"var_name": "queryWatch"
},
{
"declarator": "resultSetWatch",
"modifier": "private final",
"original_string": "private final MetricsStopWatch resultSetWatch;",
"type": "MetricsStopWatch",
"var_name": "resultSetWatch"
},
{
"declarator": "numParallelScans",
"modifier": "private final",
"original_string": "private final CombinableMetric numParallelScans;",
"type": "CombinableMetric",
"var_name": "numParallelScans"
},
{
"declarator": "wallClockTimeMS",
"modifier": "private final",
"original_string": "private final CombinableMetric wallClockTimeMS;",
"type": "CombinableMetric",
"var_name": "wallClockTimeMS"
},
{
"declarator": "resultSetTimeMS",
"modifier": "private final",
"original_string": "private final CombinableMetric resultSetTimeMS;",
"type": "CombinableMetric",
"var_name": "resultSetTimeMS"
},
{
"declarator": "queryTimedOut",
"modifier": "private final",
"original_string": "private final CombinableMetric queryTimedOut;",
"type": "CombinableMetric",
"var_name": "queryTimedOut"
},
{
"declarator": "queryFailed",
"modifier": "private final",
"original_string": "private final CombinableMetric queryFailed;",
"type": "CombinableMetric",
"var_name": "queryFailed"
},
{
"declarator": "cacheRefreshedDueToSplits",
"modifier": "private final",
"original_string": "private final CombinableMetric cacheRefreshedDueToSplits;",
"type": "CombinableMetric",
"var_name": "cacheRefreshedDueToSplits"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/monitoring/OverAllQueryMetrics.java",
"identifier": "OverAllQueryMetrics",
"interfaces": "",
"methods": [
{
"class_method_signature": "OverAllQueryMetrics.OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"constructor": true,
"full_signature": "public OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"identifier": "OverAllQueryMetrics",
"modifiers": "public",
"parameters": "(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"return": "",
"signature": " OverAllQueryMetrics(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel)",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.updateNumParallelScans(long numParallelScans)",
"constructor": false,
"full_signature": "public void updateNumParallelScans(long numParallelScans)",
"identifier": "updateNumParallelScans",
"modifiers": "public",
"parameters": "(long numParallelScans)",
"return": "void",
"signature": "void updateNumParallelScans(long numParallelScans)",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.queryTimedOut()",
"constructor": false,
"full_signature": "public void queryTimedOut()",
"identifier": "queryTimedOut",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void queryTimedOut()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.queryFailed()",
"constructor": false,
"full_signature": "public void queryFailed()",
"identifier": "queryFailed",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void queryFailed()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.cacheRefreshedDueToSplits()",
"constructor": false,
"full_signature": "public void cacheRefreshedDueToSplits()",
"identifier": "cacheRefreshedDueToSplits",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void cacheRefreshedDueToSplits()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.startQuery()",
"constructor": false,
"full_signature": "public void startQuery()",
"identifier": "startQuery",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void startQuery()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.endQuery()",
"constructor": false,
"full_signature": "public void endQuery()",
"identifier": "endQuery",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void endQuery()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.startResultSetWatch()",
"constructor": false,
"full_signature": "public void startResultSetWatch()",
"identifier": "startResultSetWatch",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void startResultSetWatch()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.stopResultSetWatch()",
"constructor": false,
"full_signature": "public void stopResultSetWatch()",
"identifier": "stopResultSetWatch",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void stopResultSetWatch()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.getWallClockTimeMs()",
"constructor": false,
"full_signature": "@VisibleForTesting long getWallClockTimeMs()",
"identifier": "getWallClockTimeMs",
"modifiers": "@VisibleForTesting",
"parameters": "()",
"return": "long",
"signature": "long getWallClockTimeMs()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.getResultSetTimeMs()",
"constructor": false,
"full_signature": "@VisibleForTesting long getResultSetTimeMs()",
"identifier": "getResultSetTimeMs",
"modifiers": "@VisibleForTesting",
"parameters": "()",
"return": "long",
"signature": "long getResultSetTimeMs()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.publish()",
"constructor": false,
"full_signature": "public Map<MetricType, Long> publish()",
"identifier": "publish",
"modifiers": "public",
"parameters": "()",
"return": "Map<MetricType, Long>",
"signature": "Map<MetricType, Long> publish()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.reset()",
"constructor": false,
"full_signature": "public void reset()",
"identifier": "reset",
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void reset()",
"testcase": false
},
{
"class_method_signature": "OverAllQueryMetrics.combine(OverAllQueryMetrics metric)",
"constructor": false,
"full_signature": "public OverAllQueryMetrics combine(OverAllQueryMetrics metric)",
"identifier": "combine",
"modifiers": "public",
"parameters": "(OverAllQueryMetrics metric)",
"return": "OverAllQueryMetrics",
"signature": "OverAllQueryMetrics combine(OverAllQueryMetrics metric)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public OverAllQueryMetrics combine(OverAllQueryMetrics metric) {\n cacheRefreshedDueToSplits.combine(metric.cacheRefreshedDueToSplits);\n queryFailed.combine(metric.queryFailed);\n queryTimedOut.combine(metric.queryTimedOut);\n numParallelScans.combine(metric.numParallelScans);\n return this;\n }",
"class_method_signature": "OverAllQueryMetrics.combine(OverAllQueryMetrics metric)",
"constructor": false,
"full_signature": "public OverAllQueryMetrics combine(OverAllQueryMetrics metric)",
"identifier": "combine",
"invocations": [
"combine",
"combine",
"combine",
"combine"
],
"modifiers": "public",
"parameters": "(OverAllQueryMetrics metric)",
"return": "OverAllQueryMetrics",
"signature": "OverAllQueryMetrics combine(OverAllQueryMetrics metric)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_26 | {
"fields": [
{
"declarator": "MIN_VALUE = 1",
"modifier": "private static",
"original_string": "private static long MIN_VALUE = 1;",
"type": "long",
"var_name": "MIN_VALUE"
},
{
"declarator": "MAX_VALUE = 10",
"modifier": "private static",
"original_string": "private static long MAX_VALUE = 10;",
"type": "long",
"var_name": "MAX_VALUE"
},
{
"declarator": "CACHE_SIZE = 2",
"modifier": "private static",
"original_string": "private static long CACHE_SIZE = 2;",
"type": "long",
"var_name": "CACHE_SIZE"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/SequenceUtilTest.java",
"identifier": "SequenceUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBulkAllocationAscendingNextValueGreaterThanMax() throws SQLException {\n assertTrue(SequenceUtil.checkIfLimitReached(MAX_VALUE, MIN_VALUE, MAX_VALUE, 2/* incrementBy */, CACHE_SIZE, 1));\n }",
"class_method_signature": "SequenceUtilTest.testBulkAllocationAscendingNextValueGreaterThanMax()",
"constructor": false,
"full_signature": "@Test public void testBulkAllocationAscendingNextValueGreaterThanMax()",
"identifier": "testBulkAllocationAscendingNextValueGreaterThanMax",
"invocations": [
"assertTrue",
"checkIfLimitReached"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testBulkAllocationAscendingNextValueGreaterThanMax()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L",
"modifier": "public static final",
"original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;",
"type": "long",
"var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/SequenceUtil.java",
"identifier": "SequenceUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(SequenceInfo info)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(SequenceInfo info)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(SequenceInfo info)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(SequenceInfo info)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isBulkAllocation(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isBulkAllocation(long numToAllocate)",
"identifier": "isBulkAllocation",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isBulkAllocation(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isCycleAllowed(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isCycleAllowed(long numToAllocate)",
"identifier": "isCycleAllowed",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isCycleAllowed(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"constructor": false,
"full_signature": "public static SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"identifier": "getException",
"modifiers": "public static",
"parameters": "(String schemaName, String tableName,\n SQLExceptionCode code)",
"return": "SQLException",
"signature": "SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getLimitReachedErrorCode(boolean increasingSeq)",
"constructor": false,
"full_signature": "public static SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"identifier": "getLimitReachedErrorCode",
"modifiers": "public static",
"parameters": "(boolean increasingSeq)",
"return": "SQLExceptionCode",
"signature": "SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for overflow \n try {\n long incrementValue;\n if (isBulkAllocation(numToAllocate)) {\n // For bulk allocation we increment independent of cache size\n incrementValue = LongMath.checkedMultiply(incrementBy, numToAllocate);\n } else {\n incrementValue = LongMath.checkedMultiply(incrementBy, cacheSize);\n }\n nextValue = LongMath.checkedAdd(currentValue, incrementValue);\n } catch (ArithmeticException e) {\n return true;\n }\n\n // check if limit was reached\n\t\tif ((increasingSeq && nextValue > maxValue)\n\t\t\t\t|| (!increasingSeq && nextValue < minValue)) {\n return true;\n }\n return false;\n }",
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"invocations": [
"isBulkAllocation",
"checkedMultiply",
"checkedMultiply",
"checkedAdd"
],
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_3 | {
"fields": [
{
"declarator": "mockParser",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static XMLConfigParser mockParser;",
"type": "XMLConfigParser",
"var_name": "mockParser"
},
{
"declarator": "mockDMR",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static DataModelResult mockDMR;",
"type": "DataModelResult",
"var_name": "mockDMR"
},
{
"declarator": "mockRA",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static RulesApplier mockRA;",
"type": "RulesApplier",
"var_name": "mockRA"
},
{
"declarator": "mockTT",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static ThreadTime mockTT;",
"type": "ThreadTime",
"var_name": "mockTT"
},
{
"declarator": "mockScenario",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static Scenario mockScenario;",
"type": "Scenario",
"var_name": "mockScenario"
},
{
"declarator": "mockWE",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static WorkloadExecutor mockWE;",
"type": "WorkloadExecutor",
"var_name": "mockWE"
},
{
"declarator": "mockQuery",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static Query mockQuery;",
"type": "Query",
"var_name": "mockQuery"
},
{
"declarator": "mockRS",
"modifier": "@Mock\n private static",
"original_string": "@Mock\n private static ResultSet mockRS;",
"type": "ResultSet",
"var_name": "mockRS"
}
],
"file": "phoenix-pherf/src/test/java/org/apache/phoenix/pherf/workload/MultiThreadedRunnerTest.java",
"identifier": "MultiThreadedRunnerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTimeout() throws Exception {\n Mockito.when(mockQuery.getTimeoutDuration()).thenReturn(1000L);\n Mockito.when(mockQuery.getExpectedAggregateRowCount()).thenReturn(1L);\n MultiThreadedRunner mtr = new MultiThreadedRunner(\"test\",\n mockQuery, mockDMR, mockTT,\n 10L, 1000L,\n true, mockRA,\n mockScenario, mockWE, mockParser);\n DefaultEnvironmentEdge myClock = Mockito.mock(DefaultEnvironmentEdge.class);\n Mockito.when(myClock.currentTime()).thenReturn(0L, 5000L);\n EnvironmentEdgeManager.injectEdge(myClock);\n try {\n Mockito.when(mockRS.next()).thenReturn(true);\n Mockito.when(mockRS.getLong(1)).thenReturn(1L);\n Pair<Long, Long> results = mtr.getResults(mockRS, \"test_iteration\", false, 0L);\n assertTrue(results.getSecond() > mockQuery.getTimeoutDuration());\n } finally {\n EnvironmentEdgeManager.reset();\n }\n }",
"class_method_signature": "MultiThreadedRunnerTest.testTimeout()",
"constructor": false,
"full_signature": "@Test public void testTimeout()",
"identifier": "testTimeout",
"invocations": [
"thenReturn",
"when",
"getTimeoutDuration",
"thenReturn",
"when",
"getExpectedAggregateRowCount",
"mock",
"thenReturn",
"when",
"currentTime",
"injectEdge",
"thenReturn",
"when",
"next",
"thenReturn",
"when",
"getLong",
"getResults",
"assertTrue",
"getSecond",
"getTimeoutDuration",
"reset"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testTimeout()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MultiThreadedRunner.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MultiThreadedRunner.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "query",
"modifier": "private",
"original_string": "private Query query;",
"type": "Query",
"var_name": "query"
},
{
"declarator": "threadTime",
"modifier": "private",
"original_string": "private ThreadTime threadTime;",
"type": "ThreadTime",
"var_name": "threadTime"
},
{
"declarator": "pUtil = PhoenixUtil.create()",
"modifier": "private",
"original_string": "private PhoenixUtil pUtil = PhoenixUtil.create();",
"type": "PhoenixUtil",
"var_name": "pUtil"
},
{
"declarator": "threadName",
"modifier": "private",
"original_string": "private String threadName;",
"type": "String",
"var_name": "threadName"
},
{
"declarator": "dataModelResult",
"modifier": "private",
"original_string": "private DataModelResult dataModelResult;",
"type": "DataModelResult",
"var_name": "dataModelResult"
},
{
"declarator": "numberOfExecutions",
"modifier": "private",
"original_string": "private long numberOfExecutions;",
"type": "long",
"var_name": "numberOfExecutions"
},
{
"declarator": "executionDurationInMs",
"modifier": "private",
"original_string": "private long executionDurationInMs;",
"type": "long",
"var_name": "executionDurationInMs"
},
{
"declarator": "lastResultWritten = EnvironmentEdgeManager.currentTimeMillis() - 1000",
"modifier": "private static",
"original_string": "private static long lastResultWritten = EnvironmentEdgeManager.currentTimeMillis() - 1000;",
"type": "long",
"var_name": "lastResultWritten"
},
{
"declarator": "resultManager",
"modifier": "private final",
"original_string": "private final ResultManager resultManager;",
"type": "ResultManager",
"var_name": "resultManager"
},
{
"declarator": "ruleApplier",
"modifier": "private final",
"original_string": "private final RulesApplier ruleApplier;",
"type": "RulesApplier",
"var_name": "ruleApplier"
},
{
"declarator": "scenario",
"modifier": "private final",
"original_string": "private final Scenario scenario;",
"type": "Scenario",
"var_name": "scenario"
},
{
"declarator": "workloadExecutor",
"modifier": "private final",
"original_string": "private final WorkloadExecutor workloadExecutor;",
"type": "WorkloadExecutor",
"var_name": "workloadExecutor"
},
{
"declarator": "parser",
"modifier": "private final",
"original_string": "private final XMLConfigParser parser;",
"type": "XMLConfigParser",
"var_name": "parser"
},
{
"declarator": "writeRuntimeResults",
"modifier": "private final",
"original_string": "private final boolean writeRuntimeResults;",
"type": "boolean",
"var_name": "writeRuntimeResults"
}
],
"file": "phoenix-pherf/src/main/java/org/apache/phoenix/pherf/workload/MultiThreadedRunner.java",
"identifier": "MultiThreadedRunner",
"interfaces": "implements Callable<Void>",
"methods": [
{
"class_method_signature": "MultiThreadedRunner.MultiThreadedRunner(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"constructor": true,
"full_signature": " MultiThreadedRunner(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"identifier": "MultiThreadedRunner",
"modifiers": "",
"parameters": "(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"return": "",
"signature": " MultiThreadedRunner(String threadName, Query query, DataModelResult dataModelResult,\n ThreadTime threadTime, long numberOfExecutions, long executionDurationInMs, boolean writeRuntimeResults, RulesApplier ruleApplier, Scenario scenario, WorkloadExecutor workloadExecutor, XMLConfigParser parser)",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.call()",
"constructor": false,
"full_signature": "@Override public Void call()",
"identifier": "call",
"modifiers": "@Override public",
"parameters": "()",
"return": "Void",
"signature": "Void call()",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.getThreadTime()",
"constructor": false,
"full_signature": "private synchronized ThreadTime getThreadTime()",
"identifier": "getThreadTime",
"modifiers": "private synchronized",
"parameters": "()",
"return": "ThreadTime",
"signature": "ThreadTime getThreadTime()",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.timedQuery(long iterationNumber)",
"constructor": false,
"full_signature": "private boolean timedQuery(long iterationNumber)",
"identifier": "timedQuery",
"modifiers": "private",
"parameters": "(long iterationNumber)",
"return": "boolean",
"signature": "boolean timedQuery(long iterationNumber)",
"testcase": false
},
{
"class_method_signature": "MultiThreadedRunner.getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"constructor": false,
"full_signature": "@VisibleForTesting Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"identifier": "getResults",
"modifiers": "@VisibleForTesting",
"parameters": "(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"return": "Pair<Long, Long>",
"signature": "Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@VisibleForTesting\n /**\n * @return a Pair whose first value is the resultRowCount, and whose second value is whether the query timed out.\n */\n Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime) throws Exception {\n Long resultRowCount = 0L;\n while (rs.next()) {\n if (null != query.getExpectedAggregateRowCount()) {\n if (rs.getLong(1) != query.getExpectedAggregateRowCount())\n throw new RuntimeException(\n \"Aggregate count \" + rs.getLong(1) + \" does not match expected \"\n + query.getExpectedAggregateRowCount());\n }\n\n if (isSelectCountStatement) {\n resultRowCount = rs.getLong(1);\n } else {\n resultRowCount++;\n }\n long queryElapsedTime = EnvironmentEdgeManager.currentTimeMillis() - queryStartTime;\n if (queryElapsedTime >= query.getTimeoutDuration()) {\n LOGGER.error(\"Query \" + queryIteration + \" exceeded timeout of \"\n + query.getTimeoutDuration() + \" ms at \" + queryElapsedTime + \" ms.\");\n return new Pair(resultRowCount, queryElapsedTime);\n }\n }\n return new Pair(resultRowCount, EnvironmentEdgeManager.currentTimeMillis() - queryStartTime);\n }",
"class_method_signature": "MultiThreadedRunner.getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"constructor": false,
"full_signature": "@VisibleForTesting Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"identifier": "getResults",
"invocations": [
"next",
"getExpectedAggregateRowCount",
"getLong",
"getExpectedAggregateRowCount",
"getLong",
"getExpectedAggregateRowCount",
"getLong",
"currentTimeMillis",
"getTimeoutDuration",
"error",
"getTimeoutDuration",
"currentTimeMillis"
],
"modifiers": "@VisibleForTesting",
"parameters": "(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"return": "Pair<Long, Long>",
"signature": "Pair<Long, Long> getResults(ResultSet rs, String queryIteration, boolean isSelectCountStatement, Long queryStartTime)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_30 | {
"fields": [
{
"declarator": "MIN_VALUE = 1",
"modifier": "private static",
"original_string": "private static long MIN_VALUE = 1;",
"type": "long",
"var_name": "MIN_VALUE"
},
{
"declarator": "MAX_VALUE = 10",
"modifier": "private static",
"original_string": "private static long MAX_VALUE = 10;",
"type": "long",
"var_name": "MAX_VALUE"
},
{
"declarator": "CACHE_SIZE = 2",
"modifier": "private static",
"original_string": "private static long CACHE_SIZE = 2;",
"type": "long",
"var_name": "CACHE_SIZE"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/SequenceUtilTest.java",
"identifier": "SequenceUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBulkAllocationDescendingNextValueLessThanMax() throws SQLException {\n assertTrue(SequenceUtil.checkIfLimitReached(10, MIN_VALUE, MAX_VALUE, -2/* incrementBy */, CACHE_SIZE, 5));\n }",
"class_method_signature": "SequenceUtilTest.testBulkAllocationDescendingNextValueLessThanMax()",
"constructor": false,
"full_signature": "@Test public void testBulkAllocationDescendingNextValueLessThanMax()",
"identifier": "testBulkAllocationDescendingNextValueLessThanMax",
"invocations": [
"assertTrue",
"checkIfLimitReached"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testBulkAllocationDescendingNextValueLessThanMax()",
"testcase": true
} | {
"fields": [
{
"declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L",
"modifier": "public static final",
"original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;",
"type": "long",
"var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/SequenceUtil.java",
"identifier": "SequenceUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.checkIfLimitReached(SequenceInfo info)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(SequenceInfo info)",
"identifier": "checkIfLimitReached",
"modifiers": "public static",
"parameters": "(SequenceInfo info)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(SequenceInfo info)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isBulkAllocation(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isBulkAllocation(long numToAllocate)",
"identifier": "isBulkAllocation",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isBulkAllocation(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.isCycleAllowed(long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean isCycleAllowed(long numToAllocate)",
"identifier": "isCycleAllowed",
"modifiers": "public static",
"parameters": "(long numToAllocate)",
"return": "boolean",
"signature": "boolean isCycleAllowed(long numToAllocate)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"constructor": false,
"full_signature": "public static SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"identifier": "getException",
"modifiers": "public static",
"parameters": "(String schemaName, String tableName,\n SQLExceptionCode code)",
"return": "SQLException",
"signature": "SQLException getException(String schemaName, String tableName,\n SQLExceptionCode code)",
"testcase": false
},
{
"class_method_signature": "SequenceUtil.getLimitReachedErrorCode(boolean increasingSeq)",
"constructor": false,
"full_signature": "public static SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"identifier": "getLimitReachedErrorCode",
"modifiers": "public static",
"parameters": "(boolean increasingSeq)",
"return": "SQLExceptionCode",
"signature": "SQLExceptionCode getLimitReachedErrorCode(boolean increasingSeq)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for overflow \n try {\n long incrementValue;\n if (isBulkAllocation(numToAllocate)) {\n // For bulk allocation we increment independent of cache size\n incrementValue = LongMath.checkedMultiply(incrementBy, numToAllocate);\n } else {\n incrementValue = LongMath.checkedMultiply(incrementBy, cacheSize);\n }\n nextValue = LongMath.checkedAdd(currentValue, incrementValue);\n } catch (ArithmeticException e) {\n return true;\n }\n\n // check if limit was reached\n\t\tif ((increasingSeq && nextValue > maxValue)\n\t\t\t\t|| (!increasingSeq && nextValue < minValue)) {\n return true;\n }\n return false;\n }",
"class_method_signature": "SequenceUtil.checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"constructor": false,
"full_signature": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"identifier": "checkIfLimitReached",
"invocations": [
"isBulkAllocation",
"checkedMultiply",
"checkedMultiply",
"checkedAdd"
],
"modifiers": "public static",
"parameters": "(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"return": "boolean",
"signature": "boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_125 | {
"fields": [
{
"declarator": "row = Bytes.toBytes(\"row\")",
"modifier": "private static final",
"original_string": "private static final byte[] row = Bytes.toBytes(\"row\");",
"type": "byte[]",
"var_name": "row"
},
{
"declarator": "TABLE_NAME = \"table\"",
"modifier": "private static final",
"original_string": "private static final String TABLE_NAME = \"table\";",
"type": "String",
"var_name": "TABLE_NAME"
},
{
"declarator": "table = Bytes.toBytes(TABLE_NAME)",
"modifier": "private static final",
"original_string": "private static final byte[] table = Bytes.toBytes(TABLE_NAME);",
"type": "byte[]",
"var_name": "table"
},
{
"declarator": "mockIndexMetaData",
"modifier": "private",
"original_string": "private IndexMetaData mockIndexMetaData;",
"type": "IndexMetaData",
"var_name": "mockIndexMetaData"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/update/TestIndexUpdateManager.java",
"identifier": "TestIndexUpdateManager",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCancelingUpdates() throws Exception {\n IndexUpdateManager manager = new IndexUpdateManager(mockIndexMetaData);\n\n long ts1 = 10, ts2 = 11;\n // at different timestamps, so both should be retained\n Delete d = new Delete(row, ts1);\n Put p = new Put(row, ts2);\n manager.addIndexUpdate(table, d);\n manager.addIndexUpdate(table, p);\n List<Mutation> pending = new ArrayList<Mutation>();\n pending.add(p);\n pending.add(d);\n validate(manager, pending);\n\n // add a delete that should cancel out the put, leading to only one delete remaining\n Delete d2 = new Delete(row, ts2);\n manager.addIndexUpdate(table, d2);\n pending.add(d);\n validate(manager, pending);\n\n // double-deletes of the same row only retain the existing one, which was already canceled out\n // above\n Delete d3 = new Delete(row, ts2);\n manager.addIndexUpdate(table, d3);\n pending.add(d);\n validate(manager, pending);\n\n // if there is just a put and a delete at the same ts, no pending updates should be returned\n manager = new IndexUpdateManager(mockIndexMetaData);\n manager.addIndexUpdate(table, d2);\n manager.addIndexUpdate(table, p);\n validate(manager, Collections.<Mutation> emptyList());\n\n // different row insertions can be tricky too, if you don't get the base cases right\n manager = new IndexUpdateManager(mockIndexMetaData);\n manager.addIndexUpdate(table, p);\n // this row definitely sorts after the current row\n byte[] row1 = Bytes.toBytes(\"row1\");\n Put p1 = new Put(row1, ts1);\n manager.addIndexUpdate(table, p1);\n // this delete should completely cover the given put and both should be removed\n Delete d4 = new Delete(row1, ts1);\n manager.addIndexUpdate(table, d4);\n pending.clear();\n pending.add(p);\n validate(manager, pending);\n }",
"class_method_signature": "TestIndexUpdateManager.testCancelingUpdates()",
"constructor": false,
"full_signature": "@Test public void testCancelingUpdates()",
"identifier": "testCancelingUpdates",
"invocations": [
"addIndexUpdate",
"addIndexUpdate",
"add",
"add",
"validate",
"addIndexUpdate",
"add",
"validate",
"addIndexUpdate",
"add",
"validate",
"addIndexUpdate",
"addIndexUpdate",
"validate",
"emptyList",
"addIndexUpdate",
"toBytes",
"addIndexUpdate",
"addIndexUpdate",
"clear",
"add",
"validate"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testCancelingUpdates()",
"testcase": true
} | {
"fields": [
{
"declarator": "COMPARATOR = new MutationComparator()",
"modifier": "public",
"original_string": "public Comparator<Mutation> COMPARATOR = new MutationComparator();",
"type": "Comparator<Mutation>",
"var_name": "COMPARATOR"
},
{
"declarator": "PHOENIX_HBASE_TEMP_DELETE_MARKER = \"phoenix.hbase.temp.delete.marker\"",
"modifier": "private static final",
"original_string": "private static final String PHOENIX_HBASE_TEMP_DELETE_MARKER = \"phoenix.hbase.temp.delete.marker\";",
"type": "String",
"var_name": "PHOENIX_HBASE_TEMP_DELETE_MARKER"
},
{
"declarator": "TRUE_MARKER = new byte[] { 1 }",
"modifier": "private static final",
"original_string": "private static final byte[] TRUE_MARKER = new byte[] { 1 };",
"type": "byte[]",
"var_name": "TRUE_MARKER"
},
{
"declarator": "map =\n new HashMap<ImmutableBytesPtr, Collection<Mutation>>()",
"modifier": "protected final",
"original_string": "protected final Map<ImmutableBytesPtr, Collection<Mutation>> map =\n new HashMap<ImmutableBytesPtr, Collection<Mutation>>();",
"type": "Map<ImmutableBytesPtr, Collection<Mutation>>",
"var_name": "map"
},
{
"declarator": "indexMetaData",
"modifier": "private",
"original_string": "private IndexMetaData indexMetaData;",
"type": "IndexMetaData",
"var_name": "indexMetaData"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/update/IndexUpdateManager.java",
"identifier": "IndexUpdateManager",
"interfaces": "",
"methods": [
{
"class_method_signature": "IndexUpdateManager.IndexUpdateManager(IndexMetaData indexMetaData)",
"constructor": true,
"full_signature": "public IndexUpdateManager(IndexMetaData indexMetaData)",
"identifier": "IndexUpdateManager",
"modifiers": "public",
"parameters": "(IndexMetaData indexMetaData)",
"return": "",
"signature": " IndexUpdateManager(IndexMetaData indexMetaData)",
"testcase": false
},
{
"class_method_signature": "IndexUpdateManager.addIndexUpdate(byte[] tableName, Mutation m)",
"constructor": false,
"full_signature": "public void addIndexUpdate(byte[] tableName, Mutation m)",
"identifier": "addIndexUpdate",
"modifiers": "public",
"parameters": "(byte[] tableName, Mutation m)",
"return": "void",
"signature": "void addIndexUpdate(byte[] tableName, Mutation m)",
"testcase": false
},
{
"class_method_signature": "IndexUpdateManager.fixUpCurrentUpdates(Collection<Mutation> updates, Mutation pendingMutation)",
"constructor": false,
"full_signature": "protected void fixUpCurrentUpdates(Collection<Mutation> updates, Mutation pendingMutation)",
"identifier": "fixUpCurrentUpdates",
"modifiers": "protected",
"parameters": "(Collection<Mutation> updates, Mutation pendingMutation)",
"return": "void",
"signature": "void fixUpCurrentUpdates(Collection<Mutation> updates, Mutation pendingMutation)",
"testcase": false
},
{
"class_method_signature": "IndexUpdateManager.markMutationForRemoval(Mutation m)",
"constructor": false,
"full_signature": "private void markMutationForRemoval(Mutation m)",
"identifier": "markMutationForRemoval",
"modifiers": "private",
"parameters": "(Mutation m)",
"return": "void",
"signature": "void markMutationForRemoval(Mutation m)",
"testcase": false
},
{
"class_method_signature": "IndexUpdateManager.toMap()",
"constructor": false,
"full_signature": "public List<Pair<Mutation, byte[]>> toMap()",
"identifier": "toMap",
"modifiers": "public",
"parameters": "()",
"return": "List<Pair<Mutation, byte[]>>",
"signature": "List<Pair<Mutation, byte[]>> toMap()",
"testcase": false
},
{
"class_method_signature": "IndexUpdateManager.addAll(Collection<Pair<Mutation, String>> updates)",
"constructor": false,
"full_signature": "public void addAll(Collection<Pair<Mutation, String>> updates)",
"identifier": "addAll",
"modifiers": "public",
"parameters": "(Collection<Pair<Mutation, String>> updates)",
"return": "void",
"signature": "void addAll(Collection<Pair<Mutation, String>> updates)",
"testcase": false
},
{
"class_method_signature": "IndexUpdateManager.shouldBeRemoved(Mutation m)",
"constructor": false,
"full_signature": "private boolean shouldBeRemoved(Mutation m)",
"identifier": "shouldBeRemoved",
"modifiers": "private",
"parameters": "(Mutation m)",
"return": "boolean",
"signature": "boolean shouldBeRemoved(Mutation m)",
"testcase": false
},
{
"class_method_signature": "IndexUpdateManager.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"modifiers": "@Override public",
"parameters": "()",
"return": "String",
"signature": "String toString()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public void addIndexUpdate(byte[] tableName, Mutation m) {\n // we only keep the most recent update\n ImmutableBytesPtr key = new ImmutableBytesPtr(tableName);\n Collection<Mutation> updates = map.get(key);\n if (updates == null) {\n updates = new TreeSet<Mutation>(COMPARATOR);\n map.put(key, updates);\n }\n if (indexMetaData.getReplayWrite() != null) {\n // if we're replaying mutations, we don't need to worry about out-of-order updates\n updates.add(m);\n } else {\n fixUpCurrentUpdates(updates, m);\n }\n }",
"class_method_signature": "IndexUpdateManager.addIndexUpdate(byte[] tableName, Mutation m)",
"constructor": false,
"full_signature": "public void addIndexUpdate(byte[] tableName, Mutation m)",
"identifier": "addIndexUpdate",
"invocations": [
"get",
"put",
"getReplayWrite",
"add",
"fixUpCurrentUpdates"
],
"modifiers": "public",
"parameters": "(byte[] tableName, Mutation m)",
"return": "void",
"signature": "void addIndexUpdate(byte[] tableName, Mutation m)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_67 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/ByteUtilTest.java",
"identifier": "ByteUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSplitBytes() {\n byte[] startRow = Bytes.toBytes(\"EA\");\n byte[] stopRow = Bytes.toBytes(\"EZ\");\n byte[][] splitPoints = Bytes.split(startRow, stopRow, 10);\n for (byte[] splitPoint : splitPoints) {\n assertTrue(Bytes.toStringBinary(splitPoint), Bytes.compareTo(startRow, splitPoint) <= 0);\n assertTrue(Bytes.toStringBinary(splitPoint), Bytes.compareTo(stopRow, splitPoint) >= 0);\n }\n }",
"class_method_signature": "ByteUtilTest.testSplitBytes()",
"constructor": false,
"full_signature": "@Test public void testSplitBytes()",
"identifier": "testSplitBytes",
"invocations": [
"toBytes",
"toBytes",
"split",
"assertTrue",
"toStringBinary",
"compareTo",
"assertTrue",
"toStringBinary",
"compareTo"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testSplitBytes()",
"testcase": true
} | {
"fields": [
{
"declarator": "EMPTY_BYTE_ARRAY = new byte[0]",
"modifier": "public static final",
"original_string": "public static final byte[] EMPTY_BYTE_ARRAY = new byte[0];",
"type": "byte[]",
"var_name": "EMPTY_BYTE_ARRAY"
},
{
"declarator": "EMPTY_BYTE_ARRAY_PTR = new ImmutableBytesPtr(\n EMPTY_BYTE_ARRAY)",
"modifier": "public static final",
"original_string": "public static final ImmutableBytesPtr EMPTY_BYTE_ARRAY_PTR = new ImmutableBytesPtr(\n EMPTY_BYTE_ARRAY);",
"type": "ImmutableBytesPtr",
"var_name": "EMPTY_BYTE_ARRAY_PTR"
},
{
"declarator": "EMPTY_IMMUTABLE_BYTE_ARRAY = new ImmutableBytesWritable(\n EMPTY_BYTE_ARRAY)",
"modifier": "public static final",
"original_string": "public static final ImmutableBytesWritable EMPTY_IMMUTABLE_BYTE_ARRAY = new ImmutableBytesWritable(\n EMPTY_BYTE_ARRAY);",
"type": "ImmutableBytesWritable",
"var_name": "EMPTY_IMMUTABLE_BYTE_ARRAY"
},
{
"declarator": "BYTES_PTR_COMPARATOR = new Comparator<ImmutableBytesPtr>() {\n\n @Override\n public int compare(ImmutableBytesPtr o1, ImmutableBytesPtr o2) {\n return Bytes.compareTo(o1.get(), o1.getOffset(), o1.getLength(), o2.get(), o2.getOffset(), o2.getLength());\n }\n \n }",
"modifier": "public static final",
"original_string": "public static final Comparator<ImmutableBytesPtr> BYTES_PTR_COMPARATOR = new Comparator<ImmutableBytesPtr>() {\n\n @Override\n public int compare(ImmutableBytesPtr o1, ImmutableBytesPtr o2) {\n return Bytes.compareTo(o1.get(), o1.getOffset(), o1.getLength(), o2.get(), o2.getOffset(), o2.getLength());\n }\n \n };",
"type": "Comparator<ImmutableBytesPtr>",
"var_name": "BYTES_PTR_COMPARATOR"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/ByteUtil.java",
"identifier": "ByteUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteUtil.toBytes(byte[][] byteArrays)",
"constructor": false,
"full_signature": "public static byte[] toBytes(byte[][] byteArrays)",
"identifier": "toBytes",
"modifiers": "public static",
"parameters": "(byte[][] byteArrays)",
"return": "byte[]",
"signature": "byte[] toBytes(byte[][] byteArrays)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.toByteArrays(byte[] b, int length)",
"constructor": false,
"full_signature": "public static byte[][] toByteArrays(byte[] b, int length)",
"identifier": "toByteArrays",
"modifiers": "public static",
"parameters": "(byte[] b, int length)",
"return": "byte[][]",
"signature": "byte[][] toByteArrays(byte[] b, int length)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.toByteArrays(byte[] b, int offset, int length)",
"constructor": false,
"full_signature": "public static byte[][] toByteArrays(byte[] b, int offset, int length)",
"identifier": "toByteArrays",
"modifiers": "public static",
"parameters": "(byte[] b, int offset, int length)",
"return": "byte[][]",
"signature": "byte[][] toByteArrays(byte[] b, int offset, int length)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.serializeVIntArray(int[] intArray)",
"constructor": false,
"full_signature": "public static byte[] serializeVIntArray(int[] intArray)",
"identifier": "serializeVIntArray",
"modifiers": "public static",
"parameters": "(int[] intArray)",
"return": "byte[]",
"signature": "byte[] serializeVIntArray(int[] intArray)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.serializeVIntArray(int[] intArray, int encodedLength)",
"constructor": false,
"full_signature": "public static byte[] serializeVIntArray(int[] intArray, int encodedLength)",
"identifier": "serializeVIntArray",
"modifiers": "public static",
"parameters": "(int[] intArray, int encodedLength)",
"return": "byte[]",
"signature": "byte[] serializeVIntArray(int[] intArray, int encodedLength)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.serializeVIntArray(DataOutput output, int[] intArray)",
"constructor": false,
"full_signature": "public static void serializeVIntArray(DataOutput output, int[] intArray)",
"identifier": "serializeVIntArray",
"modifiers": "public static",
"parameters": "(DataOutput output, int[] intArray)",
"return": "void",
"signature": "void serializeVIntArray(DataOutput output, int[] intArray)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.serializeVIntArray(DataOutput output, int[] intArray, int encodedLength)",
"constructor": false,
"full_signature": "public static void serializeVIntArray(DataOutput output, int[] intArray, int encodedLength)",
"identifier": "serializeVIntArray",
"modifiers": "public static",
"parameters": "(DataOutput output, int[] intArray, int encodedLength)",
"return": "void",
"signature": "void serializeVIntArray(DataOutput output, int[] intArray, int encodedLength)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.readFixedLengthLongArray(DataInput input, int length)",
"constructor": false,
"full_signature": "public static long[] readFixedLengthLongArray(DataInput input, int length)",
"identifier": "readFixedLengthLongArray",
"modifiers": "public static",
"parameters": "(DataInput input, int length)",
"return": "long[]",
"signature": "long[] readFixedLengthLongArray(DataInput input, int length)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.writeFixedLengthLongArray(DataOutput output, long[] longArray)",
"constructor": false,
"full_signature": "public static void writeFixedLengthLongArray(DataOutput output, long[] longArray)",
"identifier": "writeFixedLengthLongArray",
"modifiers": "public static",
"parameters": "(DataOutput output, long[] longArray)",
"return": "void",
"signature": "void writeFixedLengthLongArray(DataOutput output, long[] longArray)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.deserializeVIntArray(byte[] b)",
"constructor": false,
"full_signature": "public static int[] deserializeVIntArray(byte[] b)",
"identifier": "deserializeVIntArray",
"modifiers": "public static",
"parameters": "(byte[] b)",
"return": "int[]",
"signature": "int[] deserializeVIntArray(byte[] b)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.deserializeVIntArray(DataInput in)",
"constructor": false,
"full_signature": "public static int[] deserializeVIntArray(DataInput in)",
"identifier": "deserializeVIntArray",
"modifiers": "public static",
"parameters": "(DataInput in)",
"return": "int[]",
"signature": "int[] deserializeVIntArray(DataInput in)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.deserializeVIntArray(DataInput in, int length)",
"constructor": false,
"full_signature": "public static int[] deserializeVIntArray(DataInput in, int length)",
"identifier": "deserializeVIntArray",
"modifiers": "public static",
"parameters": "(DataInput in, int length)",
"return": "int[]",
"signature": "int[] deserializeVIntArray(DataInput in, int length)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.deserializeVIntArray(byte[] b, int length)",
"constructor": false,
"full_signature": "public static int[] deserializeVIntArray(byte[] b, int length)",
"identifier": "deserializeVIntArray",
"modifiers": "public static",
"parameters": "(byte[] b, int length)",
"return": "int[]",
"signature": "int[] deserializeVIntArray(byte[] b, int length)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.concat(byte[] first, byte[]... rest)",
"constructor": false,
"full_signature": "public static byte[] concat(byte[] first, byte[]... rest)",
"identifier": "concat",
"modifiers": "public static",
"parameters": "(byte[] first, byte[]... rest)",
"return": "byte[]",
"signature": "byte[] concat(byte[] first, byte[]... rest)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.concat(T[] first, T[]... rest)",
"constructor": false,
"full_signature": "public static T[] concat(T[] first, T[]... rest)",
"identifier": "concat",
"modifiers": "public static",
"parameters": "(T[] first, T[]... rest)",
"return": "T[]",
"signature": "T[] concat(T[] first, T[]... rest)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.concat(SortOrder sortOrder, ImmutableBytesWritable... writables)",
"constructor": false,
"full_signature": "public static byte[] concat(SortOrder sortOrder, ImmutableBytesWritable... writables)",
"identifier": "concat",
"modifiers": "public static",
"parameters": "(SortOrder sortOrder, ImmutableBytesWritable... writables)",
"return": "byte[]",
"signature": "byte[] concat(SortOrder sortOrder, ImmutableBytesWritable... writables)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.vintFromBytes(byte[] buffer, int offset)",
"constructor": false,
"full_signature": "public static int vintFromBytes(byte[] buffer, int offset)",
"identifier": "vintFromBytes",
"modifiers": "public static",
"parameters": "(byte[] buffer, int offset)",
"return": "int",
"signature": "int vintFromBytes(byte[] buffer, int offset)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.vintFromBytes(ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static int vintFromBytes(ImmutableBytesWritable ptr)",
"identifier": "vintFromBytes",
"modifiers": "public static",
"parameters": "(ImmutableBytesWritable ptr)",
"return": "int",
"signature": "int vintFromBytes(ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.vlongFromBytes(ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static long vlongFromBytes(ImmutableBytesWritable ptr)",
"identifier": "vlongFromBytes",
"modifiers": "public static",
"parameters": "(ImmutableBytesWritable ptr)",
"return": "long",
"signature": "long vlongFromBytes(ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.vintToBytes(byte[] result, int offset, final long vint)",
"constructor": false,
"full_signature": "public static int vintToBytes(byte[] result, int offset, final long vint)",
"identifier": "vintToBytes",
"modifiers": "public static",
"parameters": "(byte[] result, int offset, final long vint)",
"return": "int",
"signature": "int vintToBytes(byte[] result, int offset, final long vint)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.nextKey(byte[] key)",
"constructor": false,
"full_signature": "public static byte[] nextKey(byte[] key)",
"identifier": "nextKey",
"modifiers": "public static",
"parameters": "(byte[] key)",
"return": "byte[]",
"signature": "byte[] nextKey(byte[] key)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.nextKey(byte[] key, int length)",
"constructor": false,
"full_signature": "public static boolean nextKey(byte[] key, int length)",
"identifier": "nextKey",
"modifiers": "public static",
"parameters": "(byte[] key, int length)",
"return": "boolean",
"signature": "boolean nextKey(byte[] key, int length)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.nextKey(byte[] key, int offset, int length)",
"constructor": false,
"full_signature": "public static boolean nextKey(byte[] key, int offset, int length)",
"identifier": "nextKey",
"modifiers": "public static",
"parameters": "(byte[] key, int offset, int length)",
"return": "boolean",
"signature": "boolean nextKey(byte[] key, int offset, int length)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.previousKey(byte[] key)",
"constructor": false,
"full_signature": "public static byte[] previousKey(byte[] key)",
"identifier": "previousKey",
"modifiers": "public static",
"parameters": "(byte[] key)",
"return": "byte[]",
"signature": "byte[] previousKey(byte[] key)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.previousKey(byte[] key, int length)",
"constructor": false,
"full_signature": "public static boolean previousKey(byte[] key, int length)",
"identifier": "previousKey",
"modifiers": "public static",
"parameters": "(byte[] key, int length)",
"return": "boolean",
"signature": "boolean previousKey(byte[] key, int length)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.previousKey(byte[] key, int offset, int length)",
"constructor": false,
"full_signature": "public static boolean previousKey(byte[] key, int offset, int length)",
"identifier": "previousKey",
"modifiers": "public static",
"parameters": "(byte[] key, int offset, int length)",
"return": "boolean",
"signature": "boolean previousKey(byte[] key, int offset, int length)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.fillKey(byte[] key, int length)",
"constructor": false,
"full_signature": "public static byte[] fillKey(byte[] key, int length)",
"identifier": "fillKey",
"modifiers": "public static",
"parameters": "(byte[] key, int length)",
"return": "byte[]",
"signature": "byte[] fillKey(byte[] key, int length)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.nullPad(ImmutableBytesWritable ptr, int length)",
"constructor": false,
"full_signature": "public static void nullPad(ImmutableBytesWritable ptr, int length)",
"identifier": "nullPad",
"modifiers": "public static",
"parameters": "(ImmutableBytesWritable ptr, int length)",
"return": "void",
"signature": "void nullPad(ImmutableBytesWritable ptr, int length)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.getSize(CharSequence sequence)",
"constructor": false,
"full_signature": "public static int getSize(CharSequence sequence)",
"identifier": "getSize",
"modifiers": "public static",
"parameters": "(CharSequence sequence)",
"return": "int",
"signature": "int getSize(CharSequence sequence)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.isInclusive(CompareOp op)",
"constructor": false,
"full_signature": "public static boolean isInclusive(CompareOp op)",
"identifier": "isInclusive",
"modifiers": "public static",
"parameters": "(CompareOp op)",
"return": "boolean",
"signature": "boolean isInclusive(CompareOp op)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.compare(CompareOp op, int compareResult)",
"constructor": false,
"full_signature": "public static boolean compare(CompareOp op, int compareResult)",
"identifier": "compare",
"modifiers": "public static",
"parameters": "(CompareOp op, int compareResult)",
"return": "boolean",
"signature": "boolean compare(CompareOp op, int compareResult)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.copyKeyBytesIfNecessary(ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static byte[] copyKeyBytesIfNecessary(ImmutableBytesWritable ptr)",
"identifier": "copyKeyBytesIfNecessary",
"modifiers": "public static",
"parameters": "(ImmutableBytesWritable ptr)",
"return": "byte[]",
"signature": "byte[] copyKeyBytesIfNecessary(ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.getKeyRange(byte[] key, CompareOp op, PDataType type)",
"constructor": false,
"full_signature": "public static KeyRange getKeyRange(byte[] key, CompareOp op, PDataType type)",
"identifier": "getKeyRange",
"modifiers": "public static",
"parameters": "(byte[] key, CompareOp op, PDataType type)",
"return": "KeyRange",
"signature": "KeyRange getKeyRange(byte[] key, CompareOp op, PDataType type)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.contains(Collection<byte[]> keys, byte[] key)",
"constructor": false,
"full_signature": "public static boolean contains(Collection<byte[]> keys, byte[] key)",
"identifier": "contains",
"modifiers": "public static",
"parameters": "(Collection<byte[]> keys, byte[] key)",
"return": "boolean",
"signature": "boolean contains(Collection<byte[]> keys, byte[] key)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.contains(List<ImmutableBytesPtr> keys, ImmutableBytesPtr key)",
"constructor": false,
"full_signature": "public static boolean contains(List<ImmutableBytesPtr> keys, ImmutableBytesPtr key)",
"identifier": "contains",
"modifiers": "public static",
"parameters": "(List<ImmutableBytesPtr> keys, ImmutableBytesPtr key)",
"return": "boolean",
"signature": "boolean contains(List<ImmutableBytesPtr> keys, ImmutableBytesPtr key)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.match(Set<byte[]> keys, Set<byte[]> keys2)",
"constructor": false,
"full_signature": "public static boolean match(Set<byte[]> keys, Set<byte[]> keys2)",
"identifier": "match",
"modifiers": "public static",
"parameters": "(Set<byte[]> keys, Set<byte[]> keys2)",
"return": "boolean",
"signature": "boolean match(Set<byte[]> keys, Set<byte[]> keys2)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.calculateTheClosestNextRowKeyForPrefix(byte[] rowKeyPrefix)",
"constructor": false,
"full_signature": "public static byte[] calculateTheClosestNextRowKeyForPrefix(byte[] rowKeyPrefix)",
"identifier": "calculateTheClosestNextRowKeyForPrefix",
"modifiers": "public static",
"parameters": "(byte[] rowKeyPrefix)",
"return": "byte[]",
"signature": "byte[] calculateTheClosestNextRowKeyForPrefix(byte[] rowKeyPrefix)",
"testcase": false
},
{
"class_method_signature": "ByteUtil.splitArrayBySeparator(byte[] src, byte separator)",
"constructor": false,
"full_signature": "public static byte[][] splitArrayBySeparator(byte[] src, byte separator)",
"identifier": "splitArrayBySeparator",
"modifiers": "public static",
"parameters": "(byte[] src, byte separator)",
"return": "byte[][]",
"signature": "byte[][] splitArrayBySeparator(byte[] src, byte separator)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static byte[] toBytes(byte[][] byteArrays) {\n int size = 0;\n for (byte[] b : byteArrays) {\n if (b == null) {\n size++;\n } else {\n size += b.length;\n size += WritableUtils.getVIntSize(b.length);\n }\n }\n TrustedByteArrayOutputStream bytesOut = new TrustedByteArrayOutputStream(size);\n DataOutputStream out = new DataOutputStream(bytesOut);\n try {\n for (byte[] b : byteArrays) {\n if (b == null) {\n WritableUtils.writeVInt(out, 0);\n } else {\n WritableUtils.writeVInt(out, b.length);\n out.write(b);\n }\n }\n } catch (IOException e) {\n throw new RuntimeException(e); // not possible\n } finally {\n try {\n out.close();\n } catch (IOException e) {\n throw new RuntimeException(e); // not possible\n }\n }\n return bytesOut.getBuffer();\n }",
"class_method_signature": "ByteUtil.toBytes(byte[][] byteArrays)",
"constructor": false,
"full_signature": "public static byte[] toBytes(byte[][] byteArrays)",
"identifier": "toBytes",
"invocations": [
"getVIntSize",
"writeVInt",
"writeVInt",
"write",
"close",
"getBuffer"
],
"modifiers": "public static",
"parameters": "(byte[][] byteArrays)",
"return": "byte[]",
"signature": "byte[] toBytes(byte[][] byteArrays)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_172 | {
"fields": [],
"file": "phoenix-core/src/test/java/org/apache/phoenix/schema/RowKeySchemaTest.java",
"identifier": "RowKeySchemaTest",
"interfaces": "",
"superclass": "extends BaseConnectionlessQueryTest"
} | {
"body": "@Test\n public void testClipLeft() throws Exception {\n ImmutableBytesWritable ptr = new ImmutableBytesWritable();\n Connection conn = DriverManager.getConnection(getUrl());\n conn.createStatement().execute(\"CREATE TABLE T1(K1 CHAR(1) NOT NULL, K2 VARCHAR, K3 VARCHAR, CONSTRAINT pk PRIMARY KEY (K1,K2,K3)) \");\n PhoenixConnection pconn = conn.unwrap(PhoenixConnection.class);\n PTable table;\n RowKeySchema schema;\n table = pconn.getTable(new PTableKey(pconn.getTenantId(), \"T1\"));\n schema = table.getRowKeySchema();\n KeyRange r, rLeft, expectedResult;\n r = KeyRange.getKeyRange(getKeyPart(table, \"A\", \"B\", \"C\"), true, getKeyPart(table, \"B\", \"C\"), true);\n rLeft = schema.clipLeft(0, r, 1, ptr);\n expectedResult = KeyRange.getKeyRange(getKeyPart(table, \"A\"), true, getKeyPart(table, \"B\"), true);\n r = KeyRange.getKeyRange(getKeyPart(table, \"A\", \"B\", \"C\"), true, getKeyPart(table, \"B\"), true);\n rLeft = schema.clipLeft(0, r, 1, ptr);\n expectedResult = KeyRange.getKeyRange(getKeyPart(table, \"A\"), true, getKeyPart(table, \"B\"), true);\n assertEquals(expectedResult, rLeft);\n rLeft = schema.clipLeft(0, r, 2, ptr);\n expectedResult = KeyRange.getKeyRange(getKeyPart(table, \"A\", \"B\"), true, getKeyPart(table, \"B\"), true);\n assertEquals(expectedResult, rLeft);\n \n r = KeyRange.getKeyRange(getKeyPart(table, \"A\", \"B\", \"C\"), true, KeyRange.UNBOUND, true);\n rLeft = schema.clipLeft(0, r, 2, ptr);\n expectedResult = KeyRange.getKeyRange(getKeyPart(table, \"A\", \"B\"), true, KeyRange.UNBOUND, false);\n assertEquals(expectedResult, rLeft);\n \n r = KeyRange.getKeyRange(KeyRange.UNBOUND, false, getKeyPart(table, \"A\", \"B\", \"C\"), true);\n rLeft = schema.clipLeft(0, r, 2, ptr);\n expectedResult = KeyRange.getKeyRange(KeyRange.UNBOUND, false, getKeyPart(table, \"A\", \"B\"), true);\n assertEquals(expectedResult, rLeft);\n }",
"class_method_signature": "RowKeySchemaTest.testClipLeft()",
"constructor": false,
"full_signature": "@Test public void testClipLeft()",
"identifier": "testClipLeft",
"invocations": [
"getConnection",
"getUrl",
"execute",
"createStatement",
"unwrap",
"getTable",
"getTenantId",
"getRowKeySchema",
"getKeyRange",
"getKeyPart",
"getKeyPart",
"clipLeft",
"getKeyRange",
"getKeyPart",
"getKeyPart",
"getKeyRange",
"getKeyPart",
"getKeyPart",
"clipLeft",
"getKeyRange",
"getKeyPart",
"getKeyPart",
"assertEquals",
"clipLeft",
"getKeyRange",
"getKeyPart",
"getKeyPart",
"assertEquals",
"getKeyRange",
"getKeyPart",
"clipLeft",
"getKeyRange",
"getKeyPart",
"assertEquals",
"getKeyRange",
"getKeyPart",
"clipLeft",
"getKeyRange",
"getKeyPart",
"assertEquals"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testClipLeft()",
"testcase": true
} | {
"fields": [
{
"declarator": "EMPTY_SCHEMA = new RowKeySchema(0,Collections.<Field>emptyList(), true)",
"modifier": "public static final",
"original_string": "public static final RowKeySchema EMPTY_SCHEMA = new RowKeySchema(0,Collections.<Field>emptyList(), true)\n ;",
"type": "RowKeySchema",
"var_name": "EMPTY_SCHEMA"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/schema/RowKeySchema.java",
"identifier": "RowKeySchema",
"interfaces": "",
"methods": [
{
"class_method_signature": "RowKeySchema.RowKeySchema()",
"constructor": true,
"full_signature": "public RowKeySchema()",
"identifier": "RowKeySchema",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " RowKeySchema()",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.RowKeySchema(int minNullable, List<Field> fields, boolean rowKeyOrderOptimizable)",
"constructor": true,
"full_signature": "protected RowKeySchema(int minNullable, List<Field> fields, boolean rowKeyOrderOptimizable)",
"identifier": "RowKeySchema",
"modifiers": "protected",
"parameters": "(int minNullable, List<Field> fields, boolean rowKeyOrderOptimizable)",
"return": "",
"signature": " RowKeySchema(int minNullable, List<Field> fields, boolean rowKeyOrderOptimizable)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.rowKeyOrderOptimizable()",
"constructor": false,
"full_signature": "public boolean rowKeyOrderOptimizable()",
"identifier": "rowKeyOrderOptimizable",
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"signature": "boolean rowKeyOrderOptimizable()",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.getMaxFields()",
"constructor": false,
"full_signature": "public int getMaxFields()",
"identifier": "getMaxFields",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getMaxFields()",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.iterator(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr, int position,int extraColumnSpan)",
"constructor": false,
"full_signature": "@edu.umd.cs.findbugs.annotations.SuppressWarnings( value=\"NP_BOOLEAN_RETURN_NULL\", justification=\"Designed to return null.\") public Boolean iterator(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr, int position,int extraColumnSpan)",
"identifier": "iterator",
"modifiers": "@edu.umd.cs.findbugs.annotations.SuppressWarnings( value=\"NP_BOOLEAN_RETURN_NULL\", justification=\"Designed to return null.\") public",
"parameters": "(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr, int position,int extraColumnSpan)",
"return": "Boolean",
"signature": "Boolean iterator(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr, int position,int extraColumnSpan)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.iterator(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr, int position)",
"constructor": false,
"full_signature": "public Boolean iterator(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr, int position)",
"identifier": "iterator",
"modifiers": "public",
"parameters": "(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr, int position)",
"return": "Boolean",
"signature": "Boolean iterator(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr, int position)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.iterator(ImmutableBytesWritable srcPtr, ImmutableBytesWritable ptr, int position)",
"constructor": false,
"full_signature": "public Boolean iterator(ImmutableBytesWritable srcPtr, ImmutableBytesWritable ptr, int position)",
"identifier": "iterator",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable srcPtr, ImmutableBytesWritable ptr, int position)",
"return": "Boolean",
"signature": "Boolean iterator(ImmutableBytesWritable srcPtr, ImmutableBytesWritable ptr, int position)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.iterator(byte[] src, ImmutableBytesWritable ptr, int position)",
"constructor": false,
"full_signature": "public Boolean iterator(byte[] src, ImmutableBytesWritable ptr, int position)",
"identifier": "iterator",
"modifiers": "public",
"parameters": "(byte[] src, ImmutableBytesWritable ptr, int position)",
"return": "Boolean",
"signature": "Boolean iterator(byte[] src, ImmutableBytesWritable ptr, int position)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.iterator(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public int iterator(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr)",
"identifier": "iterator",
"modifiers": "public",
"parameters": "(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr)",
"return": "int",
"signature": "int iterator(byte[] src, int srcOffset, int srcLength, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.iterator(byte[] src, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public int iterator(byte[] src, ImmutableBytesWritable ptr)",
"identifier": "iterator",
"modifiers": "public",
"parameters": "(byte[] src, ImmutableBytesWritable ptr)",
"return": "int",
"signature": "int iterator(byte[] src, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.iterator(ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public int iterator(ImmutableBytesWritable ptr)",
"identifier": "iterator",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr)",
"return": "int",
"signature": "int iterator(ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.next(ImmutableBytesWritable ptr, int position, int maxOffset)",
"constructor": false,
"full_signature": "public Boolean next(ImmutableBytesWritable ptr, int position, int maxOffset)",
"identifier": "next",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, int position, int maxOffset)",
"return": "Boolean",
"signature": "Boolean next(ImmutableBytesWritable ptr, int position, int maxOffset)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.next(ImmutableBytesWritable ptr, int position, int maxOffset, boolean isFirst)",
"constructor": false,
"full_signature": "@edu.umd.cs.findbugs.annotations.SuppressWarnings( value=\"NP_BOOLEAN_RETURN_NULL\", justification=\"Designed to return null.\") private Boolean next(ImmutableBytesWritable ptr, int position, int maxOffset, boolean isFirst)",
"identifier": "next",
"modifiers": "@edu.umd.cs.findbugs.annotations.SuppressWarnings( value=\"NP_BOOLEAN_RETURN_NULL\", justification=\"Designed to return null.\") private",
"parameters": "(ImmutableBytesWritable ptr, int position, int maxOffset, boolean isFirst)",
"return": "Boolean",
"signature": "Boolean next(ImmutableBytesWritable ptr, int position, int maxOffset, boolean isFirst)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.next(ImmutableBytesWritable ptr, int position, int maxOffset, int extraSpan)",
"constructor": false,
"full_signature": "public int next(ImmutableBytesWritable ptr, int position, int maxOffset, int extraSpan)",
"identifier": "next",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, int position, int maxOffset, int extraSpan)",
"return": "int",
"signature": "int next(ImmutableBytesWritable ptr, int position, int maxOffset, int extraSpan)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.previous(ImmutableBytesWritable ptr, int position, int minOffset)",
"constructor": false,
"full_signature": "@edu.umd.cs.findbugs.annotations.SuppressWarnings( value=\"NP_BOOLEAN_RETURN_NULL\", justification=\"Designed to return null.\") public Boolean previous(ImmutableBytesWritable ptr, int position, int minOffset)",
"identifier": "previous",
"modifiers": "@edu.umd.cs.findbugs.annotations.SuppressWarnings( value=\"NP_BOOLEAN_RETURN_NULL\", justification=\"Designed to return null.\") public",
"parameters": "(ImmutableBytesWritable ptr, int position, int minOffset)",
"return": "Boolean",
"signature": "Boolean previous(ImmutableBytesWritable ptr, int position, int minOffset)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.reposition(ImmutableBytesWritable ptr, int oldPosition, int newPosition, int minOffset, int maxOffset)",
"constructor": false,
"full_signature": "@edu.umd.cs.findbugs.annotations.SuppressWarnings( value=\"NP_BOOLEAN_RETURN_NULL\", justification=\"Designed to return null.\") public Boolean reposition(ImmutableBytesWritable ptr, int oldPosition, int newPosition, int minOffset, int maxOffset)",
"identifier": "reposition",
"modifiers": "@edu.umd.cs.findbugs.annotations.SuppressWarnings( value=\"NP_BOOLEAN_RETURN_NULL\", justification=\"Designed to return null.\") public",
"parameters": "(ImmutableBytesWritable ptr, int oldPosition, int newPosition, int minOffset, int maxOffset)",
"return": "Boolean",
"signature": "Boolean reposition(ImmutableBytesWritable ptr, int oldPosition, int newPosition, int minOffset, int maxOffset)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.reposition(ImmutableBytesWritable ptr, int oldPosition, int newPosition, int minOffset, int maxOffset, int extraSpan)",
"constructor": false,
"full_signature": "public Boolean reposition(ImmutableBytesWritable ptr, int oldPosition, int newPosition, int minOffset, int maxOffset, int extraSpan)",
"identifier": "reposition",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, int oldPosition, int newPosition, int minOffset, int maxOffset, int extraSpan)",
"return": "Boolean",
"signature": "Boolean reposition(ImmutableBytesWritable ptr, int oldPosition, int newPosition, int minOffset, int maxOffset, int extraSpan)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.position(ImmutableBytesWritable ptr, int position, int endPosition)",
"constructor": false,
"full_signature": "public boolean position(ImmutableBytesWritable ptr, int position, int endPosition)",
"identifier": "position",
"modifiers": "public",
"parameters": "(ImmutableBytesWritable ptr, int position, int endPosition)",
"return": "boolean",
"signature": "boolean position(ImmutableBytesWritable ptr, int position, int endPosition)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.readExtraFields(ImmutableBytesWritable ptr, int position, int maxOffset, int extraSpan)",
"constructor": false,
"full_signature": "private int readExtraFields(ImmutableBytesWritable ptr, int position, int maxOffset, int extraSpan)",
"identifier": "readExtraFields",
"modifiers": "private",
"parameters": "(ImmutableBytesWritable ptr, int position, int maxOffset, int extraSpan)",
"return": "int",
"signature": "int readExtraFields(ImmutableBytesWritable ptr, int position, int maxOffset, int extraSpan)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.computeMaxSpan(int pkPos, KeyRange result, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public int computeMaxSpan(int pkPos, KeyRange result, ImmutableBytesWritable ptr)",
"identifier": "computeMaxSpan",
"modifiers": "public",
"parameters": "(int pkPos, KeyRange result, ImmutableBytesWritable ptr)",
"return": "int",
"signature": "int computeMaxSpan(int pkPos, KeyRange result, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.computeMinSpan(int pkPos, KeyRange keyRange, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public int computeMinSpan(int pkPos, KeyRange keyRange, ImmutableBytesWritable ptr)",
"identifier": "computeMinSpan",
"modifiers": "public",
"parameters": "(int pkPos, KeyRange keyRange, ImmutableBytesWritable ptr)",
"return": "int",
"signature": "int computeMinSpan(int pkPos, KeyRange keyRange, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "RowKeySchema.clipLeft(int pkPos, KeyRange keyRange, int spansToClip, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public KeyRange clipLeft(int pkPos, KeyRange keyRange, int spansToClip, ImmutableBytesWritable ptr)",
"identifier": "clipLeft",
"modifiers": "public",
"parameters": "(int pkPos, KeyRange keyRange, int spansToClip, ImmutableBytesWritable ptr)",
"return": "KeyRange",
"signature": "KeyRange clipLeft(int pkPos, KeyRange keyRange, int spansToClip, ImmutableBytesWritable ptr)",
"testcase": false
}
],
"superclass": "extends ValueSchema"
} | {
"body": "public KeyRange clipLeft(int pkPos, KeyRange keyRange, int spansToClip, ImmutableBytesWritable ptr) {\n if (spansToClip < 0) {\n throw new IllegalArgumentException(\"Cannot specify a negative spansToClip (\" + spansToClip + \")\");\n }\n if (spansToClip == 0) {\n return keyRange;\n }\n byte[] lowerRange = keyRange.getLowerRange();\n if (lowerRange != KeyRange.UNBOUND) {\n ptr.set(lowerRange);\n this.position(ptr, pkPos, pkPos+spansToClip-1);\n ptr.set(lowerRange, 0, ptr.getOffset() + ptr.getLength());\n lowerRange = ByteUtil.copyKeyBytesIfNecessary(ptr);\n }\n byte[] upperRange = keyRange.getUpperRange();\n if (upperRange != KeyRange.UNBOUND) {\n ptr.set(upperRange);\n this.position(ptr, pkPos, pkPos+spansToClip-1);\n ptr.set(upperRange, 0, ptr.getOffset() + ptr.getLength());\n upperRange = ByteUtil.copyKeyBytesIfNecessary(ptr);\n }\n //Have to update the bounds to inclusive\n //Consider a partial key on pk columns (INT A, INT B, ....) and a predicate (A,B) > (3,5)\n //This initial key as a row key would look like (x0305 - *]\n //If we were to clip the left to (x03 - *], we would skip values like (3,6)\n return KeyRange.getKeyRange(lowerRange, true, upperRange, true);\n }",
"class_method_signature": "RowKeySchema.clipLeft(int pkPos, KeyRange keyRange, int spansToClip, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public KeyRange clipLeft(int pkPos, KeyRange keyRange, int spansToClip, ImmutableBytesWritable ptr)",
"identifier": "clipLeft",
"invocations": [
"getLowerRange",
"set",
"position",
"set",
"getOffset",
"getLength",
"copyKeyBytesIfNecessary",
"getUpperRange",
"set",
"position",
"set",
"getOffset",
"getLength",
"copyKeyBytesIfNecessary",
"getKeyRange"
],
"modifiers": "public",
"parameters": "(int pkPos, KeyRange keyRange, int spansToClip, ImmutableBytesWritable ptr)",
"return": "KeyRange",
"signature": "KeyRange clipLeft(int pkPos, KeyRange keyRange, int spansToClip, ImmutableBytesWritable ptr)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
20473418_88 | {
"fields": [
{
"declarator": "ROW = Bytes.toBytes(\"row\")",
"modifier": "private static final",
"original_string": "private static final byte[] ROW = Bytes.toBytes(\"row\");",
"type": "byte[]",
"var_name": "ROW"
},
{
"declarator": "QUALIFIER = Bytes.toBytes(\"qual\")",
"modifier": "private static final",
"original_string": "private static final byte[] QUALIFIER = Bytes.toBytes(\"qual\");",
"type": "byte[]",
"var_name": "QUALIFIER"
},
{
"declarator": "ORIGINAL_VALUE = Bytes.toBytes(\"generic-value\")",
"modifier": "private static final",
"original_string": "private static final byte[] ORIGINAL_VALUE = Bytes.toBytes(\"generic-value\");",
"type": "byte[]",
"var_name": "ORIGINAL_VALUE"
},
{
"declarator": "DUMMY_TAGS = Bytes.toBytes(\"tags\")",
"modifier": "private static final",
"original_string": "private static final byte[] DUMMY_TAGS = Bytes.toBytes(\"tags\");",
"type": "byte[]",
"var_name": "DUMMY_TAGS"
},
{
"declarator": "mockBuilder = Mockito.mock(ExtendedCellBuilder.class)",
"modifier": "private final",
"original_string": "private final ExtendedCellBuilder mockBuilder = Mockito.mock(ExtendedCellBuilder.class);",
"type": "ExtendedCellBuilder",
"var_name": "mockBuilder"
},
{
"declarator": "mockCellWithTags = Mockito.mock(ExtendedCell.class)",
"modifier": "private final",
"original_string": "private final ExtendedCell mockCellWithTags = Mockito.mock(ExtendedCell.class);",
"type": "ExtendedCell",
"var_name": "mockCellWithTags"
}
],
"file": "phoenix-core/src/test/java/org/apache/phoenix/util/MetaDataUtilTest.java",
"identifier": "MetaDataUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMutatingAPut() throws Exception {\n Put put = generateOriginalPut();\n byte[] newValue = Bytes.toBytes(\"new-value\");\n Cell cell = put.get(TABLE_FAMILY_BYTES, QUALIFIER).get(0);\n assertEquals(Bytes.toString(ORIGINAL_VALUE),\n Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength()));\n MetaDataUtil.mutatePutValue(put, TABLE_FAMILY_BYTES, QUALIFIER, newValue);\n cell = put.get(TABLE_FAMILY_BYTES, QUALIFIER).get(0);\n assertEquals(Bytes.toString(newValue),\n Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength()));\n }",
"class_method_signature": "MetaDataUtilTest.testMutatingAPut()",
"constructor": false,
"full_signature": "@Test public void testMutatingAPut()",
"identifier": "testMutatingAPut",
"invocations": [
"generateOriginalPut",
"toBytes",
"get",
"get",
"assertEquals",
"toString",
"toString",
"getValueArray",
"getValueOffset",
"getValueLength",
"mutatePutValue",
"get",
"get",
"assertEquals",
"toString",
"toString",
"getValueArray",
"getValueOffset",
"getValueLength"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testMutatingAPut()",
"testcase": true
} | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MetaDataUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataUtil.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
"declarator": "VIEW_INDEX_TABLE_PREFIX = \"_IDX_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_TABLE_PREFIX = \"_IDX_\";",
"type": "String",
"var_name": "VIEW_INDEX_TABLE_PREFIX"
},
{
"declarator": "LOCAL_INDEX_TABLE_PREFIX = \"_LOCAL_IDX_\"",
"modifier": "public static final",
"original_string": "public static final String LOCAL_INDEX_TABLE_PREFIX = \"_LOCAL_IDX_\";",
"type": "String",
"var_name": "LOCAL_INDEX_TABLE_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_PREFIX = \"_SEQ_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_SEQUENCE_PREFIX = \"_SEQ_\";",
"type": "String",
"var_name": "VIEW_INDEX_SEQUENCE_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_NAME_PREFIX = \"_ID_\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_SEQUENCE_NAME_PREFIX = \"_ID_\";",
"type": "String",
"var_name": "VIEW_INDEX_SEQUENCE_NAME_PREFIX"
},
{
"declarator": "VIEW_INDEX_SEQUENCE_PREFIX_BYTES = Bytes.toBytes(VIEW_INDEX_SEQUENCE_PREFIX)",
"modifier": "public static final",
"original_string": "public static final byte[] VIEW_INDEX_SEQUENCE_PREFIX_BYTES = Bytes.toBytes(VIEW_INDEX_SEQUENCE_PREFIX);",
"type": "byte[]",
"var_name": "VIEW_INDEX_SEQUENCE_PREFIX_BYTES"
},
{
"declarator": "VIEW_INDEX_ID_COLUMN_NAME = \"_INDEX_ID\"",
"modifier": "public static final",
"original_string": "public static final String VIEW_INDEX_ID_COLUMN_NAME = \"_INDEX_ID\";",
"type": "String",
"var_name": "VIEW_INDEX_ID_COLUMN_NAME"
},
{
"declarator": "PARENT_TABLE_KEY = \"PARENT_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String PARENT_TABLE_KEY = \"PARENT_TABLE\";",
"type": "String",
"var_name": "PARENT_TABLE_KEY"
},
{
"declarator": "IS_VIEW_INDEX_TABLE_PROP_NAME = \"IS_VIEW_INDEX_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String IS_VIEW_INDEX_TABLE_PROP_NAME = \"IS_VIEW_INDEX_TABLE\";",
"type": "String",
"var_name": "IS_VIEW_INDEX_TABLE_PROP_NAME"
},
{
"declarator": "IS_VIEW_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_VIEW_INDEX_TABLE_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] IS_VIEW_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_VIEW_INDEX_TABLE_PROP_NAME);",
"type": "byte[]",
"var_name": "IS_VIEW_INDEX_TABLE_PROP_BYTES"
},
{
"declarator": "IS_LOCAL_INDEX_TABLE_PROP_NAME = \"IS_LOCAL_INDEX_TABLE\"",
"modifier": "public static final",
"original_string": "public static final String IS_LOCAL_INDEX_TABLE_PROP_NAME = \"IS_LOCAL_INDEX_TABLE\";",
"type": "String",
"var_name": "IS_LOCAL_INDEX_TABLE_PROP_NAME"
},
{
"declarator": "IS_LOCAL_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_LOCAL_INDEX_TABLE_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] IS_LOCAL_INDEX_TABLE_PROP_BYTES = Bytes.toBytes(IS_LOCAL_INDEX_TABLE_PROP_NAME);",
"type": "byte[]",
"var_name": "IS_LOCAL_INDEX_TABLE_PROP_BYTES"
},
{
"declarator": "DATA_TABLE_NAME_PROP_NAME = \"DATA_TABLE_NAME\"",
"modifier": "public static final",
"original_string": "public static final String DATA_TABLE_NAME_PROP_NAME = \"DATA_TABLE_NAME\";",
"type": "String",
"var_name": "DATA_TABLE_NAME_PROP_NAME"
},
{
"declarator": "DATA_TABLE_NAME_PROP_BYTES = Bytes.toBytes(DATA_TABLE_NAME_PROP_NAME)",
"modifier": "public static final",
"original_string": "public static final byte[] DATA_TABLE_NAME_PROP_BYTES = Bytes.toBytes(DATA_TABLE_NAME_PROP_NAME);",
"type": "byte[]",
"var_name": "DATA_TABLE_NAME_PROP_BYTES"
},
{
"declarator": "SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES = ImmutableList.of(\n ColumnFamilyDescriptorBuilder.TTL,\n ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS,\n ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE)",
"modifier": "public static final",
"original_string": "public static final List<String> SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES = ImmutableList.of(\n ColumnFamilyDescriptorBuilder.TTL,\n ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS,\n ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE);",
"type": "List<String>",
"var_name": "SYNCED_DATA_TABLE_AND_INDEX_COL_FAM_PROPERTIES"
}
],
"file": "phoenix-core/src/main/java/org/apache/phoenix/util/MetaDataUtil.java",
"identifier": "MetaDataUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "MetaDataUtil.areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"constructor": false,
"full_signature": "public static ClientServerCompatibility areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"identifier": "areClientAndServerCompatible",
"modifiers": "public static",
"parameters": "(long serverHBaseAndPhoenixVersion)",
"return": "ClientServerCompatibility",
"signature": "ClientServerCompatibility areClientAndServerCompatible(long serverHBaseAndPhoenixVersion)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"constructor": false,
"full_signature": "@VisibleForTesting static ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"identifier": "areClientAndServerCompatible",
"modifiers": "@VisibleForTesting static",
"parameters": "(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"return": "ClientServerCompatibility",
"signature": "ClientServerCompatibility areClientAndServerCompatible(int serverVersion, int clientMajorVersion, int clientMinorVersion)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodePhoenixVersion(long version)",
"constructor": false,
"full_signature": "public static int decodePhoenixVersion(long version)",
"identifier": "decodePhoenixVersion",
"modifiers": "public static",
"parameters": "(long version)",
"return": "int",
"signature": "int decodePhoenixVersion(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.encodeHasIndexWALCodec(long version, boolean isValid)",
"constructor": false,
"full_signature": "public static long encodeHasIndexWALCodec(long version, boolean isValid)",
"identifier": "encodeHasIndexWALCodec",
"modifiers": "public static",
"parameters": "(long version, boolean isValid)",
"return": "long",
"signature": "long encodeHasIndexWALCodec(long version, boolean isValid)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHasIndexWALCodec(long version)",
"constructor": false,
"full_signature": "public static boolean decodeHasIndexWALCodec(long version)",
"identifier": "decodeHasIndexWALCodec",
"modifiers": "public static",
"parameters": "(long version)",
"return": "boolean",
"signature": "boolean decodeHasIndexWALCodec(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHBaseVersion(long version)",
"constructor": false,
"full_signature": "public static int decodeHBaseVersion(long version)",
"identifier": "decodeHBaseVersion",
"modifiers": "public static",
"parameters": "(long version)",
"return": "int",
"signature": "int decodeHBaseVersion(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeHBaseVersionAsString(int version)",
"constructor": false,
"full_signature": "public static String decodeHBaseVersionAsString(int version)",
"identifier": "decodeHBaseVersionAsString",
"modifiers": "public static",
"parameters": "(int version)",
"return": "String",
"signature": "String decodeHBaseVersionAsString(int version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.decodeTableNamespaceMappingEnabled(long version)",
"constructor": false,
"full_signature": "public static boolean decodeTableNamespaceMappingEnabled(long version)",
"identifier": "decodeTableNamespaceMappingEnabled",
"modifiers": "public static",
"parameters": "(long version)",
"return": "boolean",
"signature": "boolean decodeTableNamespaceMappingEnabled(long version)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.encodeVersion(String hbaseVersionStr, Configuration config)",
"constructor": false,
"full_signature": "public static long encodeVersion(String hbaseVersionStr, Configuration config)",
"identifier": "encodeVersion",
"modifiers": "public static",
"parameters": "(String hbaseVersionStr, Configuration config)",
"return": "long",
"signature": "long encodeVersion(String hbaseVersionStr, Configuration config)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(Mutation someRow)",
"constructor": false,
"full_signature": "public static byte[] getTenantIdAndSchemaAndTableName(Mutation someRow)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(Mutation someRow)",
"return": "byte[]",
"signature": "byte[] getTenantIdAndSchemaAndTableName(Mutation someRow)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(Result result)",
"constructor": false,
"full_signature": "public static byte[] getTenantIdAndSchemaAndTableName(Result result)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(Result result)",
"return": "byte[]",
"signature": "byte[] getTenantIdAndSchemaAndTableName(Result result)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"constructor": false,
"full_signature": "public static void getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"identifier": "getTenantIdAndSchemaAndTableName",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"return": "void",
"signature": "void getTenantIdAndSchemaAndTableName(List<Mutation> tableMetadata, byte[][] rowKeyMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getBaseColumnCount(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static int getBaseColumnCount(List<Mutation> tableMetadata)",
"identifier": "getBaseColumnCount",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "int",
"signature": "int getBaseColumnCount(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"constructor": false,
"full_signature": "public static void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"identifier": "mutatePutValue",
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"return": "void",
"signature": "void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"constructor": false,
"full_signature": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"identifier": "conditionallyAddTagsToPutCells",
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"return": "void",
"signature": "void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"constructor": false,
"full_signature": "public static Put cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"identifier": "cloneDeleteToPutAndAddColumn",
"modifiers": "public static",
"parameters": "(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"return": "Put",
"signature": "Put cloneDeleteToPutAndAddColumn(Delete delete, byte[] family, byte[] qualifier, byte[] value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"constructor": false,
"full_signature": "public static void getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"identifier": "getTenantIdAndFunctionName",
"modifiers": "public static",
"parameters": "(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"return": "void",
"signature": "void getTenantIdAndFunctionName(List<Mutation> functionMetadata, byte[][] rowKeyMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentTableName(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static byte[] getParentTableName(List<Mutation> tableMetadata)",
"identifier": "getParentTableName",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "byte[]",
"signature": "byte[] getParentTableName(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSequenceNumber(Mutation tableMutation)",
"constructor": false,
"full_signature": "public static long getSequenceNumber(Mutation tableMutation)",
"identifier": "getSequenceNumber",
"modifiers": "public static",
"parameters": "(Mutation tableMutation)",
"return": "long",
"signature": "long getSequenceNumber(Mutation tableMutation)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSequenceNumber(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static long getSequenceNumber(List<Mutation> tableMetaData)",
"identifier": "getSequenceNumber",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "long",
"signature": "long getSequenceNumber(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static PTableType getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getTableType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "PTableType",
"signature": "PTableType getTableType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static boolean isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "isNameSpaceMapped",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "boolean",
"signature": "boolean isNameSpaceMapped(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static int getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getSaltBuckets",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "int",
"signature": "int getSaltBuckets(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentSequenceNumber(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static long getParentSequenceNumber(List<Mutation> tableMetaData)",
"identifier": "getParentSequenceNumber",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "long",
"signature": "long getParentSequenceNumber(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Mutation getTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Mutation",
"signature": "Mutation getTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "getMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"constructor": false,
"full_signature": "public static KeyValue getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"identifier": "getMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"return": "KeyValue",
"signature": "KeyValue getMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"constructor": false,
"full_signature": "public static boolean setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"identifier": "setMutationValue",
"modifiers": "public static",
"parameters": "(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"return": "boolean",
"signature": "boolean setMutationValue(Mutation headerRow, byte[] key,\n KeyValueBuilder builder, KeyValue keyValue)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Put getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getPutOnlyTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Put",
"signature": "Put getPutOnlyTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Put getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"identifier": "getPutOnlyAutoPartitionColumn",
"modifiers": "public static",
"parameters": "(PTable parentTable, List<Mutation> tableMetaData)",
"return": "Put",
"signature": "Put getPutOnlyAutoPartitionColumn(PTable parentTable, List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentTableHeaderRow(List<Mutation> tableMetaData)",
"constructor": false,
"full_signature": "public static Mutation getParentTableHeaderRow(List<Mutation> tableMetaData)",
"identifier": "getParentTableHeaderRow",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData)",
"return": "Mutation",
"signature": "Mutation getParentTableHeaderRow(List<Mutation> tableMetaData)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getClientTimeStamp(List<Mutation> tableMetadata)",
"constructor": false,
"full_signature": "public static long getClientTimeStamp(List<Mutation> tableMetadata)",
"identifier": "getClientTimeStamp",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetadata)",
"return": "long",
"signature": "long getClientTimeStamp(List<Mutation> tableMetadata)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getClientTimeStamp(Mutation m)",
"constructor": false,
"full_signature": "public static long getClientTimeStamp(Mutation m)",
"identifier": "getClientTimeStamp",
"modifiers": "public static",
"parameters": "(Mutation m)",
"return": "long",
"signature": "long getClientTimeStamp(Mutation m)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"constructor": false,
"full_signature": "public static byte[] getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"identifier": "getParentLinkKey",
"modifiers": "public static",
"parameters": "(String tenantId, String schemaName, String tableName, String indexName)",
"return": "byte[]",
"signature": "byte[] getParentLinkKey(String tenantId, String schemaName, String tableName, String indexName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"constructor": false,
"full_signature": "public static byte[] getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"identifier": "getParentLinkKey",
"modifiers": "public static",
"parameters": "(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"return": "byte[]",
"signature": "byte[] getParentLinkKey(byte[] tenantId, byte[] schemaName, byte[] tableName, byte[] indexName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"constructor": false,
"full_signature": "public static byte[] getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"identifier": "getChildLinkKey",
"modifiers": "public static",
"parameters": "(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"return": "byte[]",
"signature": "byte[] getChildLinkKey(PName parentTenantId, PName parentSchemaName, PName parentTableName, PName viewTenantId, PName viewName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getCell(List<Cell> cells, byte[] cq)",
"constructor": false,
"full_signature": "public static Cell getCell(List<Cell> cells, byte[] cq)",
"identifier": "getCell",
"modifiers": "public static",
"parameters": "(List<Cell> cells, byte[] cq)",
"return": "Cell",
"signature": "Cell getCell(List<Cell> cells, byte[] cq)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isMultiTenant",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isMultiTenant(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isTransactional",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isTransactional(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"constructor": false,
"full_signature": "public static boolean isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"identifier": "isSalted",
"modifiers": "public static",
"parameters": "(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"return": "boolean",
"signature": "boolean isSalted(Mutation m, KeyValueBuilder builder, ImmutableBytesWritable ptr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexPhysicalName(byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static byte[] getViewIndexPhysicalName(byte[] physicalTableName)",
"identifier": "getViewIndexPhysicalName",
"modifiers": "public static",
"parameters": "(byte[] physicalTableName)",
"return": "byte[]",
"signature": "byte[] getViewIndexPhysicalName(byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexPhysicalName(String physicalTableName)",
"constructor": false,
"full_signature": "public static String getViewIndexPhysicalName(String physicalTableName)",
"identifier": "getViewIndexPhysicalName",
"modifiers": "public static",
"parameters": "(String physicalTableName)",
"return": "String",
"signature": "String getViewIndexPhysicalName(String physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"constructor": false,
"full_signature": "private static byte[] getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"identifier": "getIndexPhysicalName",
"modifiers": "private static",
"parameters": "(byte[] physicalTableName, String indexPrefix)",
"return": "byte[]",
"signature": "byte[] getIndexPhysicalName(byte[] physicalTableName, String indexPrefix)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"constructor": false,
"full_signature": "private static String getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"identifier": "getIndexPhysicalName",
"modifiers": "private static",
"parameters": "(String physicalTableName, String indexPrefix)",
"return": "String",
"signature": "String getIndexPhysicalName(String physicalTableName, String indexPrefix)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexPhysicalName(byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static byte[] getLocalIndexPhysicalName(byte[] physicalTableName)",
"identifier": "getLocalIndexPhysicalName",
"modifiers": "public static",
"parameters": "(byte[] physicalTableName)",
"return": "byte[]",
"signature": "byte[] getLocalIndexPhysicalName(byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexTableName(String tableName)",
"constructor": false,
"full_signature": "public static String getLocalIndexTableName(String tableName)",
"identifier": "getLocalIndexTableName",
"modifiers": "public static",
"parameters": "(String tableName)",
"return": "String",
"signature": "String getLocalIndexTableName(String tableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexSchemaName(String schemaName)",
"constructor": false,
"full_signature": "public static String getLocalIndexSchemaName(String schemaName)",
"identifier": "getLocalIndexSchemaName",
"modifiers": "public static",
"parameters": "(String schemaName)",
"return": "String",
"signature": "String getLocalIndexSchemaName(String schemaName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexUserTableName(String localIndexTableName)",
"constructor": false,
"full_signature": "public static String getLocalIndexUserTableName(String localIndexTableName)",
"identifier": "getLocalIndexUserTableName",
"modifiers": "public static",
"parameters": "(String localIndexTableName)",
"return": "String",
"signature": "String getLocalIndexUserTableName(String localIndexTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexUserTableName(String viewIndexTableName)",
"constructor": false,
"full_signature": "public static String getViewIndexUserTableName(String viewIndexTableName)",
"identifier": "getViewIndexUserTableName",
"modifiers": "public static",
"parameters": "(String viewIndexTableName)",
"return": "String",
"signature": "String getViewIndexUserTableName(String viewIndexTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceSchemaName",
"modifiers": "public static",
"parameters": "(PName physicalName, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getOldViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceName",
"modifiers": "public static",
"parameters": "(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getOldViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static SequenceKey getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"identifier": "getOldViewIndexSequenceKey",
"modifiers": "public static",
"parameters": "(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"return": "SequenceKey",
"signature": "SequenceKey getOldViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceSchemaName",
"modifiers": "public static",
"parameters": "(PName physicalName, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getViewIndexSequenceSchemaName(PName physicalName, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static String getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceName",
"modifiers": "public static",
"parameters": "(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"return": "String",
"signature": "String getViewIndexSequenceName(PName physicalName, PName tenantId, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static SequenceKey getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"identifier": "getViewIndexSequenceKey",
"modifiers": "public static",
"parameters": "(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"return": "SequenceKey",
"signature": "SequenceKey getViewIndexSequenceKey(String tenantId, PName physicalName, int nSaltBuckets,\n boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexIdDataType()",
"constructor": false,
"full_signature": "public static PDataType getViewIndexIdDataType()",
"identifier": "getViewIndexIdDataType",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getViewIndexIdDataType()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLegacyViewIndexIdDataType()",
"constructor": false,
"full_signature": "public static PDataType getLegacyViewIndexIdDataType()",
"identifier": "getLegacyViewIndexIdDataType",
"modifiers": "public static",
"parameters": "()",
"return": "PDataType",
"signature": "PDataType getLegacyViewIndexIdDataType()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getViewIndexIdColumnName()",
"constructor": false,
"full_signature": "public static String getViewIndexIdColumnName()",
"identifier": "getViewIndexIdColumnName",
"modifiers": "public static",
"parameters": "()",
"return": "String",
"signature": "String getViewIndexIdColumnName()",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"constructor": false,
"full_signature": "public static boolean hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"identifier": "hasViewIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName physicalName)",
"return": "boolean",
"signature": "boolean hasViewIndexTable(PhoenixConnection connection, PName physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static boolean hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"identifier": "hasViewIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, byte[] physicalTableName)",
"return": "boolean",
"signature": "boolean hasViewIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"identifier": "hasLocalIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName physicalName)",
"return": "boolean",
"signature": "boolean hasLocalIndexTable(PhoenixConnection connection, PName physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"identifier": "hasLocalIndexTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, byte[] physicalTableName)",
"return": "boolean",
"signature": "boolean hasLocalIndexTable(PhoenixConnection connection, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.hasLocalIndexColumnFamily(TableDescriptor desc)",
"constructor": false,
"full_signature": "public static boolean hasLocalIndexColumnFamily(TableDescriptor desc)",
"identifier": "hasLocalIndexColumnFamily",
"modifiers": "public static",
"parameters": "(TableDescriptor desc)",
"return": "boolean",
"signature": "boolean hasLocalIndexColumnFamily(TableDescriptor desc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"constructor": false,
"full_signature": "public static List<byte[]> getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"identifier": "getNonLocalIndexColumnFamilies",
"modifiers": "public static",
"parameters": "(TableDescriptor desc)",
"return": "List<byte[]>",
"signature": "List<byte[]> getNonLocalIndexColumnFamilies(TableDescriptor desc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"constructor": false,
"full_signature": "public static List<byte[]> getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"identifier": "getLocalIndexColumnFamilies",
"modifiers": "public static",
"parameters": "(PhoenixConnection conn, byte[] physicalTableName)",
"return": "List<byte[]>",
"signature": "List<byte[]> getLocalIndexColumnFamilies(PhoenixConnection conn, byte[] physicalTableName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"constructor": false,
"full_signature": "public static void deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"identifier": "deleteViewIndexSequences",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"return": "void",
"signature": "void deleteViewIndexSequences(PhoenixConnection connection, PName name, boolean isNamespaceMapped)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.tableRegionsOnline(Configuration conf, PTable table)",
"constructor": false,
"full_signature": "public static boolean tableRegionsOnline(Configuration conf, PTable table)",
"identifier": "tableRegionsOnline",
"modifiers": "public static",
"parameters": "(Configuration conf, PTable table)",
"return": "boolean",
"signature": "boolean tableRegionsOnline(Configuration conf, PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.propertyNotAllowedToBeOutOfSync(String colFamProp)",
"constructor": false,
"full_signature": "public static boolean propertyNotAllowedToBeOutOfSync(String colFamProp)",
"identifier": "propertyNotAllowedToBeOutOfSync",
"modifiers": "public static",
"parameters": "(String colFamProp)",
"return": "boolean",
"signature": "boolean propertyNotAllowedToBeOutOfSync(String colFamProp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"constructor": false,
"full_signature": "public static Map<String, Object> getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"identifier": "getSyncedProps",
"modifiers": "public static",
"parameters": "(ColumnFamilyDescriptor defaultCFDesc)",
"return": "Map<String, Object>",
"signature": "Map<String, Object> getSyncedProps(ColumnFamilyDescriptor defaultCFDesc)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"constructor": false,
"full_signature": "public static Scan newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"identifier": "newTableRowsScan",
"modifiers": "public static",
"parameters": "(byte[] key, long startTimeStamp, long stopTimeStamp)",
"return": "Scan",
"signature": "Scan newTableRowsScan(byte[] key, long startTimeStamp, long stopTimeStamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"constructor": false,
"full_signature": "public static Scan newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"identifier": "newTableRowsScan",
"modifiers": "public static",
"parameters": "(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"return": "Scan",
"signature": "Scan newTableRowsScan(byte[] startKey, byte[] stopKey, long startTimeStamp, long stopTimeStamp)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLinkType(Mutation tableMutation)",
"constructor": false,
"full_signature": "public static LinkType getLinkType(Mutation tableMutation)",
"identifier": "getLinkType",
"modifiers": "public static",
"parameters": "(Mutation tableMutation)",
"return": "LinkType",
"signature": "LinkType getLinkType(Mutation tableMutation)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getLinkType(Collection<Cell> kvs)",
"constructor": false,
"full_signature": "public static LinkType getLinkType(Collection<Cell> kvs)",
"identifier": "getLinkType",
"modifiers": "public static",
"parameters": "(Collection<Cell> kvs)",
"return": "LinkType",
"signature": "LinkType getLinkType(Collection<Cell> kvs)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndex(String physicalName)",
"constructor": false,
"full_signature": "public static boolean isLocalIndex(String physicalName)",
"identifier": "isLocalIndex",
"modifiers": "public static",
"parameters": "(String physicalName)",
"return": "boolean",
"signature": "boolean isLocalIndex(String physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isViewIndex(String physicalName)",
"constructor": false,
"full_signature": "public static boolean isViewIndex(String physicalName)",
"identifier": "isViewIndex",
"modifiers": "public static",
"parameters": "(String physicalName)",
"return": "boolean",
"signature": "boolean isViewIndex(String physicalName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getAutoPartitionColumnName(PTable parentTable)",
"constructor": false,
"full_signature": "public static String getAutoPartitionColumnName(PTable parentTable)",
"identifier": "getAutoPartitionColumnName",
"modifiers": "public static",
"parameters": "(PTable parentTable)",
"return": "String",
"signature": "String getAutoPartitionColumnName(PTable parentTable)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getAutoPartitionColIndex(PTable parentTable)",
"constructor": false,
"full_signature": "public static int getAutoPartitionColIndex(PTable parentTable)",
"identifier": "getAutoPartitionColIndex",
"modifiers": "public static",
"parameters": "(PTable parentTable)",
"return": "int",
"signature": "int getAutoPartitionColIndex(PTable parentTable)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getJdbcUrl(RegionCoprocessorEnvironment env)",
"constructor": false,
"full_signature": "public static String getJdbcUrl(RegionCoprocessorEnvironment env)",
"identifier": "getJdbcUrl",
"modifiers": "public static",
"parameters": "(RegionCoprocessorEnvironment env)",
"return": "String",
"signature": "String getJdbcUrl(RegionCoprocessorEnvironment env)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isHColumnProperty(String propName)",
"constructor": false,
"full_signature": "public static boolean isHColumnProperty(String propName)",
"identifier": "isHColumnProperty",
"modifiers": "public static",
"parameters": "(String propName)",
"return": "boolean",
"signature": "boolean isHColumnProperty(String propName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isHTableProperty(String propName)",
"constructor": false,
"full_signature": "public static boolean isHTableProperty(String propName)",
"identifier": "isHTableProperty",
"modifiers": "public static",
"parameters": "(String propName)",
"return": "boolean",
"signature": "boolean isHTableProperty(String propName)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"constructor": false,
"full_signature": "public static boolean isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"identifier": "isLocalIndexFamily",
"modifiers": "public static",
"parameters": "(ImmutableBytesPtr cfPtr)",
"return": "boolean",
"signature": "boolean isLocalIndexFamily(ImmutableBytesPtr cfPtr)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.isLocalIndexFamily(byte[] cf)",
"constructor": false,
"full_signature": "public static boolean isLocalIndexFamily(byte[] cf)",
"identifier": "isLocalIndexFamily",
"modifiers": "public static",
"parameters": "(byte[] cf)",
"return": "boolean",
"signature": "boolean isLocalIndexFamily(byte[] cf)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getPhysicalTableRowForView(PTable view)",
"constructor": false,
"full_signature": "public static final byte[] getPhysicalTableRowForView(PTable view)",
"identifier": "getPhysicalTableRowForView",
"modifiers": "public static final",
"parameters": "(PTable view)",
"return": "byte[]",
"signature": "byte[] getPhysicalTableRowForView(PTable view)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.removeChildLinkMutations(List<Mutation> metadataMutations)",
"constructor": false,
"full_signature": "public static List<Mutation> removeChildLinkMutations(List<Mutation> metadataMutations)",
"identifier": "removeChildLinkMutations",
"modifiers": "public static",
"parameters": "(List<Mutation> metadataMutations)",
"return": "List<Mutation>",
"signature": "List<Mutation> removeChildLinkMutations(List<Mutation> metadataMutations)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static IndexType getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"identifier": "getIndexType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"return": "IndexType",
"signature": "IndexType getIndexType(List<Mutation> tableMetaData, KeyValueBuilder builder,\n ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"constructor": false,
"full_signature": "public static PDataType<?> getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"identifier": "getIndexDataType",
"modifiers": "public static",
"parameters": "(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"return": "PDataType<?>",
"signature": "PDataType<?> getIndexDataType(List<Mutation> tableMetaData,\n KeyValueBuilder builder, ImmutableBytesWritable value)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"constructor": false,
"full_signature": "public static PColumn getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"identifier": "getColumn",
"modifiers": "public static",
"parameters": "(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"return": "PColumn",
"signature": "PColumn getColumn(int pkCount, byte[][] rowKeyMetaData, PTable table)",
"testcase": false
},
{
"class_method_signature": "MetaDataUtil.deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"constructor": false,
"full_signature": "public static void deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"identifier": "deleteFromStatsTable",
"modifiers": "public static",
"parameters": "(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"return": "void",
"signature": "void deleteFromStatsTable(PhoenixConnection connection,\n PTable table, List<byte[]> physicalTableNames,\n List<MetaDataProtocol.SharedTableState> sharedTableStates)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public static void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue) {\n NavigableMap<byte[], List<Cell>> familyCellMap = somePut.getFamilyCellMap();\n List<Cell> cells = familyCellMap.get(family);\n List<Cell> newCells = Lists.newArrayList();\n if (cells != null) {\n for (Cell cell : cells) {\n if (Bytes.compareTo(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength(),\n qualifier, 0, qualifier.length) == 0) {\n Cell replacementCell = new KeyValue(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(),\n cell.getFamilyArray(), cell.getFamilyOffset(), cell.getFamilyLength(), cell.getQualifierArray(),\n cell.getQualifierOffset(), cell.getQualifierLength(), cell.getTimestamp(),\n KeyValue.Type.codeToType(cell.getType().getCode()), newValue, 0, newValue.length);\n newCells.add(replacementCell);\n } else {\n newCells.add(cell);\n }\n }\n familyCellMap.put(family, newCells);\n }\n }",
"class_method_signature": "MetaDataUtil.mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"constructor": false,
"full_signature": "public static void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"identifier": "mutatePutValue",
"invocations": [
"getFamilyCellMap",
"get",
"newArrayList",
"compareTo",
"getQualifierArray",
"getQualifierOffset",
"getQualifierLength",
"getRowArray",
"getRowOffset",
"getRowLength",
"getFamilyArray",
"getFamilyOffset",
"getFamilyLength",
"getQualifierArray",
"getQualifierOffset",
"getQualifierLength",
"getTimestamp",
"codeToType",
"getCode",
"getType",
"add",
"add",
"put"
],
"modifiers": "public static",
"parameters": "(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"return": "void",
"signature": "void mutatePutValue(Put somePut, byte[] family, byte[] qualifier, byte[] newValue)",
"testcase": false
} | {
"created": "6/4/2014 7:00:08 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 20473418,
"size": null,
"stargazer_count": null,
"stars": 752,
"updates": "2020-01-27T08:20:53+00:00",
"url": "https://github.com/apache/phoenix"
} |
70038531_25 | {
"fields": [],
"file": "wraith-engine/src/test/java/com/srotya/tau/wraith/rules/validator/TestAlertTemplateValidator.java",
"identifier": "TestAlertTemplateValidator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testHTTPAlertTemplateNegative() {\n\t\tAlertTemplateValidator validator = new AlertTemplateValidator();\n\t\tAlertTemplate template = new AlertTemplate((short)2);\n\t\ttemplate.setMedia(\"http\");\n\t\ttemplate.setSubject(\"hello\");\n\t\ttemplate.setBody(\"hello $x\");\n\t\ttemplate.setTemplateName(\"Template\");\n\t\ttemplate.setDestination(\"htt://google.com\");\n\t\ttry {\n\t\t\tvalidator.validate(template);\n\t\t\tfail(\"Invalid template, can't pass test\");\n\t\t} catch (ValidationException e) {\n\t\t}\n\t\ttemplate.setDestination(\"smtp://google.com\");\n\t\ttry {\n\t\t\tvalidator.validate(template);\n\t\t\tfail(\"Invalid template, can't pass test\");\n\t\t} catch (ValidationException e) {\n\t\t}\n\t}",
"class_method_signature": "TestAlertTemplateValidator.testHTTPAlertTemplateNegative()",
"constructor": false,
"full_signature": "@Test public void testHTTPAlertTemplateNegative()",
"identifier": "testHTTPAlertTemplateNegative",
"invocations": [
"setMedia",
"setSubject",
"setBody",
"setTemplateName",
"setDestination",
"validate",
"fail",
"setDestination",
"validate",
"fail"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testHTTPAlertTemplateNegative()",
"testcase": true
} | {
"fields": [
{
"declarator": "MAX_LENGTH_ALERT_DESTINATION = 200",
"modifier": "private static final",
"original_string": "private static final int MAX_LENGTH_ALERT_DESTINATION = 200;",
"type": "int",
"var_name": "MAX_LENGTH_ALERT_DESTINATION"
},
{
"declarator": "MAX_LENGTH_ALERT_MEDIA = 50",
"modifier": "private static final",
"original_string": "private static final int MAX_LENGTH_ALERT_MEDIA = 50;",
"type": "int",
"var_name": "MAX_LENGTH_ALERT_MEDIA"
},
{
"declarator": "EMAIL_PATTERN = Pattern\n\t\t\t.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\")",
"modifier": "private static final",
"original_string": "private static final Pattern EMAIL_PATTERN = Pattern\n\t\t\t.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");",
"type": "Pattern",
"var_name": "EMAIL_PATTERN"
},
{
"declarator": "HTTP_PATTERN = Pattern.compile(\"^https?\\\\://.*\")",
"modifier": "private static final",
"original_string": "private static final Pattern HTTP_PATTERN = Pattern.compile(\"^https?\\\\://.*\");",
"type": "Pattern",
"var_name": "HTTP_PATTERN"
},
{
"declarator": "SLACK_PATTERN = Pattern.compile(\"[a-zA-Z0-9/]{10,}@[a-z0-9\\\\_\\\\-]{1,21}\")",
"modifier": "private static final",
"original_string": "private static final Pattern SLACK_PATTERN = Pattern.compile(\"[a-zA-Z0-9/]{10,}@[a-z0-9\\\\_\\\\-]{1,21}\");",
"type": "Pattern",
"var_name": "SLACK_PATTERN"
},
{
"declarator": "alertTemplateValidator",
"modifier": "private",
"original_string": "private List<Validator<AlertTemplate>> alertTemplateValidator;",
"type": "List<Validator<AlertTemplate>>",
"var_name": "alertTemplateValidator"
}
],
"file": "wraith-engine/src/main/java/com/srotya/tau/wraith/rules/validator/AlertTemplateValidator.java",
"identifier": "AlertTemplateValidator",
"interfaces": "implements Validator<AlertTemplate>",
"methods": [
{
"class_method_signature": "AlertTemplateValidator.AlertTemplateValidator()",
"constructor": true,
"full_signature": "public AlertTemplateValidator()",
"identifier": "AlertTemplateValidator",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " AlertTemplateValidator()",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.configure(List<Validator<?>> validators)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") @Override public void configure(List<Validator<?>> validators)",
"identifier": "configure",
"modifiers": "@SuppressWarnings(\"unchecked\") @Override public",
"parameters": "(List<Validator<?>> validators)",
"return": "void",
"signature": "void configure(List<Validator<?>> validators)",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.validate(AlertTemplate template)",
"constructor": false,
"full_signature": "@Override public void validate(AlertTemplate template)",
"identifier": "validate",
"modifiers": "@Override public",
"parameters": "(AlertTemplate template)",
"return": "void",
"signature": "void validate(AlertTemplate template)",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.getType()",
"constructor": false,
"full_signature": "@Override public Class<AlertTemplate> getType()",
"identifier": "getType",
"modifiers": "@Override public",
"parameters": "()",
"return": "Class<AlertTemplate>",
"signature": "Class<AlertTemplate> getType()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n\tpublic void validate(AlertTemplate template) throws ValidationException {\n\t\tif (template.getDestination() == null || template.getDestination().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Alert target can't be empty\");\n\t\t}\n\t\tif (template.getDestination().length() > MAX_LENGTH_ALERT_DESTINATION) {\n\t\t\tthrow new ValidationException(\n\t\t\t\t\t\"Alert target must be less than \" + MAX_LENGTH_ALERT_DESTINATION + \" characters\");\n\t\t}\n\t\tif (template.getMedia() == null || template.getMedia().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Alert media can't be empty\");\n\t\t}\n\t\tif (template.getMedia().length() > MAX_LENGTH_ALERT_MEDIA) {\n\t\t\tthrow new ValidationException(\"Alert media must be less than \" + MAX_LENGTH_ALERT_MEDIA + \" characters\");\n\t\t}\n\t\tif (template.getBody() == null || template.getBody().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Template body can't be empty\");\n\t\t}\n\t\tif (template.getTemplateName() == null || template.getTemplateName().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Template name can't be empty\");\n\t\t}\n\t\tif (template.getThrottleDuration() < 1) {\n\t\t\tthrow new ValidationException(\"Throttle duration can't be less than 1\");\n\t\t}\n\t\tif (template.getThrottleLimit() < 1) {\n\t\t\tthrow new ValidationException(\"Throttle limit can't be less than 1\");\n\t\t}\n\t\tswitch (template.getMedia()) {\n\t\tcase \"mail\":\n\t\tcase \"http\":\n\t\tcase \"slack\":\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new ValidationException(\"Bad media type, only mail and http are allowed\");\n\t\t}\n\t\tif (template.getMedia().contains(\"mail\")) {\n\t\t\tString[] emails = template.getDestination().split(\"\\\\s{0,1},\");\n\t\t\tfor (String email : emails) {\n\t\t\t\tif (!EMAIL_PATTERN.matcher(email.trim()).matches()) {\n\t\t\t\t\tthrow new ValidationException(\"Not a valid email address:\" + email);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (template.getMedia().contains(\"http\")) {\n\t\t\tif (!HTTP_PATTERN.matcher(template.getDestination()).matches()) {\n\t\t\t\tthrow new ValidationException(\"Not a valid http address:\" + template.getDestination());\n\t\t\t}\n\t\t} else if (template.getMedia().contains(\"slack\")) {\n\t\t\tif (!SLACK_PATTERN.matcher(template.getDestination()).matches()) {\n\t\t\t\tthrow new ValidationException(\"Not a valid slack address:\" + template.getDestination());\n\t\t\t}\n\t\t}\n\t\tfor (Validator<AlertTemplate> validator : alertTemplateValidator) {\n\t\t\tvalidator.validate(template);\n\t\t}\n\t}",
"class_method_signature": "AlertTemplateValidator.validate(AlertTemplate template)",
"constructor": false,
"full_signature": "@Override public void validate(AlertTemplate template)",
"identifier": "validate",
"invocations": [
"getDestination",
"isEmpty",
"trim",
"getDestination",
"length",
"getDestination",
"getMedia",
"isEmpty",
"trim",
"getMedia",
"length",
"getMedia",
"getBody",
"isEmpty",
"trim",
"getBody",
"getTemplateName",
"isEmpty",
"trim",
"getTemplateName",
"getThrottleDuration",
"getThrottleLimit",
"getMedia",
"contains",
"getMedia",
"split",
"getDestination",
"matches",
"matcher",
"trim",
"contains",
"getMedia",
"matches",
"matcher",
"getDestination",
"getDestination",
"contains",
"getMedia",
"matches",
"matcher",
"getDestination",
"getDestination",
"validate"
],
"modifiers": "@Override public",
"parameters": "(AlertTemplate template)",
"return": "void",
"signature": "void validate(AlertTemplate template)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 70038531,
"size": 6233,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/srotya/tau"
} |
70038531_12 | {
"fields": [
{
"declarator": "TIMESTAMP = \"@timestamp\"",
"modifier": "private static final",
"original_string": "private static final String TIMESTAMP = \"@timestamp\";",
"type": "String",
"var_name": "TIMESTAMP"
},
{
"declarator": "interceptor",
"modifier": "private",
"original_string": "private DateInterceptor interceptor;",
"type": "DateInterceptor",
"var_name": "interceptor"
},
{
"declarator": "config",
"modifier": "private",
"original_string": "private Map<String, String> config;",
"type": "Map<String, String>",
"var_name": "config"
}
],
"file": "tau-nucleus/src/test/java/com/srotya/tau/nucleus/api/TestDateInterceptor.java",
"identifier": "TestDateInterceptor",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testISO8601() throws ValidationException {\n\t\tJsonObject obj = new JsonObject();\n\t\tobj.addProperty(TIMESTAMP, \"2011-04-19T03:44:01.103Z\");\n\t\tinterceptor.validate(obj);\n\t\tobj.remove(TIMESTAMP);\n\t\ttry {\n\t\t\tinterceptor.validate(obj);\n\t\t\tfail(\"Must have thrown validation exception\");\n\t\t} catch (Exception e) {\n\t\t}\n\t\tobj.addProperty(TIMESTAMP, \"2016-04-21T20:54:41.103Z\");\n\t\tinterceptor.validate(obj);\n\t\tlong ts = obj.get(TIMESTAMP).getAsLong();\n\t\tassertEquals(1461272081103L, ts);\n\t\ttry {\n\t\t\tinterceptor.validate(new JsonObject());\n\t\t\tfail(\"Must have thrown validation exception\");\n\t\t} catch (Exception e) {\n\t\t}\n\t\tthis.config.put(DateInterceptor.DATEFIELD, null);\n\t\ttry{\n\t\t\tinterceptor.validate(new JsonObject());\n\t\t} catch (Exception e) {\n\t\t}\n\t}",
"class_method_signature": "TestDateInterceptor.testISO8601()",
"constructor": false,
"full_signature": "@Test public void testISO8601()",
"identifier": "testISO8601",
"invocations": [
"addProperty",
"validate",
"remove",
"validate",
"fail",
"addProperty",
"validate",
"getAsLong",
"get",
"assertEquals",
"validate",
"fail",
"put",
"validate"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testISO8601()",
"testcase": true
} | {
"fields": [
{
"declarator": "TIMESTAMP = \"@timestamp\"",
"modifier": "public static final",
"original_string": "public static final String TIMESTAMP = \"@timestamp\";",
"type": "String",
"var_name": "TIMESTAMP"
},
{
"declarator": "DATEFIELD = \"dateinterceptor.datefield\"",
"modifier": "public static final",
"original_string": "public static final String DATEFIELD = \"dateinterceptor.datefield\";",
"type": "String",
"var_name": "DATEFIELD"
},
{
"declarator": "formats = { basicDate().getParser(), // yyyyMMdd\n\t\t\tbasicDateTime().getParser(), // yyyyMMdd'T'HHmmss.SSSZ\n\t\t\tbasicDateTimeNoMillis().getParser(),\n\t\t\t// yyyyMMdd'T'HHmmssZ\n\t\t\tbasicOrdinalDate().getParser(), // yyyyDDD\n\t\t\tbasicOrdinalDateTime().getParser(),\n\t\t\t// yyyyDDD'T'HHmmss.SSSZ\n\t\t\tbasicOrdinalDateTimeNoMillis().getParser(), basicTime().getParser(), basicTimeNoMillis().getParser(),\n\t\t\tbasicTTime().getParser(), basicTTimeNoMillis().getParser(), basicWeekDate().getParser(),\n\t\t\tbasicWeekDateTime().getParser(), basicWeekDateTimeNoMillis().getParser(), date().getParser(),\n\t\t\tdateElementParser().getParser(), dateHour().getParser(), dateHourMinute().getParser(),\n\t\t\tdateHourMinuteSecond().getParser(), dateHourMinuteSecondFraction().getParser(),\n\t\t\tdateHourMinuteSecondMillis().getParser(), dateOptionalTimeParser().getParser(), dateParser().getParser(),\n\t\t\tdateTime().getParser(), dateTimeNoMillis().getParser(), dateTimeParser().getParser(), hour().getParser(),\n\t\t\thourMinute().getParser(), hourMinuteSecond().getParser(), hourMinuteSecondFraction().getParser(),\n\t\t\thourMinuteSecondMillis().getParser(), localDateOptionalTimeParser().getParser(),\n\t\t\tlocalDateParser().getParser(), localTimeParser().getParser(), ordinalDate().getParser(),\n\t\t\tordinalDateTime().getParser(), ordinalDateTimeNoMillis().getParser(), time().getParser(),\n\t\t\ttimeElementParser().getParser(), timeNoMillis().getParser(), timeParser().getParser(), tTime().getParser(),\n\t\t\ttTimeNoMillis().getParser(), weekDate().getParser(), weekDateTime().getParser(),\n\t\t\tweekDateTimeNoMillis().getParser(), weekyear().getParser(), weekyearWeek().getParser(),\n\t\t\tweekyearWeekDay().getParser(), year().getParser(), yearMonth().getParser(), yearMonthDay().getParser(),\n\t\t\tDateTimeFormat.forPattern(\"yyyy.MM.dd\").getParser() }",
"modifier": "private final",
"original_string": "private final DateTimeParser[] formats = { basicDate().getParser(), // yyyyMMdd\n\t\t\tbasicDateTime().getParser(), // yyyyMMdd'T'HHmmss.SSSZ\n\t\t\tbasicDateTimeNoMillis().getParser(),\n\t\t\t// yyyyMMdd'T'HHmmssZ\n\t\t\tbasicOrdinalDate().getParser(), // yyyyDDD\n\t\t\tbasicOrdinalDateTime().getParser(),\n\t\t\t// yyyyDDD'T'HHmmss.SSSZ\n\t\t\tbasicOrdinalDateTimeNoMillis().getParser(), basicTime().getParser(), basicTimeNoMillis().getParser(),\n\t\t\tbasicTTime().getParser(), basicTTimeNoMillis().getParser(), basicWeekDate().getParser(),\n\t\t\tbasicWeekDateTime().getParser(), basicWeekDateTimeNoMillis().getParser(), date().getParser(),\n\t\t\tdateElementParser().getParser(), dateHour().getParser(), dateHourMinute().getParser(),\n\t\t\tdateHourMinuteSecond().getParser(), dateHourMinuteSecondFraction().getParser(),\n\t\t\tdateHourMinuteSecondMillis().getParser(), dateOptionalTimeParser().getParser(), dateParser().getParser(),\n\t\t\tdateTime().getParser(), dateTimeNoMillis().getParser(), dateTimeParser().getParser(), hour().getParser(),\n\t\t\thourMinute().getParser(), hourMinuteSecond().getParser(), hourMinuteSecondFraction().getParser(),\n\t\t\thourMinuteSecondMillis().getParser(), localDateOptionalTimeParser().getParser(),\n\t\t\tlocalDateParser().getParser(), localTimeParser().getParser(), ordinalDate().getParser(),\n\t\t\tordinalDateTime().getParser(), ordinalDateTimeNoMillis().getParser(), time().getParser(),\n\t\t\ttimeElementParser().getParser(), timeNoMillis().getParser(), timeParser().getParser(), tTime().getParser(),\n\t\t\ttTimeNoMillis().getParser(), weekDate().getParser(), weekDateTime().getParser(),\n\t\t\tweekDateTimeNoMillis().getParser(), weekyear().getParser(), weekyearWeek().getParser(),\n\t\t\tweekyearWeekDay().getParser(), year().getParser(), yearMonth().getParser(), yearMonthDay().getParser(),\n\t\t\tDateTimeFormat.forPattern(\"yyyy.MM.dd\").getParser() };",
"type": "DateTimeParser[]",
"var_name": "formats"
},
{
"declarator": "formatter",
"modifier": "private",
"original_string": "private DateTimeFormatter formatter;",
"type": "DateTimeFormatter",
"var_name": "formatter"
},
{
"declarator": "dateField",
"modifier": "private",
"original_string": "private String dateField;",
"type": "String",
"var_name": "dateField"
}
],
"file": "tau-nucleus/src/main/java/com/srotya/tau/nucleus/api/DateInterceptor.java",
"identifier": "DateInterceptor",
"interfaces": "",
"methods": [
{
"class_method_signature": "DateInterceptor.DateInterceptor()",
"constructor": true,
"full_signature": "public DateInterceptor()",
"identifier": "DateInterceptor",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " DateInterceptor()",
"testcase": false
},
{
"class_method_signature": "DateInterceptor.configure(Map<String, String> config)",
"constructor": false,
"full_signature": "@Override public void configure(Map<String, String> config)",
"identifier": "configure",
"modifiers": "@Override public",
"parameters": "(Map<String, String> config)",
"return": "void",
"signature": "void configure(Map<String, String> config)",
"testcase": false
},
{
"class_method_signature": "DateInterceptor.validate(JsonObject event)",
"constructor": false,
"full_signature": "@Override public void validate(JsonObject event)",
"identifier": "validate",
"modifiers": "@Override public",
"parameters": "(JsonObject event)",
"return": "void",
"signature": "void validate(JsonObject event)",
"testcase": false
},
{
"class_method_signature": "DateInterceptor.validate(Map<String, Object> eventHeaders)",
"constructor": false,
"full_signature": "@Override public void validate(Map<String, Object> eventHeaders)",
"identifier": "validate",
"modifiers": "@Override public",
"parameters": "(Map<String, Object> eventHeaders)",
"return": "void",
"signature": "void validate(Map<String, Object> eventHeaders)",
"testcase": false
}
],
"superclass": "extends ValidationInterceptor"
} | {
"body": "@Override\n\tpublic void validate(JsonObject event) throws ValidationException {\n\t\ttry {\n\t\t\tDateTime ts = formatter.parseDateTime(event.get(dateField).getAsString());\n\t\t\tevent.remove(dateField);\n\t\t\tevent.addProperty(dateField, ts.getMillis());\n\t\t\tif (next != null) {\n\t\t\t\tnext.validate(event);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new ValidationException(e.getMessage());\n\t\t}\n\t}",
"class_method_signature": "DateInterceptor.validate(JsonObject event)",
"constructor": false,
"full_signature": "@Override public void validate(JsonObject event)",
"identifier": "validate",
"invocations": [
"parseDateTime",
"getAsString",
"get",
"remove",
"addProperty",
"getMillis",
"validate",
"getMessage"
],
"modifiers": "@Override public",
"parameters": "(JsonObject event)",
"return": "void",
"signature": "void validate(JsonObject event)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 70038531,
"size": 6233,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/srotya/tau"
} |
70038531_24 | {
"fields": [],
"file": "wraith-engine/src/test/java/com/srotya/tau/wraith/rules/validator/TestAlertTemplateValidator.java",
"identifier": "TestAlertTemplateValidator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testHTTPAlertTemplatePostive() throws ValidationException {\n\t\tAlertTemplateValidator validator = new AlertTemplateValidator();\n\t\tAlertTemplate template = new AlertTemplate((short)2);\n\t\ttemplate.setMedia(\"http\");\n\t\ttemplate.setSubject(\"hello\");\n\t\ttemplate.setBody(\"hello $x\");\n\t\ttemplate.setTemplateName(\"Template\");\n\t\ttemplate.setDestination(\"https://google.com\");\n\t\tvalidator.validate(template);\n\t\ttemplate.setDestination(\"http://google.com\");\n\t\tvalidator.validate(template);\n\t}",
"class_method_signature": "TestAlertTemplateValidator.testHTTPAlertTemplatePostive()",
"constructor": false,
"full_signature": "@Test public void testHTTPAlertTemplatePostive()",
"identifier": "testHTTPAlertTemplatePostive",
"invocations": [
"setMedia",
"setSubject",
"setBody",
"setTemplateName",
"setDestination",
"validate",
"setDestination",
"validate"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testHTTPAlertTemplatePostive()",
"testcase": true
} | {
"fields": [
{
"declarator": "MAX_LENGTH_ALERT_DESTINATION = 200",
"modifier": "private static final",
"original_string": "private static final int MAX_LENGTH_ALERT_DESTINATION = 200;",
"type": "int",
"var_name": "MAX_LENGTH_ALERT_DESTINATION"
},
{
"declarator": "MAX_LENGTH_ALERT_MEDIA = 50",
"modifier": "private static final",
"original_string": "private static final int MAX_LENGTH_ALERT_MEDIA = 50;",
"type": "int",
"var_name": "MAX_LENGTH_ALERT_MEDIA"
},
{
"declarator": "EMAIL_PATTERN = Pattern\n\t\t\t.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\")",
"modifier": "private static final",
"original_string": "private static final Pattern EMAIL_PATTERN = Pattern\n\t\t\t.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");",
"type": "Pattern",
"var_name": "EMAIL_PATTERN"
},
{
"declarator": "HTTP_PATTERN = Pattern.compile(\"^https?\\\\://.*\")",
"modifier": "private static final",
"original_string": "private static final Pattern HTTP_PATTERN = Pattern.compile(\"^https?\\\\://.*\");",
"type": "Pattern",
"var_name": "HTTP_PATTERN"
},
{
"declarator": "SLACK_PATTERN = Pattern.compile(\"[a-zA-Z0-9/]{10,}@[a-z0-9\\\\_\\\\-]{1,21}\")",
"modifier": "private static final",
"original_string": "private static final Pattern SLACK_PATTERN = Pattern.compile(\"[a-zA-Z0-9/]{10,}@[a-z0-9\\\\_\\\\-]{1,21}\");",
"type": "Pattern",
"var_name": "SLACK_PATTERN"
},
{
"declarator": "alertTemplateValidator",
"modifier": "private",
"original_string": "private List<Validator<AlertTemplate>> alertTemplateValidator;",
"type": "List<Validator<AlertTemplate>>",
"var_name": "alertTemplateValidator"
}
],
"file": "wraith-engine/src/main/java/com/srotya/tau/wraith/rules/validator/AlertTemplateValidator.java",
"identifier": "AlertTemplateValidator",
"interfaces": "implements Validator<AlertTemplate>",
"methods": [
{
"class_method_signature": "AlertTemplateValidator.AlertTemplateValidator()",
"constructor": true,
"full_signature": "public AlertTemplateValidator()",
"identifier": "AlertTemplateValidator",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " AlertTemplateValidator()",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.configure(List<Validator<?>> validators)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") @Override public void configure(List<Validator<?>> validators)",
"identifier": "configure",
"modifiers": "@SuppressWarnings(\"unchecked\") @Override public",
"parameters": "(List<Validator<?>> validators)",
"return": "void",
"signature": "void configure(List<Validator<?>> validators)",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.validate(AlertTemplate template)",
"constructor": false,
"full_signature": "@Override public void validate(AlertTemplate template)",
"identifier": "validate",
"modifiers": "@Override public",
"parameters": "(AlertTemplate template)",
"return": "void",
"signature": "void validate(AlertTemplate template)",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.getType()",
"constructor": false,
"full_signature": "@Override public Class<AlertTemplate> getType()",
"identifier": "getType",
"modifiers": "@Override public",
"parameters": "()",
"return": "Class<AlertTemplate>",
"signature": "Class<AlertTemplate> getType()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n\tpublic void validate(AlertTemplate template) throws ValidationException {\n\t\tif (template.getDestination() == null || template.getDestination().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Alert target can't be empty\");\n\t\t}\n\t\tif (template.getDestination().length() > MAX_LENGTH_ALERT_DESTINATION) {\n\t\t\tthrow new ValidationException(\n\t\t\t\t\t\"Alert target must be less than \" + MAX_LENGTH_ALERT_DESTINATION + \" characters\");\n\t\t}\n\t\tif (template.getMedia() == null || template.getMedia().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Alert media can't be empty\");\n\t\t}\n\t\tif (template.getMedia().length() > MAX_LENGTH_ALERT_MEDIA) {\n\t\t\tthrow new ValidationException(\"Alert media must be less than \" + MAX_LENGTH_ALERT_MEDIA + \" characters\");\n\t\t}\n\t\tif (template.getBody() == null || template.getBody().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Template body can't be empty\");\n\t\t}\n\t\tif (template.getTemplateName() == null || template.getTemplateName().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Template name can't be empty\");\n\t\t}\n\t\tif (template.getThrottleDuration() < 1) {\n\t\t\tthrow new ValidationException(\"Throttle duration can't be less than 1\");\n\t\t}\n\t\tif (template.getThrottleLimit() < 1) {\n\t\t\tthrow new ValidationException(\"Throttle limit can't be less than 1\");\n\t\t}\n\t\tswitch (template.getMedia()) {\n\t\tcase \"mail\":\n\t\tcase \"http\":\n\t\tcase \"slack\":\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new ValidationException(\"Bad media type, only mail and http are allowed\");\n\t\t}\n\t\tif (template.getMedia().contains(\"mail\")) {\n\t\t\tString[] emails = template.getDestination().split(\"\\\\s{0,1},\");\n\t\t\tfor (String email : emails) {\n\t\t\t\tif (!EMAIL_PATTERN.matcher(email.trim()).matches()) {\n\t\t\t\t\tthrow new ValidationException(\"Not a valid email address:\" + email);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (template.getMedia().contains(\"http\")) {\n\t\t\tif (!HTTP_PATTERN.matcher(template.getDestination()).matches()) {\n\t\t\t\tthrow new ValidationException(\"Not a valid http address:\" + template.getDestination());\n\t\t\t}\n\t\t} else if (template.getMedia().contains(\"slack\")) {\n\t\t\tif (!SLACK_PATTERN.matcher(template.getDestination()).matches()) {\n\t\t\t\tthrow new ValidationException(\"Not a valid slack address:\" + template.getDestination());\n\t\t\t}\n\t\t}\n\t\tfor (Validator<AlertTemplate> validator : alertTemplateValidator) {\n\t\t\tvalidator.validate(template);\n\t\t}\n\t}",
"class_method_signature": "AlertTemplateValidator.validate(AlertTemplate template)",
"constructor": false,
"full_signature": "@Override public void validate(AlertTemplate template)",
"identifier": "validate",
"invocations": [
"getDestination",
"isEmpty",
"trim",
"getDestination",
"length",
"getDestination",
"getMedia",
"isEmpty",
"trim",
"getMedia",
"length",
"getMedia",
"getBody",
"isEmpty",
"trim",
"getBody",
"getTemplateName",
"isEmpty",
"trim",
"getTemplateName",
"getThrottleDuration",
"getThrottleLimit",
"getMedia",
"contains",
"getMedia",
"split",
"getDestination",
"matches",
"matcher",
"trim",
"contains",
"getMedia",
"matches",
"matcher",
"getDestination",
"getDestination",
"contains",
"getMedia",
"matches",
"matcher",
"getDestination",
"getDestination",
"validate"
],
"modifiers": "@Override public",
"parameters": "(AlertTemplate template)",
"return": "void",
"signature": "void validate(AlertTemplate template)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 70038531,
"size": 6233,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/srotya/tau"
} |
70038531_23 | {
"fields": [],
"file": "wraith-engine/src/test/java/com/srotya/tau/wraith/rules/validator/TestAlertTemplateValidator.java",
"identifier": "TestAlertTemplateValidator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testMailAlertTemplateNegative() {\n\t\tAlertTemplateValidator validator = new AlertTemplateValidator();\n\t\tAlertTemplate template = new AlertTemplate((short)2);\n\t\ttry{\n\t\t\tvalidator.validate(template);\n\t\t\tfail(\"Invalid template, can't pass test\");\n\t\t}catch(ValidationException e) {\n\t\t}\n\t\ttemplate.setSubject(\"hello\");\n\t\ttemplate.setBody(\"hello $x\");\n\t\ttemplate.setTemplateName(\"Template\");\n\t\ttemplate.setDestination(\"abc@xyz.com, efg@xyz.com\");\n\t\ttemplate.setMedia(\"test\");\n\t\ttry{\n\t\t\tvalidator.validate(template);\n\t\t\tfail(\"Invalid template, can't pass test\");\n\t\t}catch(ValidationException e) {\n\t\t}\n\t\ttemplate.setDestination(\"abc@xyz.com, efg@xy.c\");\n\t\ttry{\n\t\t\tvalidator.validate(template);\n\t\t\tfail(\"Invalid template, can't pass test\");\n\t\t}catch(ValidationException e) {\n\t\t}\n\t\ttemplate.setDestination(\"abc@xyz.com,efg@xy.c\");\n\t\ttry{\n\t\t\tvalidator.validate(template);\n\t\t\tfail(\"Invalid template, can't pass test\");\n\t\t}catch(ValidationException e) {\n\t\t}\n\t\ttemplate.setDestination(\"hello924jwjaksfsduufasidjfhkasdjfadsf9asfijklsdfoasdljfo9sdfpiojkasdfoasjdifaisdpfjasdl;fiaosdf9posdjklfasdfhaosdif9paidsujklfasdfa09wrjiwqjrwfjoifjlas@xyz.com\");\n\t\ttry{\n\t\t\tvalidator.validate(template);\n\t\t\tfail(\"Invalid template, can't pass test\");\n\t\t}catch(ValidationException e) {\n\t\t}\n\t}",
"class_method_signature": "TestAlertTemplateValidator.testMailAlertTemplateNegative()",
"constructor": false,
"full_signature": "@Test public void testMailAlertTemplateNegative()",
"identifier": "testMailAlertTemplateNegative",
"invocations": [
"validate",
"fail",
"setSubject",
"setBody",
"setTemplateName",
"setDestination",
"setMedia",
"validate",
"fail",
"setDestination",
"validate",
"fail",
"setDestination",
"validate",
"fail",
"setDestination",
"validate",
"fail"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testMailAlertTemplateNegative()",
"testcase": true
} | {
"fields": [
{
"declarator": "MAX_LENGTH_ALERT_DESTINATION = 200",
"modifier": "private static final",
"original_string": "private static final int MAX_LENGTH_ALERT_DESTINATION = 200;",
"type": "int",
"var_name": "MAX_LENGTH_ALERT_DESTINATION"
},
{
"declarator": "MAX_LENGTH_ALERT_MEDIA = 50",
"modifier": "private static final",
"original_string": "private static final int MAX_LENGTH_ALERT_MEDIA = 50;",
"type": "int",
"var_name": "MAX_LENGTH_ALERT_MEDIA"
},
{
"declarator": "EMAIL_PATTERN = Pattern\n\t\t\t.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\")",
"modifier": "private static final",
"original_string": "private static final Pattern EMAIL_PATTERN = Pattern\n\t\t\t.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");",
"type": "Pattern",
"var_name": "EMAIL_PATTERN"
},
{
"declarator": "HTTP_PATTERN = Pattern.compile(\"^https?\\\\://.*\")",
"modifier": "private static final",
"original_string": "private static final Pattern HTTP_PATTERN = Pattern.compile(\"^https?\\\\://.*\");",
"type": "Pattern",
"var_name": "HTTP_PATTERN"
},
{
"declarator": "SLACK_PATTERN = Pattern.compile(\"[a-zA-Z0-9/]{10,}@[a-z0-9\\\\_\\\\-]{1,21}\")",
"modifier": "private static final",
"original_string": "private static final Pattern SLACK_PATTERN = Pattern.compile(\"[a-zA-Z0-9/]{10,}@[a-z0-9\\\\_\\\\-]{1,21}\");",
"type": "Pattern",
"var_name": "SLACK_PATTERN"
},
{
"declarator": "alertTemplateValidator",
"modifier": "private",
"original_string": "private List<Validator<AlertTemplate>> alertTemplateValidator;",
"type": "List<Validator<AlertTemplate>>",
"var_name": "alertTemplateValidator"
}
],
"file": "wraith-engine/src/main/java/com/srotya/tau/wraith/rules/validator/AlertTemplateValidator.java",
"identifier": "AlertTemplateValidator",
"interfaces": "implements Validator<AlertTemplate>",
"methods": [
{
"class_method_signature": "AlertTemplateValidator.AlertTemplateValidator()",
"constructor": true,
"full_signature": "public AlertTemplateValidator()",
"identifier": "AlertTemplateValidator",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " AlertTemplateValidator()",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.configure(List<Validator<?>> validators)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") @Override public void configure(List<Validator<?>> validators)",
"identifier": "configure",
"modifiers": "@SuppressWarnings(\"unchecked\") @Override public",
"parameters": "(List<Validator<?>> validators)",
"return": "void",
"signature": "void configure(List<Validator<?>> validators)",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.validate(AlertTemplate template)",
"constructor": false,
"full_signature": "@Override public void validate(AlertTemplate template)",
"identifier": "validate",
"modifiers": "@Override public",
"parameters": "(AlertTemplate template)",
"return": "void",
"signature": "void validate(AlertTemplate template)",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.getType()",
"constructor": false,
"full_signature": "@Override public Class<AlertTemplate> getType()",
"identifier": "getType",
"modifiers": "@Override public",
"parameters": "()",
"return": "Class<AlertTemplate>",
"signature": "Class<AlertTemplate> getType()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n\tpublic void validate(AlertTemplate template) throws ValidationException {\n\t\tif (template.getDestination() == null || template.getDestination().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Alert target can't be empty\");\n\t\t}\n\t\tif (template.getDestination().length() > MAX_LENGTH_ALERT_DESTINATION) {\n\t\t\tthrow new ValidationException(\n\t\t\t\t\t\"Alert target must be less than \" + MAX_LENGTH_ALERT_DESTINATION + \" characters\");\n\t\t}\n\t\tif (template.getMedia() == null || template.getMedia().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Alert media can't be empty\");\n\t\t}\n\t\tif (template.getMedia().length() > MAX_LENGTH_ALERT_MEDIA) {\n\t\t\tthrow new ValidationException(\"Alert media must be less than \" + MAX_LENGTH_ALERT_MEDIA + \" characters\");\n\t\t}\n\t\tif (template.getBody() == null || template.getBody().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Template body can't be empty\");\n\t\t}\n\t\tif (template.getTemplateName() == null || template.getTemplateName().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Template name can't be empty\");\n\t\t}\n\t\tif (template.getThrottleDuration() < 1) {\n\t\t\tthrow new ValidationException(\"Throttle duration can't be less than 1\");\n\t\t}\n\t\tif (template.getThrottleLimit() < 1) {\n\t\t\tthrow new ValidationException(\"Throttle limit can't be less than 1\");\n\t\t}\n\t\tswitch (template.getMedia()) {\n\t\tcase \"mail\":\n\t\tcase \"http\":\n\t\tcase \"slack\":\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new ValidationException(\"Bad media type, only mail and http are allowed\");\n\t\t}\n\t\tif (template.getMedia().contains(\"mail\")) {\n\t\t\tString[] emails = template.getDestination().split(\"\\\\s{0,1},\");\n\t\t\tfor (String email : emails) {\n\t\t\t\tif (!EMAIL_PATTERN.matcher(email.trim()).matches()) {\n\t\t\t\t\tthrow new ValidationException(\"Not a valid email address:\" + email);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (template.getMedia().contains(\"http\")) {\n\t\t\tif (!HTTP_PATTERN.matcher(template.getDestination()).matches()) {\n\t\t\t\tthrow new ValidationException(\"Not a valid http address:\" + template.getDestination());\n\t\t\t}\n\t\t} else if (template.getMedia().contains(\"slack\")) {\n\t\t\tif (!SLACK_PATTERN.matcher(template.getDestination()).matches()) {\n\t\t\t\tthrow new ValidationException(\"Not a valid slack address:\" + template.getDestination());\n\t\t\t}\n\t\t}\n\t\tfor (Validator<AlertTemplate> validator : alertTemplateValidator) {\n\t\t\tvalidator.validate(template);\n\t\t}\n\t}",
"class_method_signature": "AlertTemplateValidator.validate(AlertTemplate template)",
"constructor": false,
"full_signature": "@Override public void validate(AlertTemplate template)",
"identifier": "validate",
"invocations": [
"getDestination",
"isEmpty",
"trim",
"getDestination",
"length",
"getDestination",
"getMedia",
"isEmpty",
"trim",
"getMedia",
"length",
"getMedia",
"getBody",
"isEmpty",
"trim",
"getBody",
"getTemplateName",
"isEmpty",
"trim",
"getTemplateName",
"getThrottleDuration",
"getThrottleLimit",
"getMedia",
"contains",
"getMedia",
"split",
"getDestination",
"matches",
"matcher",
"trim",
"contains",
"getMedia",
"matches",
"matcher",
"getDestination",
"getDestination",
"contains",
"getMedia",
"matches",
"matcher",
"getDestination",
"getDestination",
"validate"
],
"modifiers": "@Override public",
"parameters": "(AlertTemplate template)",
"return": "void",
"signature": "void validate(AlertTemplate template)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 70038531,
"size": 6233,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/srotya/tau"
} |
70038531_0 | {
"fields": [
{
"declarator": "TEST_RULE_GROUP = \"test-tenant\"",
"modifier": "private static final",
"original_string": "private static final String TEST_RULE_GROUP = \"test-tenant\";",
"type": "String",
"var_name": "TEST_RULE_GROUP"
},
{
"declarator": "RULE_GROUP_ID_1 = \"z341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_1 = \"z341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_1"
},
{
"declarator": "CONNECTION_STRING = \"jdbc:hsqldb:mem:target/rules.db\"",
"modifier": "private static final",
"original_string": "private static final String CONNECTION_STRING = \"jdbc:hsqldb:mem:target/rules.db\";",
"type": "String",
"var_name": "CONNECTION_STRING"
},
{
"declarator": "TARGET_RULES_DB = \"target/template.db\"",
"modifier": "private static final",
"original_string": "private static final String TARGET_RULES_DB = \"target/template.db\";",
"type": "String",
"var_name": "TARGET_RULES_DB"
},
{
"declarator": "emf",
"modifier": "private static",
"original_string": "private static EntityManagerFactory emf;",
"type": "EntityManagerFactory",
"var_name": "emf"
},
{
"declarator": "em",
"modifier": "private",
"original_string": "private EntityManager em;",
"type": "EntityManager",
"var_name": "em"
},
{
"declarator": "producer",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate KafkaProducer<String, String> producer;",
"type": "KafkaProducer<String, String>",
"var_name": "producer"
},
{
"declarator": "am",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate ApplicationManager am;",
"type": "ApplicationManager",
"var_name": "am"
},
{
"declarator": "kafkaCommandSourcer = new KafkaCommandEventSourcer()",
"modifier": "private",
"original_string": "private KafkaCommandEventSourcer kafkaCommandSourcer = new KafkaCommandEventSourcer();",
"type": "KafkaCommandEventSourcer",
"var_name": "kafkaCommandSourcer"
},
{
"declarator": "id",
"modifier": "private static",
"original_string": "private static short id;",
"type": "short",
"var_name": "id"
},
{
"declarator": "ruleGroup",
"modifier": "private",
"original_string": "private RuleGroup ruleGroup;",
"type": "RuleGroup",
"var_name": "ruleGroup"
}
],
"file": "tau-api/src/test/java/com/srotya/tau/api/dao/TestTemplateManager.java",
"identifier": "TestTemplateManager",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testGetTemplate() throws Exception {\n\t\tAlertTemplates templates = new AlertTemplates();\n\t\truleGroup = TemplateManager.getInstance().getRuleGroup(em, RULE_GROUP_ID_1);\n\t\tid = TemplateManager.getInstance().createNewTemplate(em, templates, ruleGroup);\n\t\tAlertTemplates template = TemplateManager.getInstance().getTemplate(em, ruleGroup.getRuleGroupId(), id);\n\t\tassertEquals(id, template.getTemplateId());\n\t}",
"class_method_signature": "TestTemplateManager.testGetTemplate()",
"constructor": false,
"full_signature": "@Test public void testGetTemplate()",
"identifier": "testGetTemplate",
"invocations": [
"getRuleGroup",
"getInstance",
"createNewTemplate",
"getInstance",
"getTemplate",
"getInstance",
"getRuleGroupId",
"assertEquals",
"getTemplateId"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetTemplate()",
"testcase": true
} | {
"fields": [
{
"declarator": "logger = Logger.getLogger(TemplateManager.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(TemplateManager.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "PARAM_TEMPLATE_ID = \"templateId\"",
"modifier": "private static final",
"original_string": "private static final String PARAM_TEMPLATE_ID = \"templateId\";",
"type": "String",
"var_name": "PARAM_TEMPLATE_ID"
},
{
"declarator": "PARAM_RULE_GROUP_ID = \"ruleGroupId\"",
"modifier": "private static final",
"original_string": "private static final String PARAM_RULE_GROUP_ID = \"ruleGroupId\";",
"type": "String",
"var_name": "PARAM_RULE_GROUP_ID"
},
{
"declarator": "TEMPLATE_MANAGER = new TemplateManager()",
"modifier": "private static",
"original_string": "private static TemplateManager TEMPLATE_MANAGER = new TemplateManager();",
"type": "TemplateManager",
"var_name": "TEMPLATE_MANAGER"
}
],
"file": "tau-api/src/main/java/com/srotya/tau/api/dao/TemplateManager.java",
"identifier": "TemplateManager",
"interfaces": "",
"methods": [
{
"class_method_signature": "TemplateManager.TemplateManager()",
"constructor": true,
"full_signature": "private TemplateManager()",
"identifier": "TemplateManager",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " TemplateManager()",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getInstance()",
"constructor": false,
"full_signature": "public static TemplateManager getInstance()",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "()",
"return": "TemplateManager",
"signature": "TemplateManager getInstance()",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getTemplateContents(EntityManager em, String ruleGroupId, boolean pretty)",
"constructor": false,
"full_signature": "public String getTemplateContents(EntityManager em, String ruleGroupId, boolean pretty)",
"identifier": "getTemplateContents",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, boolean pretty)",
"return": "String",
"signature": "String getTemplateContents(EntityManager em, String ruleGroupId, boolean pretty)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getTemplate(EntityManager em, String ruleGroupId, short templateId)",
"constructor": false,
"full_signature": "public AlertTemplates getTemplate(EntityManager em, String ruleGroupId, short templateId)",
"identifier": "getTemplate",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short templateId)",
"return": "AlertTemplates",
"signature": "AlertTemplates getTemplate(EntityManager em, String ruleGroupId, short templateId)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getTemplates(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public List<AlertTemplates> getTemplates(EntityManager em, String ruleGroupId)",
"identifier": "getTemplates",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "List<AlertTemplates>",
"signature": "List<AlertTemplates> getTemplates(EntityManager em, String ruleGroupId)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.createNewTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup)",
"constructor": false,
"full_signature": "public short createNewTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup)",
"identifier": "createNewTemplate",
"modifiers": "public",
"parameters": "(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup)",
"return": "short",
"signature": "short createNewTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.saveTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"constructor": false,
"full_signature": "public short saveTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"identifier": "saveTemplate",
"modifiers": "public",
"parameters": "(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"return": "short",
"signature": "short saveTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getTemplateObj(EntityManager em, String ruleGroupId, short templateId)",
"constructor": false,
"full_signature": "public AlertTemplate getTemplateObj(EntityManager em, String ruleGroupId, short templateId)",
"identifier": "getTemplateObj",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short templateId)",
"return": "AlertTemplate",
"signature": "AlertTemplate getTemplateObj(EntityManager em, String ruleGroupId, short templateId)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.deleteTemplate(EntityManager em, String ruleGroupId, short templateId, ApplicationManager am)",
"constructor": false,
"full_signature": "public void deleteTemplate(EntityManager em, String ruleGroupId, short templateId, ApplicationManager am)",
"identifier": "deleteTemplate",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short templateId, ApplicationManager am)",
"return": "void",
"signature": "void deleteTemplate(EntityManager em, String ruleGroupId, short templateId, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.deleteTemplates(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"constructor": false,
"full_signature": "public void deleteTemplates(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"identifier": "deleteTemplates",
"modifiers": "public",
"parameters": "(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"return": "void",
"signature": "void deleteTemplates(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getRuleGroup(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public RuleGroup getRuleGroup(EntityManager em, String ruleGroupId)",
"identifier": "getRuleGroup",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "RuleGroup",
"signature": "RuleGroup getRuleGroup(EntityManager em, String ruleGroupId)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public AlertTemplates getTemplate(EntityManager em, String ruleGroupId, short templateId) throws Exception {\n\t\ttry {\n\t\t\tAlertTemplates result = em.createNamedQuery(Queries.TEMPLATE_FIND_BY_ID, AlertTemplates.class)\n\t\t\t\t\t.setParameter(\"templateId\", templateId).setParameter(\"ruleGroupId\", ruleGroupId).getSingleResult();\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\tthrow new NoResultException(\"Template:\" + templateId + \" not found\");\n\t\t}\n\t}",
"class_method_signature": "TemplateManager.getTemplate(EntityManager em, String ruleGroupId, short templateId)",
"constructor": false,
"full_signature": "public AlertTemplates getTemplate(EntityManager em, String ruleGroupId, short templateId)",
"identifier": "getTemplate",
"invocations": [
"getSingleResult",
"setParameter",
"setParameter",
"createNamedQuery"
],
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short templateId)",
"return": "AlertTemplates",
"signature": "AlertTemplates getTemplate(EntityManager em, String ruleGroupId, short templateId)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 70038531,
"size": 6233,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/srotya/tau"
} |
70038531_1 | {
"fields": [
{
"declarator": "TEST_RULE_GROUP = \"test-tenant\"",
"modifier": "private static final",
"original_string": "private static final String TEST_RULE_GROUP = \"test-tenant\";",
"type": "String",
"var_name": "TEST_RULE_GROUP"
},
{
"declarator": "RULE_GROUP_ID_1 = \"z341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_1 = \"z341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_1"
},
{
"declarator": "CONNECTION_STRING = \"jdbc:hsqldb:mem:target/rules.db\"",
"modifier": "private static final",
"original_string": "private static final String CONNECTION_STRING = \"jdbc:hsqldb:mem:target/rules.db\";",
"type": "String",
"var_name": "CONNECTION_STRING"
},
{
"declarator": "TARGET_RULES_DB = \"target/template.db\"",
"modifier": "private static final",
"original_string": "private static final String TARGET_RULES_DB = \"target/template.db\";",
"type": "String",
"var_name": "TARGET_RULES_DB"
},
{
"declarator": "emf",
"modifier": "private static",
"original_string": "private static EntityManagerFactory emf;",
"type": "EntityManagerFactory",
"var_name": "emf"
},
{
"declarator": "em",
"modifier": "private",
"original_string": "private EntityManager em;",
"type": "EntityManager",
"var_name": "em"
},
{
"declarator": "producer",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate KafkaProducer<String, String> producer;",
"type": "KafkaProducer<String, String>",
"var_name": "producer"
},
{
"declarator": "am",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate ApplicationManager am;",
"type": "ApplicationManager",
"var_name": "am"
},
{
"declarator": "kafkaCommandSourcer = new KafkaCommandEventSourcer()",
"modifier": "private",
"original_string": "private KafkaCommandEventSourcer kafkaCommandSourcer = new KafkaCommandEventSourcer();",
"type": "KafkaCommandEventSourcer",
"var_name": "kafkaCommandSourcer"
},
{
"declarator": "id",
"modifier": "private static",
"original_string": "private static short id;",
"type": "short",
"var_name": "id"
},
{
"declarator": "ruleGroup",
"modifier": "private",
"original_string": "private RuleGroup ruleGroup;",
"type": "RuleGroup",
"var_name": "ruleGroup"
}
],
"file": "tau-api/src/test/java/com/srotya/tau/api/dao/TestTemplateManager.java",
"identifier": "TestTemplateManager",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testSaveTemplate() throws Exception {\n\t\tAlertTemplate tpl = new AlertTemplate();\n\t\truleGroup = TemplateManager.getInstance().getRuleGroup(em, RULE_GROUP_ID_1);\n\t\tAlertTemplates template = TemplateManager.getInstance().getTemplate(em, ruleGroup.getRuleGroupId(), id);\n\t\ttpl.setTemplateId(template.getTemplateId());\n\t\ttpl.setBody(\"test\");\n\t\ttpl.setDestination(\"test@xyz.com\");\n\t\ttpl.setMedia(\"mail\");\n\t\ttpl.setTemplateName(\"Test\");\n\t\ttpl.setThrottleDuration(2);\n\t\ttpl.setThrottleLimit(2);\n\t\tshort id = TemplateManager.getInstance().saveTemplate(em, template, template.getRuleGroup(), tpl, am);\n\t\tassertEquals(id, template.getTemplateId());\n\t}",
"class_method_signature": "TestTemplateManager.testSaveTemplate()",
"constructor": false,
"full_signature": "@Test public void testSaveTemplate()",
"identifier": "testSaveTemplate",
"invocations": [
"getRuleGroup",
"getInstance",
"getTemplate",
"getInstance",
"getRuleGroupId",
"setTemplateId",
"getTemplateId",
"setBody",
"setDestination",
"setMedia",
"setTemplateName",
"setThrottleDuration",
"setThrottleLimit",
"saveTemplate",
"getInstance",
"getRuleGroup",
"assertEquals",
"getTemplateId"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testSaveTemplate()",
"testcase": true
} | {
"fields": [
{
"declarator": "logger = Logger.getLogger(TemplateManager.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(TemplateManager.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "PARAM_TEMPLATE_ID = \"templateId\"",
"modifier": "private static final",
"original_string": "private static final String PARAM_TEMPLATE_ID = \"templateId\";",
"type": "String",
"var_name": "PARAM_TEMPLATE_ID"
},
{
"declarator": "PARAM_RULE_GROUP_ID = \"ruleGroupId\"",
"modifier": "private static final",
"original_string": "private static final String PARAM_RULE_GROUP_ID = \"ruleGroupId\";",
"type": "String",
"var_name": "PARAM_RULE_GROUP_ID"
},
{
"declarator": "TEMPLATE_MANAGER = new TemplateManager()",
"modifier": "private static",
"original_string": "private static TemplateManager TEMPLATE_MANAGER = new TemplateManager();",
"type": "TemplateManager",
"var_name": "TEMPLATE_MANAGER"
}
],
"file": "tau-api/src/main/java/com/srotya/tau/api/dao/TemplateManager.java",
"identifier": "TemplateManager",
"interfaces": "",
"methods": [
{
"class_method_signature": "TemplateManager.TemplateManager()",
"constructor": true,
"full_signature": "private TemplateManager()",
"identifier": "TemplateManager",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " TemplateManager()",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getInstance()",
"constructor": false,
"full_signature": "public static TemplateManager getInstance()",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "()",
"return": "TemplateManager",
"signature": "TemplateManager getInstance()",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getTemplateContents(EntityManager em, String ruleGroupId, boolean pretty)",
"constructor": false,
"full_signature": "public String getTemplateContents(EntityManager em, String ruleGroupId, boolean pretty)",
"identifier": "getTemplateContents",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, boolean pretty)",
"return": "String",
"signature": "String getTemplateContents(EntityManager em, String ruleGroupId, boolean pretty)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getTemplate(EntityManager em, String ruleGroupId, short templateId)",
"constructor": false,
"full_signature": "public AlertTemplates getTemplate(EntityManager em, String ruleGroupId, short templateId)",
"identifier": "getTemplate",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short templateId)",
"return": "AlertTemplates",
"signature": "AlertTemplates getTemplate(EntityManager em, String ruleGroupId, short templateId)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getTemplates(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public List<AlertTemplates> getTemplates(EntityManager em, String ruleGroupId)",
"identifier": "getTemplates",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "List<AlertTemplates>",
"signature": "List<AlertTemplates> getTemplates(EntityManager em, String ruleGroupId)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.createNewTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup)",
"constructor": false,
"full_signature": "public short createNewTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup)",
"identifier": "createNewTemplate",
"modifiers": "public",
"parameters": "(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup)",
"return": "short",
"signature": "short createNewTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.saveTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"constructor": false,
"full_signature": "public short saveTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"identifier": "saveTemplate",
"modifiers": "public",
"parameters": "(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"return": "short",
"signature": "short saveTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getTemplateObj(EntityManager em, String ruleGroupId, short templateId)",
"constructor": false,
"full_signature": "public AlertTemplate getTemplateObj(EntityManager em, String ruleGroupId, short templateId)",
"identifier": "getTemplateObj",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short templateId)",
"return": "AlertTemplate",
"signature": "AlertTemplate getTemplateObj(EntityManager em, String ruleGroupId, short templateId)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.deleteTemplate(EntityManager em, String ruleGroupId, short templateId, ApplicationManager am)",
"constructor": false,
"full_signature": "public void deleteTemplate(EntityManager em, String ruleGroupId, short templateId, ApplicationManager am)",
"identifier": "deleteTemplate",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short templateId, ApplicationManager am)",
"return": "void",
"signature": "void deleteTemplate(EntityManager em, String ruleGroupId, short templateId, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.deleteTemplates(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"constructor": false,
"full_signature": "public void deleteTemplates(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"identifier": "deleteTemplates",
"modifiers": "public",
"parameters": "(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"return": "void",
"signature": "void deleteTemplates(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "TemplateManager.getRuleGroup(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public RuleGroup getRuleGroup(EntityManager em, String ruleGroupId)",
"identifier": "getRuleGroup",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "RuleGroup",
"signature": "RuleGroup getRuleGroup(EntityManager em, String ruleGroupId)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public short saveTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am) throws Exception {\n\t\tif (currTemplate == null || templates == null || ruleGroup == null) {\n\t\t\tlogger.info(\"Template was null can't save\");\n\t\t\treturn -1;\n\t\t}\n\t\tAlertTemplateValidator validator = new AlertTemplateValidator();\n\t\tvalidator.validate(currTemplate);\n\t\tlogger.info(\"Template is valid attempting to save\");\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\tif (templates.getRuleGroup() == null) {\n\t\t\t\ttemplates.setRuleGroup(ruleGroup);\n\t\t\t}\n\t\t\tif (currTemplate.getTemplateId() > 0) {\n\t\t\t\ttemplates.setTemplateId(currTemplate.getTemplateId());\n\t\t\t}\n\t\t\ttemplates = em.merge(templates);\n\t\t\tem.flush();\n\t\t\tem.getTransaction().commit();\n\t\t\tcurrTemplate.setTemplateId(templates.getTemplateId());\n\t\t\tem.getTransaction().begin();\n\t\t\ttemplates.setTemplateContent(AlertTemplateSerializer.serialize(currTemplate, false));\n\t\t\tem.merge(templates);\n\t\t\tem.flush();\n\t\t\tlogger.info(\"Template \" + templates.getTemplateId() + \":\" + templates.getTemplateContent() + \" saved\");\n\t\t\t// publish template to kafka\n\t\t\t\n\t\t\tam.getSourcer().sendTemplate(false, ruleGroup.getRuleGroupId(), templates.getTemplateContent());\n\t\t\tem.getTransaction().commit();\n\t\t\tlogger.info(\"Completed Transaction for template \" + templates.getTemplateId() + \":\"\n\t\t\t\t\t+ templates.getTemplateContent() + \"\");\n\t\t\treturn templates.getTemplateId();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (em.getTransaction().isActive()) {\n\t\t\t\tem.getTransaction().rollback();\n\t\t\t}\n\t\t\tthrow e;\n\t\t}\n\t}",
"class_method_signature": "TemplateManager.saveTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"constructor": false,
"full_signature": "public short saveTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"identifier": "saveTemplate",
"invocations": [
"info",
"validate",
"info",
"begin",
"getTransaction",
"getRuleGroup",
"setRuleGroup",
"getTemplateId",
"setTemplateId",
"getTemplateId",
"merge",
"flush",
"commit",
"getTransaction",
"setTemplateId",
"getTemplateId",
"begin",
"getTransaction",
"setTemplateContent",
"serialize",
"merge",
"flush",
"info",
"getTemplateId",
"getTemplateContent",
"sendTemplate",
"getSourcer",
"getRuleGroupId",
"getTemplateContent",
"commit",
"getTransaction",
"info",
"getTemplateId",
"getTemplateContent",
"getTemplateId",
"printStackTrace",
"isActive",
"getTransaction",
"rollback",
"getTransaction"
],
"modifiers": "public",
"parameters": "(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"return": "short",
"signature": "short saveTemplate(EntityManager em, AlertTemplates templates, RuleGroup ruleGroup, AlertTemplate currTemplate,\n\t\t\tApplicationManager am)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 70038531,
"size": 6233,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/srotya/tau"
} |
70038531_22 | {
"fields": [],
"file": "wraith-engine/src/test/java/com/srotya/tau/wraith/rules/validator/TestAlertTemplateValidator.java",
"identifier": "TestAlertTemplateValidator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testMailAlertTemplatePositive() throws ValidationException {\n\t\tAlertTemplateValidator validator = new AlertTemplateValidator();\n\t\tAlertTemplate template = new AlertTemplate((short)2);\n\t\ttemplate.setMedia(\"mail\");\n\t\ttemplate.setSubject(\"hello\");\n\t\ttemplate.setBody(\"hello $x\");\n\t\ttemplate.setTemplateName(\"Template\");\n\t\ttemplate.setDestination(\"abc@xyz.com, efg@xyz.com\");\n\t\tvalidator.validate(template);\n\t}",
"class_method_signature": "TestAlertTemplateValidator.testMailAlertTemplatePositive()",
"constructor": false,
"full_signature": "@Test public void testMailAlertTemplatePositive()",
"identifier": "testMailAlertTemplatePositive",
"invocations": [
"setMedia",
"setSubject",
"setBody",
"setTemplateName",
"setDestination",
"validate"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testMailAlertTemplatePositive()",
"testcase": true
} | {
"fields": [
{
"declarator": "MAX_LENGTH_ALERT_DESTINATION = 200",
"modifier": "private static final",
"original_string": "private static final int MAX_LENGTH_ALERT_DESTINATION = 200;",
"type": "int",
"var_name": "MAX_LENGTH_ALERT_DESTINATION"
},
{
"declarator": "MAX_LENGTH_ALERT_MEDIA = 50",
"modifier": "private static final",
"original_string": "private static final int MAX_LENGTH_ALERT_MEDIA = 50;",
"type": "int",
"var_name": "MAX_LENGTH_ALERT_MEDIA"
},
{
"declarator": "EMAIL_PATTERN = Pattern\n\t\t\t.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\")",
"modifier": "private static final",
"original_string": "private static final Pattern EMAIL_PATTERN = Pattern\n\t\t\t.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");",
"type": "Pattern",
"var_name": "EMAIL_PATTERN"
},
{
"declarator": "HTTP_PATTERN = Pattern.compile(\"^https?\\\\://.*\")",
"modifier": "private static final",
"original_string": "private static final Pattern HTTP_PATTERN = Pattern.compile(\"^https?\\\\://.*\");",
"type": "Pattern",
"var_name": "HTTP_PATTERN"
},
{
"declarator": "SLACK_PATTERN = Pattern.compile(\"[a-zA-Z0-9/]{10,}@[a-z0-9\\\\_\\\\-]{1,21}\")",
"modifier": "private static final",
"original_string": "private static final Pattern SLACK_PATTERN = Pattern.compile(\"[a-zA-Z0-9/]{10,}@[a-z0-9\\\\_\\\\-]{1,21}\");",
"type": "Pattern",
"var_name": "SLACK_PATTERN"
},
{
"declarator": "alertTemplateValidator",
"modifier": "private",
"original_string": "private List<Validator<AlertTemplate>> alertTemplateValidator;",
"type": "List<Validator<AlertTemplate>>",
"var_name": "alertTemplateValidator"
}
],
"file": "wraith-engine/src/main/java/com/srotya/tau/wraith/rules/validator/AlertTemplateValidator.java",
"identifier": "AlertTemplateValidator",
"interfaces": "implements Validator<AlertTemplate>",
"methods": [
{
"class_method_signature": "AlertTemplateValidator.AlertTemplateValidator()",
"constructor": true,
"full_signature": "public AlertTemplateValidator()",
"identifier": "AlertTemplateValidator",
"modifiers": "public",
"parameters": "()",
"return": "",
"signature": " AlertTemplateValidator()",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.configure(List<Validator<?>> validators)",
"constructor": false,
"full_signature": "@SuppressWarnings(\"unchecked\") @Override public void configure(List<Validator<?>> validators)",
"identifier": "configure",
"modifiers": "@SuppressWarnings(\"unchecked\") @Override public",
"parameters": "(List<Validator<?>> validators)",
"return": "void",
"signature": "void configure(List<Validator<?>> validators)",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.validate(AlertTemplate template)",
"constructor": false,
"full_signature": "@Override public void validate(AlertTemplate template)",
"identifier": "validate",
"modifiers": "@Override public",
"parameters": "(AlertTemplate template)",
"return": "void",
"signature": "void validate(AlertTemplate template)",
"testcase": false
},
{
"class_method_signature": "AlertTemplateValidator.getType()",
"constructor": false,
"full_signature": "@Override public Class<AlertTemplate> getType()",
"identifier": "getType",
"modifiers": "@Override public",
"parameters": "()",
"return": "Class<AlertTemplate>",
"signature": "Class<AlertTemplate> getType()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "@Override\n\tpublic void validate(AlertTemplate template) throws ValidationException {\n\t\tif (template.getDestination() == null || template.getDestination().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Alert target can't be empty\");\n\t\t}\n\t\tif (template.getDestination().length() > MAX_LENGTH_ALERT_DESTINATION) {\n\t\t\tthrow new ValidationException(\n\t\t\t\t\t\"Alert target must be less than \" + MAX_LENGTH_ALERT_DESTINATION + \" characters\");\n\t\t}\n\t\tif (template.getMedia() == null || template.getMedia().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Alert media can't be empty\");\n\t\t}\n\t\tif (template.getMedia().length() > MAX_LENGTH_ALERT_MEDIA) {\n\t\t\tthrow new ValidationException(\"Alert media must be less than \" + MAX_LENGTH_ALERT_MEDIA + \" characters\");\n\t\t}\n\t\tif (template.getBody() == null || template.getBody().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Template body can't be empty\");\n\t\t}\n\t\tif (template.getTemplateName() == null || template.getTemplateName().trim().isEmpty()) {\n\t\t\tthrow new ValidationException(\"Template name can't be empty\");\n\t\t}\n\t\tif (template.getThrottleDuration() < 1) {\n\t\t\tthrow new ValidationException(\"Throttle duration can't be less than 1\");\n\t\t}\n\t\tif (template.getThrottleLimit() < 1) {\n\t\t\tthrow new ValidationException(\"Throttle limit can't be less than 1\");\n\t\t}\n\t\tswitch (template.getMedia()) {\n\t\tcase \"mail\":\n\t\tcase \"http\":\n\t\tcase \"slack\":\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new ValidationException(\"Bad media type, only mail and http are allowed\");\n\t\t}\n\t\tif (template.getMedia().contains(\"mail\")) {\n\t\t\tString[] emails = template.getDestination().split(\"\\\\s{0,1},\");\n\t\t\tfor (String email : emails) {\n\t\t\t\tif (!EMAIL_PATTERN.matcher(email.trim()).matches()) {\n\t\t\t\t\tthrow new ValidationException(\"Not a valid email address:\" + email);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (template.getMedia().contains(\"http\")) {\n\t\t\tif (!HTTP_PATTERN.matcher(template.getDestination()).matches()) {\n\t\t\t\tthrow new ValidationException(\"Not a valid http address:\" + template.getDestination());\n\t\t\t}\n\t\t} else if (template.getMedia().contains(\"slack\")) {\n\t\t\tif (!SLACK_PATTERN.matcher(template.getDestination()).matches()) {\n\t\t\t\tthrow new ValidationException(\"Not a valid slack address:\" + template.getDestination());\n\t\t\t}\n\t\t}\n\t\tfor (Validator<AlertTemplate> validator : alertTemplateValidator) {\n\t\t\tvalidator.validate(template);\n\t\t}\n\t}",
"class_method_signature": "AlertTemplateValidator.validate(AlertTemplate template)",
"constructor": false,
"full_signature": "@Override public void validate(AlertTemplate template)",
"identifier": "validate",
"invocations": [
"getDestination",
"isEmpty",
"trim",
"getDestination",
"length",
"getDestination",
"getMedia",
"isEmpty",
"trim",
"getMedia",
"length",
"getMedia",
"getBody",
"isEmpty",
"trim",
"getBody",
"getTemplateName",
"isEmpty",
"trim",
"getTemplateName",
"getThrottleDuration",
"getThrottleLimit",
"getMedia",
"contains",
"getMedia",
"split",
"getDestination",
"matches",
"matcher",
"trim",
"contains",
"getMedia",
"matches",
"matcher",
"getDestination",
"getDestination",
"contains",
"getMedia",
"matches",
"matcher",
"getDestination",
"getDestination",
"validate"
],
"modifiers": "@Override public",
"parameters": "(AlertTemplate template)",
"return": "void",
"signature": "void validate(AlertTemplate template)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 70038531,
"size": 6233,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/srotya/tau"
} |
70038531_2 | {
"fields": [
{
"declarator": "TEST_RULE_GROUP = \"test-tenant\"",
"modifier": "private static final",
"original_string": "private static final String TEST_RULE_GROUP = \"test-tenant\";",
"type": "String",
"var_name": "TEST_RULE_GROUP"
},
{
"declarator": "RULE_GROUP_ID_1 = \"b341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_1 = \"b341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_1"
},
{
"declarator": "RULE_GROUP_ID_2 = \"c341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_2 = \"c341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_2"
},
{
"declarator": "RULE_GROUP_ID_3 = \"d341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_3 = \"d341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_3"
},
{
"declarator": "RULE_GROUP_ID_4 = \"e341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_4 = \"e341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_4"
},
{
"declarator": "RULE_GROUP_ID_5 = \"f341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_5 = \"f341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_5"
},
{
"declarator": "CONNECTION_STRING = \"jdbc:hsqldb:mem:target/rules.db\"",
"modifier": "private static final",
"original_string": "private static final String CONNECTION_STRING = \"jdbc:hsqldb:mem:target/rules.db\";",
"type": "String",
"var_name": "CONNECTION_STRING"
},
{
"declarator": "TARGET_RULES_DB = \"target/rules.db\"",
"modifier": "private static final",
"original_string": "private static final String TARGET_RULES_DB = \"target/rules.db\";",
"type": "String",
"var_name": "TARGET_RULES_DB"
},
{
"declarator": "emf",
"modifier": "private static",
"original_string": "private static EntityManagerFactory emf;",
"type": "EntityManagerFactory",
"var_name": "emf"
},
{
"declarator": "em",
"modifier": "private",
"original_string": "private EntityManager em;",
"type": "EntityManager",
"var_name": "em"
},
{
"declarator": "producer",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate KafkaProducer<String, String> producer;",
"type": "KafkaProducer<String, String>",
"var_name": "producer"
},
{
"declarator": "kafkaCommandSourcer = new KafkaCommandEventSourcer()",
"modifier": "private",
"original_string": "private KafkaCommandEventSourcer kafkaCommandSourcer = new KafkaCommandEventSourcer();",
"type": "KafkaCommandEventSourcer",
"var_name": "kafkaCommandSourcer"
},
{
"declarator": "am",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate ApplicationManager am;",
"type": "ApplicationManager",
"var_name": "am"
},
{
"declarator": "ruleId",
"modifier": "private static",
"original_string": "private static short ruleId;",
"type": "short",
"var_name": "ruleId"
},
{
"declarator": "templateId",
"modifier": "private static",
"original_string": "private static short templateId;",
"type": "short",
"var_name": "templateId"
}
],
"file": "tau-api/src/test/java/com/srotya/tau/api/dao/TestRulesManager.java",
"identifier": "TestRulesManager",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testGetRules() throws Exception {\n\t\tList<Rules> rules = null;\n\t\ttry {\n\t\t\trules = RulesManager.getInstance().getRules(em, RULE_GROUP_ID_1);\n\t\t\tassertEquals(0, rules.size());\n\t\t} catch (NoResultException e) {\n\t\t}\n\t\tRules rule = new Rules();\n\t\tRuleGroup tenant = RulesManager.getInstance().getRuleGroup(em, RULE_GROUP_ID_1);\n\t\tshort ruleId = RulesManager.getInstance().createNewRule(em, rule, tenant).getRuleId();\n\t\ttry {\n\t\t\trules = RulesManager.getInstance().getRules(em, RULE_GROUP_ID_1);\n\t\t\tassertEquals(1, rules.size());\n\t\t\tassertEquals(ruleId, rules.get(0).getRuleId());\n\t\t} catch (NoResultException e) {\n\t\t}\n\t\ttry {\n\t\t\trules = RulesManager.getInstance().getRules(em, RULE_GROUP_ID_1 + \"1\");\n\t\t\tfail(\"Tenant doesn't exist\");\n\t\t} catch (NoResultException e) {\n\t\t}\n\t}",
"class_method_signature": "TestRulesManager.testGetRules()",
"constructor": false,
"full_signature": "@Test public void testGetRules()",
"identifier": "testGetRules",
"invocations": [
"getRules",
"getInstance",
"assertEquals",
"size",
"getRuleGroup",
"getInstance",
"getRuleId",
"createNewRule",
"getInstance",
"getRules",
"getInstance",
"assertEquals",
"size",
"assertEquals",
"getRuleId",
"get",
"getRules",
"getInstance",
"fail"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetRules()",
"testcase": true
} | {
"fields": [
{
"declarator": "PARAM_RULE_GROUP_ID = \"ruleGroupId\"",
"modifier": "public static final",
"original_string": "public static final String PARAM_RULE_GROUP_ID = \"ruleGroupId\";",
"type": "String",
"var_name": "PARAM_RULE_GROUP_ID"
},
{
"declarator": "PARAM_RULE_ID = \"ruleId\"",
"modifier": "private static final",
"original_string": "private static final String PARAM_RULE_ID = \"ruleId\";",
"type": "String",
"var_name": "PARAM_RULE_ID"
},
{
"declarator": "logger = Logger.getLogger(RulesManager.class.getCanonicalName())",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(RulesManager.class.getCanonicalName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "PARAM_TEMPLATE = \"template\"",
"modifier": "private static final",
"original_string": "private static final String PARAM_TEMPLATE = \"template\";",
"type": "String",
"var_name": "PARAM_TEMPLATE"
},
{
"declarator": "RULES_MANAGER = new RulesManager()",
"modifier": "private static",
"original_string": "private static RulesManager RULES_MANAGER = new RulesManager();",
"type": "RulesManager",
"var_name": "RULES_MANAGER"
}
],
"file": "tau-api/src/main/java/com/srotya/tau/api/dao/RulesManager.java",
"identifier": "RulesManager",
"interfaces": "",
"methods": [
{
"class_method_signature": "RulesManager.RulesManager()",
"constructor": true,
"full_signature": "private RulesManager()",
"identifier": "RulesManager",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " RulesManager()",
"testcase": false
},
{
"class_method_signature": "RulesManager.getInstance()",
"constructor": false,
"full_signature": "public static RulesManager getInstance()",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "()",
"return": "RulesManager",
"signature": "RulesManager getInstance()",
"testcase": false
},
{
"class_method_signature": "RulesManager.createNewRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup)",
"constructor": false,
"full_signature": "public Rule createNewRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup)",
"identifier": "createNewRule",
"modifiers": "public",
"parameters": "(EntityManager em, Rules dbRule, RuleGroup ruleGroup)",
"return": "Rule",
"signature": "Rule createNewRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup)",
"testcase": false
},
{
"class_method_signature": "RulesManager.saveRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup, Rule currRule, ApplicationManager am)",
"constructor": false,
"full_signature": "public Rule saveRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup, Rule currRule, ApplicationManager am)",
"identifier": "saveRule",
"modifiers": "public",
"parameters": "(EntityManager em, Rules dbRule, RuleGroup ruleGroup, Rule currRule, ApplicationManager am)",
"return": "Rule",
"signature": "Rule saveRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup, Rule currRule, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRule(EntityManager em, short ruleId)",
"constructor": false,
"full_signature": "protected Rules getRule(EntityManager em, short ruleId)",
"identifier": "getRule",
"modifiers": "protected",
"parameters": "(EntityManager em, short ruleId)",
"return": "Rules",
"signature": "Rules getRule(EntityManager em, short ruleId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRule(EntityManager em, String ruleGroupId, short ruleId)",
"constructor": false,
"full_signature": "public Rules getRule(EntityManager em, String ruleGroupId, short ruleId)",
"identifier": "getRule",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short ruleId)",
"return": "Rules",
"signature": "Rules getRule(EntityManager em, String ruleGroupId, short ruleId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRuleByTemplateId(EntityManager em, String ruleGroupId, short templateId)",
"constructor": false,
"full_signature": "public List<Short> getRuleByTemplateId(EntityManager em, String ruleGroupId, short templateId)",
"identifier": "getRuleByTemplateId",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short templateId)",
"return": "List<Short>",
"signature": "List<Short> getRuleByTemplateId(EntityManager em, String ruleGroupId, short templateId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRuleObject(EntityManager em, short ruleId)",
"constructor": false,
"full_signature": "protected Rule getRuleObject(EntityManager em, short ruleId)",
"identifier": "getRuleObject",
"modifiers": "protected",
"parameters": "(EntityManager em, short ruleId)",
"return": "Rule",
"signature": "Rule getRuleObject(EntityManager em, short ruleId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.deleteRule(EntityManager em, String ruleGroupId, short ruleId, ApplicationManager am)",
"constructor": false,
"full_signature": "public void deleteRule(EntityManager em, String ruleGroupId, short ruleId, ApplicationManager am)",
"identifier": "deleteRule",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short ruleId, ApplicationManager am)",
"return": "void",
"signature": "void deleteRule(EntityManager em, String ruleGroupId, short ruleId, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "RulesManager.deleteRules(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"constructor": false,
"full_signature": "public void deleteRules(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"identifier": "deleteRules",
"modifiers": "public",
"parameters": "(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"return": "void",
"signature": "void deleteRules(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "RulesManager.disableAllRules(EntityManager em, String ruleGroupId, ApplicationManager am)",
"constructor": false,
"full_signature": "public void disableAllRules(EntityManager em, String ruleGroupId, ApplicationManager am)",
"identifier": "disableAllRules",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, ApplicationManager am)",
"return": "void",
"signature": "void disableAllRules(EntityManager em, String ruleGroupId, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRuleObjects(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public List<Rule> getRuleObjects(EntityManager em, String ruleGroupId)",
"identifier": "getRuleObjects",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "List<Rule>",
"signature": "List<Rule> getRuleObjects(EntityManager em, String ruleGroupId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRules(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public List<Rules> getRules(EntityManager em, String ruleGroupId)",
"identifier": "getRules",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "List<Rules>",
"signature": "List<Rules> getRules(EntityManager em, String ruleGroupId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRuleContents(EntityManager em, String ruleGroupId, boolean pretty, int filter)",
"constructor": false,
"full_signature": "public String getRuleContents(EntityManager em, String ruleGroupId, boolean pretty, int filter)",
"identifier": "getRuleContents",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, boolean pretty, int filter)",
"return": "String",
"signature": "String getRuleContents(EntityManager em, String ruleGroupId, boolean pretty, int filter)",
"testcase": false
},
{
"class_method_signature": "RulesManager.enableDisableRule(EntityManager em, boolean ruleState, String ruleGroupId, short ruleId,\n\t\t\tApplicationManager am)",
"constructor": false,
"full_signature": "public Rules enableDisableRule(EntityManager em, boolean ruleState, String ruleGroupId, short ruleId,\n\t\t\tApplicationManager am)",
"identifier": "enableDisableRule",
"modifiers": "public",
"parameters": "(EntityManager em, boolean ruleState, String ruleGroupId, short ruleId,\n\t\t\tApplicationManager am)",
"return": "Rules",
"signature": "Rules enableDisableRule(EntityManager em, boolean ruleState, String ruleGroupId, short ruleId,\n\t\t\tApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRuleGroup(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public RuleGroup getRuleGroup(EntityManager em, String ruleGroupId)",
"identifier": "getRuleGroup",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "RuleGroup",
"signature": "RuleGroup getRuleGroup(EntityManager em, String ruleGroupId)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public List<Rules> getRules(EntityManager em, String ruleGroupId) throws Exception {\n\t\tRuleGroup ruleGroup = getRuleGroup(em, ruleGroupId);\n\t\tif (ruleGroup == null) {\n\t\t\tthrow new NoResultException(\"Rule group not found\");\n\t\t}\n\t\ttry {\n\t\t\tList<Rules> result = em.createNamedQuery(Queries.RULES_FIND_ALL_BY_RULE_GROUP_ID, Rules.class)\n\t\t\t\t\t.setParameter(PARAM_RULE_GROUP_ID, ruleGroupId).getResultList();\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\tlogger.log(Level.SEVERE, \"Failed to load rules for rule group:\" + ruleGroupId, e);\n\t\t\tthrow e;\n\t\t}\n\t}",
"class_method_signature": "RulesManager.getRules(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public List<Rules> getRules(EntityManager em, String ruleGroupId)",
"identifier": "getRules",
"invocations": [
"getRuleGroup",
"getResultList",
"setParameter",
"createNamedQuery",
"log"
],
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "List<Rules>",
"signature": "List<Rules> getRules(EntityManager em, String ruleGroupId)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 70038531,
"size": 6233,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/srotya/tau"
} |
70038531_21 | {
"fields": [
{
"declarator": "caller",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate RulesEngineCaller<Object, Object> caller;",
"type": "RulesEngineCaller<Object, Object>",
"var_name": "caller"
},
{
"declarator": "testFactory",
"modifier": "private",
"original_string": "private TestFactory testFactory;",
"type": "TestFactory",
"var_name": "testFactory"
},
{
"declarator": "engine",
"modifier": "private",
"original_string": "private StatelessRulesEngine<Object, Object> engine;",
"type": "StatelessRulesEngine<Object, Object>",
"var_name": "engine"
}
],
"file": "wraith-engine/src/test/java/com/srotya/tau/wraith/rules/TestStatelessRulesEngine.java",
"identifier": "TestStatelessRulesEngine",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testUpdateRule() throws Exception {\n\t\t// test RE with no pre-loaded rules\n\t\tengine.initialize(new HashMap<>());\n\t\tengine.updateRule(\"all\",\n\t\t\t\tRuleSerializer.serializeRuleToJSONString(new SimpleRule((short) 1123, \"test1\", true,\n\t\t\t\t\t\tnew EqualsCondition(\"host\", \"val\"), new TemplatedAlertAction((short) 2, (short) 2)), false),\n\t\t\t\tfalse);\n\t\tMap<Short, Rule> rule = engine.getRuleGroupMap().get(StatelessRulesEngine.ALL_RULEGROUP);\n\t\tassertEquals(1, rule.size());\n\t\t// test RE with pre-loaded rules\n\t\tengine = new StatelessRulesEngine<>(caller, testFactory, testFactory);\n\t\tMap<String, String> conf = new HashMap<>();\n\t\tconf.put(TestFactory.RULES_CONTENT,\n\t\t\t\tRuleSerializer.serializeRulesToJSONString(Arrays.asList(new SimpleRule((short) 1122, \"test1\", true,\n\t\t\t\t\t\tnew EqualsCondition(\"host\", \"val\"), new TemplatedAlertAction((short) 2, (short) 2))), false));\n\t\tengine.initialize(conf);\n\t\tengine.updateRule(\"all\",\n\t\t\t\tRuleSerializer.serializeRuleToJSONString(new SimpleRule((short) 1123, \"test1\", true,\n\t\t\t\t\t\tnew EqualsCondition(\"host\", \"val\"), new TemplatedAlertAction((short) 2, (short) 2)), false),\n\t\t\t\tfalse);\n\t\trule = engine.getRuleGroupMap().get(StatelessRulesEngine.ALL_RULEGROUP);\n\t\tassertEquals(2, rule.size());\n\t}",
"class_method_signature": "TestStatelessRulesEngine.testUpdateRule()",
"constructor": false,
"full_signature": "@Test public void testUpdateRule()",
"identifier": "testUpdateRule",
"invocations": [
"initialize",
"updateRule",
"serializeRuleToJSONString",
"get",
"getRuleGroupMap",
"assertEquals",
"size",
"put",
"serializeRulesToJSONString",
"asList",
"initialize",
"updateRule",
"serializeRuleToJSONString",
"get",
"getRuleGroupMap",
"assertEquals",
"size"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testUpdateRule()",
"testcase": true
} | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(StatelessRulesEngine.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(StatelessRulesEngine.class);",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "ALL_RULEGROUP = \"all\"",
"modifier": "public static final",
"original_string": "public static final String ALL_RULEGROUP = \"all\";",
"type": "String",
"var_name": "ALL_RULEGROUP"
},
{
"declarator": "ruleGroupMap",
"modifier": "private",
"original_string": "private Map<String, Map<Short, Rule>> ruleGroupMap;",
"type": "Map<String, Map<Short, Rule>>",
"var_name": "ruleGroupMap"
},
{
"declarator": "caller",
"modifier": "private",
"original_string": "private RulesEngineCaller<K, C> caller;",
"type": "RulesEngineCaller<K, C>",
"var_name": "caller"
},
{
"declarator": "eventFactory",
"modifier": "private",
"original_string": "private EventFactory eventFactory;",
"type": "EventFactory",
"var_name": "eventFactory"
},
{
"declarator": "storeFactory",
"modifier": "private",
"original_string": "private StoreFactory storeFactory;",
"type": "StoreFactory",
"var_name": "storeFactory"
},
{
"declarator": "hashSize",
"modifier": "private",
"original_string": "private int hashSize;",
"type": "int",
"var_name": "hashSize"
}
],
"file": "wraith-engine/src/main/java/com/srotya/tau/wraith/rules/StatelessRulesEngine.java",
"identifier": "StatelessRulesEngine",
"interfaces": "implements Configurable",
"methods": [
{
"class_method_signature": "StatelessRulesEngine.StatelessRulesEngine(RulesEngineCaller<K, C> caller, EventFactory eventFactory, StoreFactory storeFactory)",
"constructor": true,
"full_signature": "public StatelessRulesEngine(RulesEngineCaller<K, C> caller, EventFactory eventFactory, StoreFactory storeFactory)",
"identifier": "StatelessRulesEngine",
"modifiers": "public",
"parameters": "(RulesEngineCaller<K, C> caller, EventFactory eventFactory, StoreFactory storeFactory)",
"return": "",
"signature": " StatelessRulesEngine(RulesEngineCaller<K, C> caller, EventFactory eventFactory, StoreFactory storeFactory)",
"testcase": false
},
{
"class_method_signature": "StatelessRulesEngine.initialize(Map<String, String> conf)",
"constructor": false,
"full_signature": "@Override public void initialize(Map<String, String> conf)",
"identifier": "initialize",
"modifiers": "@Override public",
"parameters": "(Map<String, String> conf)",
"return": "void",
"signature": "void initialize(Map<String, String> conf)",
"testcase": false
},
{
"class_method_signature": "StatelessRulesEngine.updateRuleMap(Map<Short, Rule> ruleMap, String ruleJson, boolean delete)",
"constructor": false,
"full_signature": "public static Rule updateRuleMap(Map<Short, Rule> ruleMap, String ruleJson, boolean delete)",
"identifier": "updateRuleMap",
"modifiers": "public static",
"parameters": "(Map<Short, Rule> ruleMap, String ruleJson, boolean delete)",
"return": "Rule",
"signature": "Rule updateRuleMap(Map<Short, Rule> ruleMap, String ruleJson, boolean delete)",
"testcase": false
},
{
"class_method_signature": "StatelessRulesEngine.updateRule(String ruleGroup, String ruleJson, boolean delete)",
"constructor": false,
"full_signature": "public void updateRule(String ruleGroup, String ruleJson, boolean delete)",
"identifier": "updateRule",
"modifiers": "public",
"parameters": "(String ruleGroup, String ruleJson, boolean delete)",
"return": "void",
"signature": "void updateRule(String ruleGroup, String ruleJson, boolean delete)",
"testcase": false
},
{
"class_method_signature": "StatelessRulesEngine.evaluateRules(C eventCollector, K eventContainer, Event event)",
"constructor": false,
"full_signature": "public void evaluateRules(C eventCollector, K eventContainer, Event event)",
"identifier": "evaluateRules",
"modifiers": "public",
"parameters": "(C eventCollector, K eventContainer, Event event)",
"return": "void",
"signature": "void evaluateRules(C eventCollector, K eventContainer, Event event)",
"testcase": false
},
{
"class_method_signature": "StatelessRulesEngine.evaluateEventAgainstGroupedRules(C eventCollector, K eventContainer, Event event)",
"constructor": false,
"full_signature": "public void evaluateEventAgainstGroupedRules(C eventCollector, K eventContainer, Event event)",
"identifier": "evaluateEventAgainstGroupedRules",
"modifiers": "public",
"parameters": "(C eventCollector, K eventContainer, Event event)",
"return": "void",
"signature": "void evaluateEventAgainstGroupedRules(C eventCollector, K eventContainer, Event event)",
"testcase": false
},
{
"class_method_signature": "StatelessRulesEngine.iterateAndEvaluate(C eventCollector, K eventContainer, Event event, Map<Short, Rule> rules,\n\t\t\tString ruleGroup)",
"constructor": false,
"full_signature": "protected void iterateAndEvaluate(C eventCollector, K eventContainer, Event event, Map<Short, Rule> rules,\n\t\t\tString ruleGroup)",
"identifier": "iterateAndEvaluate",
"modifiers": "protected",
"parameters": "(C eventCollector, K eventContainer, Event event, Map<Short, Rule> rules,\n\t\t\tString ruleGroup)",
"return": "void",
"signature": "void iterateAndEvaluate(C eventCollector, K eventContainer, Event event, Map<Short, Rule> rules,\n\t\t\tString ruleGroup)",
"testcase": false
},
{
"class_method_signature": "StatelessRulesEngine.evaluateEventAgainstRule(String ruleGroup, Rule rule, C eventCollector, K eventContainer, Event event)",
"constructor": false,
"full_signature": "public void evaluateEventAgainstRule(String ruleGroup, Rule rule, C eventCollector, K eventContainer, Event event)",
"identifier": "evaluateEventAgainstRule",
"modifiers": "public",
"parameters": "(String ruleGroup, Rule rule, C eventCollector, K eventContainer, Event event)",
"return": "void",
"signature": "void evaluateEventAgainstRule(String ruleGroup, Rule rule, C eventCollector, K eventContainer, Event event)",
"testcase": false
},
{
"class_method_signature": "StatelessRulesEngine.applyRuleAction(C eventCollector, K eventContainer, Event event, String ruleGroup, Rule rule,\n\t\t\tAction action)",
"constructor": false,
"full_signature": "protected void applyRuleAction(C eventCollector, K eventContainer, Event event, String ruleGroup, Rule rule,\n\t\t\tAction action)",
"identifier": "applyRuleAction",
"modifiers": "protected",
"parameters": "(C eventCollector, K eventContainer, Event event, String ruleGroup, Rule rule,\n\t\t\tAction action)",
"return": "void",
"signature": "void applyRuleAction(C eventCollector, K eventContainer, Event event, String ruleGroup, Rule rule,\n\t\t\tAction action)",
"testcase": false
},
{
"class_method_signature": "StatelessRulesEngine.getRuleGroupMap()",
"constructor": false,
"full_signature": "public Map<String, Map<Short, Rule>> getRuleGroupMap()",
"identifier": "getRuleGroupMap",
"modifiers": "public",
"parameters": "()",
"return": "Map<String, Map<Short, Rule>>",
"signature": "Map<String, Map<Short, Rule>> getRuleGroupMap()",
"testcase": false
},
{
"class_method_signature": "StatelessRulesEngine.getHashSize()",
"constructor": false,
"full_signature": "public int getHashSize()",
"identifier": "getHashSize",
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int getHashSize()",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public void updateRule(String ruleGroup, String ruleJson, boolean delete) throws Exception {\n\t\tif (ruleGroup == null) {\n\t\t\tthrow new PerformantException(\"Supplied rule group is null\");\n\t\t}\n\t\tMap<Short, Rule> ruleMap = ruleGroupMap.get(ruleGroup);\n\t\tif (ruleMap == null) {\n\t\t\truleMap = new LinkedHashMap<>(hashSize);\n\t\t\truleGroupMap.put(ruleGroup, ruleMap);\n\t\t}\n\t\tupdateRuleMap(ruleMap, ruleJson, delete);\n\t}",
"class_method_signature": "StatelessRulesEngine.updateRule(String ruleGroup, String ruleJson, boolean delete)",
"constructor": false,
"full_signature": "public void updateRule(String ruleGroup, String ruleJson, boolean delete)",
"identifier": "updateRule",
"invocations": [
"get",
"put",
"updateRuleMap"
],
"modifiers": "public",
"parameters": "(String ruleGroup, String ruleJson, boolean delete)",
"return": "void",
"signature": "void updateRule(String ruleGroup, String ruleJson, boolean delete)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 70038531,
"size": 6233,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/srotya/tau"
} |
70038531_3 | {
"fields": [
{
"declarator": "TEST_RULE_GROUP = \"test-tenant\"",
"modifier": "private static final",
"original_string": "private static final String TEST_RULE_GROUP = \"test-tenant\";",
"type": "String",
"var_name": "TEST_RULE_GROUP"
},
{
"declarator": "RULE_GROUP_ID_1 = \"b341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_1 = \"b341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_1"
},
{
"declarator": "RULE_GROUP_ID_2 = \"c341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_2 = \"c341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_2"
},
{
"declarator": "RULE_GROUP_ID_3 = \"d341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_3 = \"d341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_3"
},
{
"declarator": "RULE_GROUP_ID_4 = \"e341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_4 = \"e341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_4"
},
{
"declarator": "RULE_GROUP_ID_5 = \"f341mmd3ifaasdjm23midijjiro\"",
"modifier": "private static final",
"original_string": "private static final String RULE_GROUP_ID_5 = \"f341mmd3ifaasdjm23midijjiro\";",
"type": "String",
"var_name": "RULE_GROUP_ID_5"
},
{
"declarator": "CONNECTION_STRING = \"jdbc:hsqldb:mem:target/rules.db\"",
"modifier": "private static final",
"original_string": "private static final String CONNECTION_STRING = \"jdbc:hsqldb:mem:target/rules.db\";",
"type": "String",
"var_name": "CONNECTION_STRING"
},
{
"declarator": "TARGET_RULES_DB = \"target/rules.db\"",
"modifier": "private static final",
"original_string": "private static final String TARGET_RULES_DB = \"target/rules.db\";",
"type": "String",
"var_name": "TARGET_RULES_DB"
},
{
"declarator": "emf",
"modifier": "private static",
"original_string": "private static EntityManagerFactory emf;",
"type": "EntityManagerFactory",
"var_name": "emf"
},
{
"declarator": "em",
"modifier": "private",
"original_string": "private EntityManager em;",
"type": "EntityManager",
"var_name": "em"
},
{
"declarator": "producer",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate KafkaProducer<String, String> producer;",
"type": "KafkaProducer<String, String>",
"var_name": "producer"
},
{
"declarator": "kafkaCommandSourcer = new KafkaCommandEventSourcer()",
"modifier": "private",
"original_string": "private KafkaCommandEventSourcer kafkaCommandSourcer = new KafkaCommandEventSourcer();",
"type": "KafkaCommandEventSourcer",
"var_name": "kafkaCommandSourcer"
},
{
"declarator": "am",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate ApplicationManager am;",
"type": "ApplicationManager",
"var_name": "am"
},
{
"declarator": "ruleId",
"modifier": "private static",
"original_string": "private static short ruleId;",
"type": "short",
"var_name": "ruleId"
},
{
"declarator": "templateId",
"modifier": "private static",
"original_string": "private static short templateId;",
"type": "short",
"var_name": "templateId"
}
],
"file": "tau-api/src/test/java/com/srotya/tau/api/dao/TestRulesManager.java",
"identifier": "TestRulesManager",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testGetRuleObjects() throws Exception {\n\t\tRules rule = new Rules();\n\t\tRuleGroup tenant = RulesManager.getInstance().getRuleGroup(em, RULE_GROUP_ID_2);\n\t\tshort ruleId = RulesManager.getInstance().createNewRule(em, rule, tenant).getRuleId();\n\t\ttry {\n\t\t\tList<Rule> rules = RulesManager.getInstance().getRuleObjects(em, RULE_GROUP_ID_2);\n\t\t\tassertEquals(1, rules.size());\n\t\t\tassertEquals(ruleId, rules.get(0).getRuleId());\n\t\t\tassertEquals(\"\", rules.get(0).getName());\n\t\t} catch (NoResultException e) {\n\t\t}\n\t\trule = new Rules();\n\t\trule.setRuleContent(RuleSerializer.serializeRuleToJSONString(\n\t\t\t\tnew SimpleRule(ruleId, \"simple-rule\", true, new EqualsCondition(\"host\", \"symcpe\"),\n\t\t\t\t\t\tnew Action[] { new TemplatedAlertAction((short) 0, templateId) }),\n\t\t\t\tfalse));\n\t\ttenant = RulesManager.getInstance().getRuleGroup(em, RULE_GROUP_ID_2);\n\t\truleId = RulesManager.getInstance().createNewRule(em, rule, tenant).getRuleId();\n\t\ttry {\n\t\t\tList<Rule> rules = RulesManager.getInstance().getRuleObjects(em, RULE_GROUP_ID_2);\n\t\t\tassertEquals(2, rules.size());\n\t\t\tfor (Rule rule2 : rules) {\n\t\t\t\tif (rule2.getRuleId() == ruleId) {\n\t\t\t\t\tassertEquals(\"simple-rule\", rule2.getName());\n\t\t\t\t\tassertEquals(\"host\", ((EqualsCondition) rule2.getCondition()).getkey());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (NoResultException e) {\n\t\t}\n\t}",
"class_method_signature": "TestRulesManager.testGetRuleObjects()",
"constructor": false,
"full_signature": "@Test public void testGetRuleObjects()",
"identifier": "testGetRuleObjects",
"invocations": [
"getRuleGroup",
"getInstance",
"getRuleId",
"createNewRule",
"getInstance",
"getRuleObjects",
"getInstance",
"assertEquals",
"size",
"assertEquals",
"getRuleId",
"get",
"assertEquals",
"getName",
"get",
"setRuleContent",
"serializeRuleToJSONString",
"getRuleGroup",
"getInstance",
"getRuleId",
"createNewRule",
"getInstance",
"getRuleObjects",
"getInstance",
"assertEquals",
"size",
"getRuleId",
"assertEquals",
"getName",
"assertEquals",
"getkey",
"getCondition"
],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void testGetRuleObjects()",
"testcase": true
} | {
"fields": [
{
"declarator": "PARAM_RULE_GROUP_ID = \"ruleGroupId\"",
"modifier": "public static final",
"original_string": "public static final String PARAM_RULE_GROUP_ID = \"ruleGroupId\";",
"type": "String",
"var_name": "PARAM_RULE_GROUP_ID"
},
{
"declarator": "PARAM_RULE_ID = \"ruleId\"",
"modifier": "private static final",
"original_string": "private static final String PARAM_RULE_ID = \"ruleId\";",
"type": "String",
"var_name": "PARAM_RULE_ID"
},
{
"declarator": "logger = Logger.getLogger(RulesManager.class.getCanonicalName())",
"modifier": "private static final",
"original_string": "private static final Logger logger = Logger.getLogger(RulesManager.class.getCanonicalName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "PARAM_TEMPLATE = \"template\"",
"modifier": "private static final",
"original_string": "private static final String PARAM_TEMPLATE = \"template\";",
"type": "String",
"var_name": "PARAM_TEMPLATE"
},
{
"declarator": "RULES_MANAGER = new RulesManager()",
"modifier": "private static",
"original_string": "private static RulesManager RULES_MANAGER = new RulesManager();",
"type": "RulesManager",
"var_name": "RULES_MANAGER"
}
],
"file": "tau-api/src/main/java/com/srotya/tau/api/dao/RulesManager.java",
"identifier": "RulesManager",
"interfaces": "",
"methods": [
{
"class_method_signature": "RulesManager.RulesManager()",
"constructor": true,
"full_signature": "private RulesManager()",
"identifier": "RulesManager",
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " RulesManager()",
"testcase": false
},
{
"class_method_signature": "RulesManager.getInstance()",
"constructor": false,
"full_signature": "public static RulesManager getInstance()",
"identifier": "getInstance",
"modifiers": "public static",
"parameters": "()",
"return": "RulesManager",
"signature": "RulesManager getInstance()",
"testcase": false
},
{
"class_method_signature": "RulesManager.createNewRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup)",
"constructor": false,
"full_signature": "public Rule createNewRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup)",
"identifier": "createNewRule",
"modifiers": "public",
"parameters": "(EntityManager em, Rules dbRule, RuleGroup ruleGroup)",
"return": "Rule",
"signature": "Rule createNewRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup)",
"testcase": false
},
{
"class_method_signature": "RulesManager.saveRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup, Rule currRule, ApplicationManager am)",
"constructor": false,
"full_signature": "public Rule saveRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup, Rule currRule, ApplicationManager am)",
"identifier": "saveRule",
"modifiers": "public",
"parameters": "(EntityManager em, Rules dbRule, RuleGroup ruleGroup, Rule currRule, ApplicationManager am)",
"return": "Rule",
"signature": "Rule saveRule(EntityManager em, Rules dbRule, RuleGroup ruleGroup, Rule currRule, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRule(EntityManager em, short ruleId)",
"constructor": false,
"full_signature": "protected Rules getRule(EntityManager em, short ruleId)",
"identifier": "getRule",
"modifiers": "protected",
"parameters": "(EntityManager em, short ruleId)",
"return": "Rules",
"signature": "Rules getRule(EntityManager em, short ruleId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRule(EntityManager em, String ruleGroupId, short ruleId)",
"constructor": false,
"full_signature": "public Rules getRule(EntityManager em, String ruleGroupId, short ruleId)",
"identifier": "getRule",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short ruleId)",
"return": "Rules",
"signature": "Rules getRule(EntityManager em, String ruleGroupId, short ruleId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRuleByTemplateId(EntityManager em, String ruleGroupId, short templateId)",
"constructor": false,
"full_signature": "public List<Short> getRuleByTemplateId(EntityManager em, String ruleGroupId, short templateId)",
"identifier": "getRuleByTemplateId",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short templateId)",
"return": "List<Short>",
"signature": "List<Short> getRuleByTemplateId(EntityManager em, String ruleGroupId, short templateId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRuleObject(EntityManager em, short ruleId)",
"constructor": false,
"full_signature": "protected Rule getRuleObject(EntityManager em, short ruleId)",
"identifier": "getRuleObject",
"modifiers": "protected",
"parameters": "(EntityManager em, short ruleId)",
"return": "Rule",
"signature": "Rule getRuleObject(EntityManager em, short ruleId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.deleteRule(EntityManager em, String ruleGroupId, short ruleId, ApplicationManager am)",
"constructor": false,
"full_signature": "public void deleteRule(EntityManager em, String ruleGroupId, short ruleId, ApplicationManager am)",
"identifier": "deleteRule",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, short ruleId, ApplicationManager am)",
"return": "void",
"signature": "void deleteRule(EntityManager em, String ruleGroupId, short ruleId, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "RulesManager.deleteRules(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"constructor": false,
"full_signature": "public void deleteRules(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"identifier": "deleteRules",
"modifiers": "public",
"parameters": "(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"return": "void",
"signature": "void deleteRules(EntityManager em, RuleGroup ruleGroup, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "RulesManager.disableAllRules(EntityManager em, String ruleGroupId, ApplicationManager am)",
"constructor": false,
"full_signature": "public void disableAllRules(EntityManager em, String ruleGroupId, ApplicationManager am)",
"identifier": "disableAllRules",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, ApplicationManager am)",
"return": "void",
"signature": "void disableAllRules(EntityManager em, String ruleGroupId, ApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRuleObjects(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public List<Rule> getRuleObjects(EntityManager em, String ruleGroupId)",
"identifier": "getRuleObjects",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "List<Rule>",
"signature": "List<Rule> getRuleObjects(EntityManager em, String ruleGroupId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRules(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public List<Rules> getRules(EntityManager em, String ruleGroupId)",
"identifier": "getRules",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "List<Rules>",
"signature": "List<Rules> getRules(EntityManager em, String ruleGroupId)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRuleContents(EntityManager em, String ruleGroupId, boolean pretty, int filter)",
"constructor": false,
"full_signature": "public String getRuleContents(EntityManager em, String ruleGroupId, boolean pretty, int filter)",
"identifier": "getRuleContents",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId, boolean pretty, int filter)",
"return": "String",
"signature": "String getRuleContents(EntityManager em, String ruleGroupId, boolean pretty, int filter)",
"testcase": false
},
{
"class_method_signature": "RulesManager.enableDisableRule(EntityManager em, boolean ruleState, String ruleGroupId, short ruleId,\n\t\t\tApplicationManager am)",
"constructor": false,
"full_signature": "public Rules enableDisableRule(EntityManager em, boolean ruleState, String ruleGroupId, short ruleId,\n\t\t\tApplicationManager am)",
"identifier": "enableDisableRule",
"modifiers": "public",
"parameters": "(EntityManager em, boolean ruleState, String ruleGroupId, short ruleId,\n\t\t\tApplicationManager am)",
"return": "Rules",
"signature": "Rules enableDisableRule(EntityManager em, boolean ruleState, String ruleGroupId, short ruleId,\n\t\t\tApplicationManager am)",
"testcase": false
},
{
"class_method_signature": "RulesManager.getRuleGroup(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public RuleGroup getRuleGroup(EntityManager em, String ruleGroupId)",
"identifier": "getRuleGroup",
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "RuleGroup",
"signature": "RuleGroup getRuleGroup(EntityManager em, String ruleGroupId)",
"testcase": false
}
],
"superclass": ""
} | {
"body": "public List<Rule> getRuleObjects(EntityManager em, String ruleGroupId) throws Exception {\n\t\tList<Rule> rules = new ArrayList<>();\n\t\ttry {\n\t\t\tList<Rules> results = getRules(em, ruleGroupId);\n\t\t\tfor (Rules rule : results) {\n\t\t\t\tif (rule.getRuleContent() != null) {\n\t\t\t\t\trules.add(RuleSerializer.deserializeJSONStringToRule(rule.getRuleContent()));\n\t\t\t\t} else {\n\t\t\t\t\trules.add(new SimpleRule(rule.getRuleId(), \"\", false, null, new Action[] {}));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rules;\n\t\t} catch (Exception e) {\n\t\t\tlogger.log(Level.SEVERE, \"Failed to load rule objects for rule group:\" + ruleGroupId, e);\n\t\t\tthrow e;\n\t\t}\n\t}",
"class_method_signature": "RulesManager.getRuleObjects(EntityManager em, String ruleGroupId)",
"constructor": false,
"full_signature": "public List<Rule> getRuleObjects(EntityManager em, String ruleGroupId)",
"identifier": "getRuleObjects",
"invocations": [
"getRules",
"getRuleContent",
"add",
"deserializeJSONStringToRule",
"getRuleContent",
"add",
"getRuleId",
"log"
],
"modifiers": "public",
"parameters": "(EntityManager em, String ruleGroupId)",
"return": "List<Rule>",
"signature": "List<Rule> getRuleObjects(EntityManager em, String ruleGroupId)",
"testcase": false
} | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 70038531,
"size": 6233,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/srotya/tau"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.