id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
146510094_182 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void testOptionMappingsMissingMapping() {\n ProfilesConf profilesConf = getProfilesConf(\"optionMappings\");\n Map<String, String> map = profilesConf.getOptionMappings(\"missing-mappings\");\n assertTrue(map.isEmpty());\n }",
"class_method_signature": "ProfilesCo... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getOptionMappings(String profileName) {\n return getProfile(profileName).getOptionsMap();\n }",
"class_method_signature": "ProfilesConf.getOptionMappings(String profileName)",
"constructor": false,
"full_signature": "@Override public Map<String, Str... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_31 | {
"fields": [
{
"declarator": "gpCSV",
"modifier": "private",
"original_string": "private GreenplumCSV gpCSV;",
"type": "GreenplumCSV",
"var_name": "gpCSV"
},
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_str... | {
"body": "@Test\n public void testToCsvFieldNull() {\n assertNull(gpCSV.toCsvField(null, false, false));\n assertNull(gpCSV.toCsvField(null, false, true));\n assertNull(gpCSV.toCsvField(null, true, false));\n assertNull(gpCSV.toCsvField(null, true, true));\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "QUOTE = '\"'",
"modifier": "private static final",
"original_string": "private static final char QUOTE = '\"';",
"type": "char",
"var_name": "QUOTE"
},
{
"declarator": "ESCAPE = '\"'",
"modifier": "private static final",
"origi... | {
"body": "public String toCsvField(String s, boolean prependQuoteChar, boolean appendQuoteChar) {\n return toCsvField(s, prependQuoteChar, appendQuoteChar, false);\n }",
"class_method_signature": "GreenplumCSV.toCsvField(String s, boolean prependQuoteChar, boolean appendQuoteChar)",
"constructor": fals... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_252 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WhenUserProvidedSchema_Binary_NotFound_Spaces() {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"Failed to obtain Avro schema from 'user provided.avro'\");\n context.setRequestType(RequestContext.Re... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_317 | {
"fields": [
{
"declarator": "hiveColumn",
"modifier": "",
"original_string": "FieldSchema hiveColumn;",
"type": "FieldSchema",
"var_name": "hiveColumn"
},
{
"declarator": "typesMappings = {\n /* hive type -> gpdb type */\n {\"tinyint\", \"int2\"}... | {
"body": "@Test\n public void validateSchema() throws Exception {\n String columnName = \"abc\";\n\n Integer[] gpdbModifiers = {};\n HiveUtilities.validateTypeCompatible(DataType.SMALLINT, gpdbModifiers, EnumHiveToGpdbType.TinyintType.getTypeName(), columnName);\n\n HiveUtilities.valid... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HiveUtilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HiveUtilities.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public static void validateTypeCompatible(DataType gpdbDataType, Integer[] gpdbTypeMods, String hiveType, String gpdbColumnName) {\n\n EnumHiveToGpdbType hiveToGpdbType = EnumHiveToGpdbType.getHiveToGpdbType(hiveType);\n EnumGpdbType expectedGpdbType = hiveToGpdbType.getGpdbType();\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_194 | {
"fields": [
{
"declarator": "response = null",
"modifier": "",
"original_string": "MetadataResponse response = null;",
"type": "MetadataResponse",
"var_name": "response"
}
],
"file": "server/pxf-service/src/test/java/org/greenplum/pxf/service/MetadataResponseFormatterTest.j... | {
"body": "@Test\n public void formatResponseStringWithMultipleItems() throws Exception {\n List <Metadata> metdataList = new ArrayList<Metadata>();\n for (int i=1; i<=10; i++) {\n List<Metadata.Field> fields = new ArrayList<Metadata.Field>();\n Metadata.Item itemName = new Meta... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(MetadataResponseFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(MetadataResponseFormatter.class);",
"type": "Log",
"var_name": "LOG"
}
],
"file":... | {
"body": "public static MetadataResponse formatResponse(List<Metadata> metadataList, String path) throws IOException {\n /* print the fragment list to log when in debug level */\n if (LOG.isDebugEnabled()) {\n MetadataResponseFormatter.printMetadata(metadataList, path);\n }\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_27 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "context... | {
"body": "@Test\n public void testReturnDefaultBooleanOptionValue() {\n assertTrue(context.getOption(\"foo\", true));\n assertFalse(context.getOption(\"foo\", false));\n }",
"class_method_signature": "RequestContextTest.testReturnDefaultBooleanOptionValue()",
"constructor": false,
"full_sig... | {
"fields": [
{
"declarator": "requestType",
"modifier": "private",
"original_string": "private RequestType requestType;",
"type": "RequestType",
"var_name": "requestType"
},
{
"declarator": "accessor",
"modifier": "private",
"original_string": "private Stri... | {
"body": "public String getOption(String option, String defaultValue) {\n return options.getOrDefault(option, defaultValue);\n }",
"class_method_signature": "RequestContext.getOption(String option, String defaultValue)",
"constructor": false,
"full_signature": "public String getOption(String option, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_205 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void filterUtf8() {\n parameters.remove(\"X-GP-HAS-FILTER\");\n parameters.putSingle(\"X-GP-HAS-FILTER\", \"1\");\n String isoString = new String(\"UTF8_計算機用語_00000000\".getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);\n parameters.putSingle(\"X-... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_340 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromQueryWithValidSemicolon() throws Exception {\n String serversDirectory = new File(this.getClass().getClassLoader().getResource(\"servers\").toURI()).getCanonicalPath();\n context.getAdditionalConfigProps().put(\"pxf.config.server.directory\", serversDirector... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(JdbcAccessor.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(JdbcAccessor.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarat... | {
"body": "@Override\n public boolean openForRead() throws SQLException, SQLTimeoutException, ParseException {\n if (statementRead != null && !statementRead.isClosed()) {\n return true;\n }\n\n Connection connection = super.getConnection();\n SQLQueryBuilder sqlQueryBuilder =... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_70 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void testRightTrimWhitespace() {\n assertNull(Utilities.rightTrimWhiteSpace(null));\n assertEquals(\"\", Utilities.rightTrimWhiteSpace(\"\"));\n assertEquals(\"abc\", Utilities.rightTrimWhiteSpace(\"abc\"));\n assertEquals(\" abc\", Utilities.rightTrimWhiteSpac... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static String rightTrimWhiteSpace(String s) {\n if (s == null) return null;\n int length = s.length();\n while (length > 0 && s.charAt(length - 1) == ' ') length--;\n\n if (length == s.length()) return s;\n if (length == 0) return \"\";\n return s.substring(... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_291 | {
"fields": [],
"file": "server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/utilities/HdfsUtilitiesTest.java",
"identifier": "HdfsUtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToString() {\n List<OneField> oneFields = Arrays.asList(new OneField(1, \"uno\"), new OneField(2, \"dos\"), new OneField(3, \"tres\"));\n\n assertEquals(\"uno!dos!tres\", HdfsUtilities.toString(oneFields, \"!\"));\n assertEquals(\"uno\", HdfsUtilities.toStrin... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HdfsUtilities.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(HdfsUtilities.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "server/pxf-hdfs/... | {
"body": "public static String toString(List<OneField> complexRecord, String delimiter) {\n StringBuilder buff = new StringBuilder();\n String delim = \"\"; // first iteration has no delimiter\n if (complexRecord == null)\n return \"\";\n for (OneField complex : complexRecord) ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_157 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void throwsWhenRequiredSegIdHeaderIsMissing() throws Exception {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"Header X-GP-SEGMENT-ID is missing in the request\");\n when(mockServletRequest.getHeader(\"X-GP-USER\")).th... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecurityServletFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecurityServletFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)\n throws IOException, ServletException {\n\n // retrieve user header and make sure header is present and is not empty\n final String gpdbUser = getHeaderValue(... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_229 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "tupleDesc",
"modifier": "private",
"original_string": "private HBaseTupl... | {
"body": "@Test\n /*\n\t * Test construction of HBaseResolver.\n\t *\n\t * HBaseResolver is created and then HBaseTupleDescription\n\t * creation is verified\n\t */\n public void construction() throws Exception {\n context = new RequestContext();\n context.setConfig(\"default\");\n context... | {
"fields": [
{
"declarator": "tupleDescription",
"modifier": "private",
"original_string": "private HBaseTupleDescription tupleDescription;",
"type": "HBaseTupleDescription",
"var_name": "tupleDescription"
}
],
"file": "server/pxf-hbase/src/main/java/org/greenplum/pxf/plugin... | {
"body": "@Override\n public void initialize(RequestContext requestContext) {\n super.initialize(requestContext);\n tupleDescription = new HBaseTupleDescription(context);\n }",
"class_method_signature": "HBaseResolver.initialize(RequestContext requestContext)",
"constructor": false,
"full_s... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_383 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testNormal() {\n DatePartition partition = new DatePartition(COL_RAW, LocalDate.parse(\"2000-01-01\"), LocalDate.parse(\"2000-01-02\"));\n String constraint = partition.toSqlConstraint(QUOTE, dbProduct);\n\n assertEquals(\n COL + \" >= date'2000-01... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "boundaries",
"modifier": "private f... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n if (dbProduct == null) {\n throw new RuntimeException(String.format(\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_100 | {
"fields": [
{
"declarator": "PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\"",
"modifier": "private static final",
"original_string": "private static final String PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\";",
"type": "String"... | {
"body": "@Test\n public void testServerConfigurationImpersonationPropertyTrue() {\n configuration.set(\"pxf.service.user.impersonation\", \"true\");\n assertTrue(secureLogin.isUserImpersonationEnabled(configuration));\n }",
"class_method_signature": "SecureLoginTest.testServerConfigurationImpe... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecureLogin.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecureLogin.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator... | {
"body": "public boolean isUserImpersonationEnabled(Configuration configuration) {\n String valueFromUserImpersonationOnServer = configuration.get(SecureLogin.CONFIG_KEY_SERVICE_USER_IMPERSONATION, System.getProperty(PROPERTY_KEY_USER_IMPERSONATION, \"false\"));\n return StringUtils.equalsIgnoreCase(va... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_395 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testGetInputSerializationDefaults() {\n RequestContext context = getDefaultRequestContext();\n\n InputSerialization inputSerialization =\n new S3SelectAccessor().getInputSerialization(context);\n assertNotNull(inputSerialization);\n assertNo... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "InputSerialization getInputSerialization(RequestContext context) {\n InputSerialization inputSerialization = new InputSerialization();\n\n // We need to infer the format name from the profile (i.e. s3:parquet\n // would return parquet for the format)\n String format = context.in... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_116 | {
"fields": [
{
"declarator": "writableResource",
"modifier": "private",
"original_string": "private WritableResource writableResource;",
"type": "WritableResource",
"var_name": "writableResource"
},
{
"declarator": "mockParser",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void streamPathWithSpecialChars() throws Exception {\n // test path with special characters\n context.setDataSource(\"I'mso<bad>!\");\n Response result = writableResource.stream(mockServletContext, mockHeaders, mockInputStream);\n\n assertEquals(Response.Status... | {
"fields": [
{
"declarator": "bridgeFactory",
"modifier": "private final",
"original_string": "private final BridgeFactory bridgeFactory;",
"type": "BridgeFactory",
"var_name": "bridgeFactory"
}
],
"file": "server/pxf-service/src/main/java/org/greenplum/pxf/service/rest/Writ... | {
"body": "@POST\n @Path(\"stream\")\n @Consumes(MediaType.APPLICATION_OCTET_STREAM)\n public Response stream(@Context final ServletContext servletContext,\n @Context HttpHeaders headers,\n InputStream inputStream) throws Exception {\n\n RequestConte... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_403 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testFileHeaderInfoIsIgnore() {\n RequestContext context = getDefaultRequestContext();\n context.addOption(\"FILE_HEADER\", \"IGNORE\");\n InputSerialization inputSerialization =\n new S3SelectAccessor().getInputSerialization(context);\n asse... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "InputSerialization getInputSerialization(RequestContext context) {\n InputSerialization inputSerialization = new InputSerialization();\n\n // We need to infer the format name from the profile (i.e. s3:parquet\n // would return parquet for the format)\n String format = context.in... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_287 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromQuotedCsvFile() throws Exception {\n prepareTest(\"csv/quoted.csv\", false);\n\n OneRow oneRow = accessor.readNextObject();\n assertNotNull(oneRow);\n assertEquals(\"\\\"1\\\",\\\"2\", oneRow.getData());\n\n oneRow = accessor.readNextObj... | {
"fields": [
{
"declarator": "fileAsRow",
"modifier": "private",
"original_string": "private boolean fileAsRow;",
"type": "boolean",
"var_name": "fileAsRow"
},
{
"declarator": "firstLine",
"modifier": "private",
"original_string": "private boolean firstLine... | {
"body": "@Override\n public OneRow readNextObject() throws IOException {\n if (super.readNextObject() == null) /* check if working segment */ {\n return null;\n }\n\n String nextLine = readLine();\n if (nextLine == null) /* EOF */ {\n return null;\n }\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_268 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnWrite_WithUserProvidedSchema_Binary_NotFound() {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"Failed to obtain Avro schema from 'user-provided.avro'\");\n context.setRequestType(RequestContext.RequestT... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_3 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "factory... | {
"body": "@Test\n public void testInitConfigurationFailsWhenMultipleDirectoriesWithSameName() {\n thrown.expect(IllegalStateException.class);\n thrown.expectMessage(\"Multiple directories found for server dummy. Server directories are expected to be case-insensitive.\");\n\n factory = new Bas... | {
"fields": [
{
"declarator": "instance = new BaseConfigurationFactory()",
"modifier": "private static final",
"original_string": "private static final BaseConfigurationFactory instance = new BaseConfigurationFactory();",
"type": "BaseConfigurationFactory",
"var_name": "instance"
... | {
"body": "@Override\n public Configuration initConfiguration(String configDirectory, String serverName, String userName, Map<String, String> additionalProperties) {\n // start with built-in Hadoop configuration that loads core-site.xml\n LOG.debug(\"Initializing configuration for server {}\", server... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_141 | {
"fields": [],
"file": "server/pxf-service/src/test/java/org/greenplum/pxf/service/utilities/AnalyzeUtilsTest.java",
"identifier": "AnalyzeUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void generateSamplingBitSet() throws Exception {\n runGenerateSamplingBitSetTest(10, 5, new int[]{0, 3, 4, 6, 9});\n\n runGenerateSamplingBitSetTest(9, 8, new int[] {0, 2, 3, 4, 5, 6, 7, 8});\n\n runGenerateSamplingBitSetTest(10, 10, new int[]{0, 1, 2, 3, 4, 5, 6, 7, ... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(AnalyzeUtils.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(AnalyzeUtils.class);",
"type": "Log",
"var_name": "LOG"
}
],
"file": "server/pxf-service/src/m... | {
"body": "static public BitSet generateSamplingBitSet(int poolSize, int sampleSize) {\n\n int skip = 0, chosen = 0, curIndex = 0;\n BitSet bitSet = new BitSet();\n\n if (poolSize <= 0 || sampleSize <= 0) {\n return bitSet;\n }\n\n if (sampleSize >= poolSize) {\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_2 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "factory... | {
"body": "@Test\n public void testGetInstance() {\n assertSame(BaseConfigurationFactory.getInstance(), BaseConfigurationFactory.getInstance());\n }",
"class_method_signature": "BaseConfigurationFactoryTest.testGetInstance()",
"constructor": false,
"full_signature": "@Test public void testGetInstan... | {
"fields": [
{
"declarator": "instance = new BaseConfigurationFactory()",
"modifier": "private static final",
"original_string": "private static final BaseConfigurationFactory instance = new BaseConfigurationFactory();",
"type": "BaseConfigurationFactory",
"var_name": "instance"
... | {
"body": "public static BaseConfigurationFactory getInstance() {\n return instance;\n }",
"class_method_signature": "BaseConfigurationFactory.getInstance()",
"constructor": false,
"full_signature": "public static BaseConfigurationFactory getInstance()",
"identifier": "getInstance",
"invocations":... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_140 | {
"fields": [
{
"declarator": "mockContext",
"modifier": "private",
"original_string": "private RequestContext mockContext;",
"type": "RequestContext",
"var_name": "mockContext"
},
{
"declarator": "mockBridge",
"modifier": "private",
"original_string": "priv... | {
"body": "@Test\n public void getNextRecord100000Records30Sample() throws Exception {\n int expected = 0;\n\n // ratio = 0.0003\n float ratio = (float) (30.0 / 100000.0);\n\n // set 3 records in every 10000.\n samplingBitSet.set(99);\n samplingBitSet.set(999);\n sa... | {
"fields": [
{
"declarator": "sampleBitSet",
"modifier": "private",
"original_string": "private BitSet sampleBitSet;",
"type": "BitSet",
"var_name": "sampleBitSet"
},
{
"declarator": "bitSetSize",
"modifier": "private",
"original_string": "private int bitSe... | {
"body": "@Override\n public Writable getNext() throws Exception {\n Writable output = super.getNext();\n\n // sample - if bit is false, advance to the next object\n while (!sampleBitSet.get(curIndex)) {\n\n if (output == null) {\n break;\n }\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_286 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromSimpleCsvFileFileAsRow() throws Exception {\n prepareTest(\"csv/simple.csv\", true);\n\n OneRow oneRow = accessor.readNextObject();\n assertNotNull(oneRow);\n assertEquals(\"\\\"1,a,b\", oneRow.getData());\n\n oneRow = accessor.readNextO... | {
"fields": [
{
"declarator": "fileAsRow",
"modifier": "private",
"original_string": "private boolean fileAsRow;",
"type": "boolean",
"var_name": "fileAsRow"
},
{
"declarator": "firstLine",
"modifier": "private",
"original_string": "private boolean firstLine... | {
"body": "@Override\n public OneRow readNextObject() throws IOException {\n if (super.readNextObject() == null) /* check if working segment */ {\n return null;\n }\n\n String nextLine = readLine();\n if (nextLine == null) /* EOF */ {\n return null;\n }\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_269 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnWrite_WithUserProvidedSchema_Binary_NotFound_Spaces() {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"Failed to obtain Avro schema from 'user provided.avro'\");\n context.setRequestType(RequestContext.R... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_117 | {
"fields": [
{
"declarator": "writableResource",
"modifier": "private",
"original_string": "private WritableResource writableResource;",
"type": "WritableResource",
"var_name": "writableResource"
},
{
"declarator": "mockParser",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void streamPathWithRegularChars() throws Exception {\n // test path with regular characters\n context.setDataSource(\"whatCAN1tellYOU\");\n Response result = writableResource.stream(mockServletContext, mockHeaders, mockInputStream);\n\n assertEquals(Response.St... | {
"fields": [
{
"declarator": "bridgeFactory",
"modifier": "private final",
"original_string": "private final BridgeFactory bridgeFactory;",
"type": "BridgeFactory",
"var_name": "bridgeFactory"
}
],
"file": "server/pxf-service/src/main/java/org/greenplum/pxf/service/rest/Writ... | {
"body": "@POST\n @Path(\"stream\")\n @Consumes(MediaType.APPLICATION_OCTET_STREAM)\n public Response stream(@Context final ServletContext servletContext,\n @Context HttpHeaders headers,\n InputStream inputStream) throws Exception {\n\n RequestConte... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_402 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testPipeDelimiter() {\n RequestContext context = getDefaultRequestContext();\n context.getGreenplumCSV().withDelimiter(\"|\");\n\n InputSerialization inputSerialization =\n new S3SelectAccessor().getInputSerialization(context);\n assertEqual... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "InputSerialization getInputSerialization(RequestContext context) {\n InputSerialization inputSerialization = new InputSerialization();\n\n // We need to infer the format name from the profile (i.e. s3:parquet\n // would return parquet for the format)\n String format = context.in... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_394 | {
"fields": [
{
"declarator": "FILE_FRAGMENTER = \"org.greenplum.pxf.plugins.hdfs.HdfsFileFragmenter\"",
"modifier": "private static final",
"original_string": "private static final String FILE_FRAGMENTER = \"org.greenplum.pxf.plugins.hdfs.HdfsFileFragmenter\";",
"type": "String",
"v... | {
"body": "@Test\n public void testSelectOnUnsupportedFormat() {\n thrown.expect(RuntimeException.class);\n thrown.expectMessage(\"S3_SELECT optimization is not supported for format 'CUSTOM'\");\n\n context.addOption(\"S3_SELECT\", \"on\");\n context.setFormat(\"custom\");\n hand... | {
"fields": [
{
"declarator": "S3_SELECT_OPTION = \"S3_SELECT\"",
"modifier": "public static final",
"original_string": "public static final String S3_SELECT_OPTION = \"S3_SELECT\";",
"type": "String",
"var_name": "S3_SELECT_OPTION"
},
{
"declarator": "LOG = LoggerFacto... | {
"body": "@Override\n public String getAccessorClassName(RequestContext context) {\n String accessor = context.getAccessor(); // default to accessor defined by the profile\n if (useS3Select(context)) {\n accessor = S3SelectAccessor.class.getName();\n }\n LOG.debug(\"Determin... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_101 | {
"fields": [
{
"declarator": "PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\"",
"modifier": "private static final",
"original_string": "private static final String PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\";",
"type": "String"... | {
"body": "@Test\n public void testServerConfigurationImpersonationPropertyTRUE() {\n configuration.set(\"pxf.service.user.impersonation\", \"TRUE\");\n assertTrue(secureLogin.isUserImpersonationEnabled(configuration));\n }",
"class_method_signature": "SecureLoginTest.testServerConfigurationImpe... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecureLogin.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecureLogin.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator... | {
"body": "public boolean isUserImpersonationEnabled(Configuration configuration) {\n String valueFromUserImpersonationOnServer = configuration.get(SecureLogin.CONFIG_KEY_SERVICE_USER_IMPERSONATION, System.getProperty(PROPERTY_KEY_USER_IMPERSONATION, \"false\"));\n return StringUtils.equalsIgnoreCase(va... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_228 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void testEncodedHeaderValuesIsTrue() throws UnsupportedEncodingException {\n parameters.remove(\"X-GP-DATA-DIR\");\n parameters.putSingle(\"X-GP-DATA-DIR\", URLEncoder.encode(\"\\u0001\", \"UTF-8\"));\n parameters.putSingle(\"X-GP-ENCODED-HEADER-VALUES\", \"trUe\");\n... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_382 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testInvalidNullQuoteString() {\n thrown.expect(RuntimeException.class);\n\n NullPartition partition = new NullPartition(COL_RAW);\n partition.toSqlConstraint(null, dbProduct);\n }",
"class_method_signature": "NullPartitionTest.testInvalidNullQuoteString()",
... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "isNull",
"modifier": "private final... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n\n StringBuilder sb = new StringBuilder();\n\n String columnQuoted = quoteString + ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_156 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void throwsWhenRequiredSegIdHeaderIsEmpty() throws Exception {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"Header X-GP-SEGMENT-ID is empty in the request\");\n when(mockServletRequest.getHeader(\"X-GP-USER\")).thenRe... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecurityServletFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecurityServletFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)\n throws IOException, ServletException {\n\n // retrieve user header and make sure header is present and is not empty\n final String gpdbUser = getHeaderValue(... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_290 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-hdfs/src... | {
"body": "@Test\n public void testGetRecordReader() throws IOException {\n thrown.expect(UnsupportedOperationException.class);\n thrown.expectMessage(\"PxfInputFormat should not be used for reading data, but only for obtaining the splits of a file\");\n new PxfInputFormat().getRecordReader(nu... | {
"fields": [],
"file": "server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/utilities/PxfInputFormat.java",
"identifier": "PxfInputFormat",
"interfaces": "",
"methods": [
{
"class_method_signature": "PxfInputFormat.getRecordReader(InputSplit split,\n ... | {
"body": "@Override\n public RecordReader getRecordReader(InputSplit split,\n JobConf conf,\n Reporter reporter) {\n throw new UnsupportedOperationException(\"PxfInputFormat should not be used for reading data, but only for obtai... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_71 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void validDirectoryName() {\n assertTrue(Utilities.isValidDirectoryName(\"/etc/hadoop/conf\"));\n assertTrue(Utilities.isValidDirectoryName(\"foo\"));\n }",
"class_method_signature": "UtilitiesTest.validDirectoryName()",
"constructor": false,
"full_signature": "@Tes... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static boolean isValidDirectoryName(String name) {\n return isValidRestrictedDirectoryName(name, false);\n }",
"class_method_signature": "Utilities.isValidDirectoryName(String name)",
"constructor": false,
"full_signature": "public static boolean isValidDirectoryName(String name)",
... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_204 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void nullUserThrowsException() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"Property USER has no value in the current request\");\n\n parameters.remove(\"X-GP-USER\");\n parser.parseRequest(mockRequestHeaders, RequestType.FRAGMENT... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_341 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromQueryWithPartitions() throws Exception {\n String serversDirectory = new File(this.getClass().getClassLoader().getResource(\"servers\").toURI()).getCanonicalPath();\n context.getAdditionalConfigProps().put(\"pxf.config.server.directory\", serversDirectory + ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(JdbcAccessor.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(JdbcAccessor.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarat... | {
"body": "@Override\n public boolean openForRead() throws SQLException, SQLTimeoutException, ParseException {\n if (statementRead != null && !statementRead.isClosed()) {\n return true;\n }\n\n Connection connection = super.getConnection();\n SQLQueryBuilder sqlQueryBuilder =... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_195 | {
"fields": [
{
"declarator": "response = null",
"modifier": "",
"original_string": "MetadataResponse response = null;",
"type": "MetadataResponse",
"var_name": "response"
}
],
"file": "server/pxf-service/src/test/java/org/greenplum/pxf/service/MetadataResponseFormatterTest.j... | {
"body": "@Test\n public void formatResponseStringWithMultiplePathsAndItems() throws Exception {\n List <Metadata> metdataList = new ArrayList<Metadata>();\n for (int i=1; i<=10; i++) {\n List<Metadata.Field> fields = new ArrayList<Metadata.Field>();\n Metadata.Item itemName = ... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(MetadataResponseFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(MetadataResponseFormatter.class);",
"type": "Log",
"var_name": "LOG"
}
],
"file":... | {
"body": "public static MetadataResponse formatResponse(List<Metadata> metadataList, String path) throws IOException {\n /* print the fragment list to log when in debug level */\n if (LOG.isDebugEnabled()) {\n MetadataResponseFormatter.printMetadata(metadataList, path);\n }\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_26 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "context... | {
"body": "@Test\n public void testReturnDefaultNaturalIntOptionValue() {\n assertEquals(77, context.getOption(\"foo\", 77, true));\n }",
"class_method_signature": "RequestContextTest.testReturnDefaultNaturalIntOptionValue()",
"constructor": false,
"full_signature": "@Test public void testReturnDef... | {
"fields": [
{
"declarator": "requestType",
"modifier": "private",
"original_string": "private RequestType requestType;",
"type": "RequestType",
"var_name": "requestType"
},
{
"declarator": "accessor",
"modifier": "private",
"original_string": "private Stri... | {
"body": "public String getOption(String option, String defaultValue) {\n return options.getOrDefault(option, defaultValue);\n }",
"class_method_signature": "RequestContext.getOption(String option, String defaultValue)",
"constructor": false,
"full_signature": "public String getOption(String option, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_253 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WhenUserProvidedSchema_Json_NotFound() {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"Failed to obtain Avro schema from 'user-provided.avsc'\");\n context.setRequestType(RequestContext.RequestType... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_316 | {
"fields": [
{
"declarator": "hiveColumn",
"modifier": "",
"original_string": "FieldSchema hiveColumn;",
"type": "FieldSchema",
"var_name": "hiveColumn"
},
{
"declarator": "typesMappings = {\n /* hive type -> gpdb type */\n {\"tinyint\", \"int2\"}... | {
"body": "@Test\n public void testCompatibleHiveTypeWithModifiers() {\n\n Integer[] gpdbModifiers;\n String compatibleTypeName;\n\n gpdbModifiers = new Integer[]{5};\n compatibleTypeName = HiveUtilities.toCompatibleHiveType(DataType.BPCHAR, gpdbModifiers);\n assertEquals(compati... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HiveUtilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HiveUtilities.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public static String toCompatibleHiveType(DataType type, Integer[] modifiers) {\n\n EnumHiveToGpdbType hiveToGpdbType = EnumHiveToGpdbType.getCompatibleHiveToGpdbType(type);\n return EnumHiveToGpdbType.getFullHiveTypeName(hiveToGpdbType, modifiers);\n }",
"class_method_signature": "HiveU... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_183 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void testOptionMappingsEmptyMapping() {\n ProfilesConf profilesConf = getProfilesConf(\"optionMappings\");\n Map<String, String> map = profilesConf.getOptionMappings(\"empty-mappings\");\n assertTrue(map.isEmpty());\n }",
"class_method_signature": "ProfilesConfTe... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getOptionMappings(String profileName) {\n return getProfile(profileName).getOptionsMap();\n }",
"class_method_signature": "ProfilesConf.getOptionMappings(String profileName)",
"constructor": false,
"full_signature": "@Override public Map<String, Str... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_30 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void testGetFragments() throws Exception {\n List<Fragment> fragments = new BaseFragmenter().getFragments();\n assertNotNull(fragments);\n assertEquals(0, fragments.size());\n }",
"class_method_signature": "BaseFragmenterTest.testGetFragments()",
"constructor":... | {
"fields": [
{
"declarator": "fragments = new LinkedList<>()",
"modifier": "protected",
"original_string": "protected List<Fragment> fragments = new LinkedList<>();",
"type": "List<Fragment>",
"var_name": "fragments"
}
],
"file": "server/pxf-api/src/main/java/org/greenplum/p... | {
"body": "@Override\n public List<Fragment> getFragments() throws Exception {\n return fragments;\n }",
"class_method_signature": "BaseFragmenter.getFragments()",
"constructor": false,
"full_signature": "@Override public List<Fragment> getFragments()",
"identifier": "getFragments",
"invocation... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_245 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WithUserProvidedSchema_Json_FullPathToLocalFile() {\n context.setRequestType(RequestContext.RequestType.READ_BRIDGE);\n context.addOption(\"SCHEMA\", avroDirectory + \"user-provided.avsc\");\n\n schema = avroUtilities.obtainSchema(context,... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_300 | {
"fields": [
{
"declarator": "fragmenter",
"modifier": "private",
"original_string": "private Fragmenter fragmenter;",
"type": "Fragmenter",
"var_name": "fragmenter"
},
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestCon... | {
"body": "@Test\n public void testFragmenterErrorsWhenPathDoesNotExist() throws Exception {\n expectedException.expect(InvalidInputException.class);\n expectedException.expectMessage(\"Input path does not exist:\");\n\n String path = this.getClass().getClassLoader().getResource(\"csv/\").getP... | {
"fields": [],
"file": "server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/HdfsFileFragmenter.java",
"identifier": "HdfsFileFragmenter",
"interfaces": "",
"methods": [
{
"class_method_signature": "HdfsFileFragmenter.HdfsFileFragmenter()",
"constructor": true,
"full_signature":... | {
"body": "@Override\n public List<Fragment> getFragments() throws Exception {\n String fileName = hcfsType.getDataUri(jobConf, context);\n Path path = new Path(fileName);\n\n PxfInputFormat pxfInputFormat = new PxfInputFormat();\n PxfInputFormat.setInputPaths(jobConf, path);\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_88 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void testSecurityIsDisabledWithSimpleAuthentication() {\n Configuration configuration = new Configuration();\n configuration.set(\"hadoop.security.authentication\", \"simple\");\n assertFalse(Utilities.isSecurityEnabled(configuration));\n }",
"class_method_signat... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static boolean isSecurityEnabled(Configuration configuration) {\n return SecurityUtil.getAuthenticationMethod(configuration) !=\n UserGroupInformation.AuthenticationMethod.SIMPLE;\n }",
"class_method_signature": "Utilities.isSecurityEnabled(Configuration configuration)",
... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_67 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-api/src/... | {
"body": "@Test\n public void testPruningRootNodeAndPromotingRightChildToRootDuringVisit() {\n Node root = new Node();\n Node right = new Node();\n root.setRight(right);\n TreeVisitor visitor = mock(TreeVisitor.class);\n\n // l0\n // |\n // ----... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(TreeTraverser.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(TreeTraverser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public Node traverse(Node node, TreeVisitor... visitors) {\n\n if (ArrayUtils.isEmpty(visitors)) {\n throw new IllegalArgumentException(\"You need to provide at least one visitor for this traverser\");\n }\n\n Node result = node;\n for (TreeVisitor visitor : visitors)... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_212 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void typeModNonIntegerFails() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"ATTR-TYPEMOD0-0 must be an integer\");\n\n parameters.putSingle(\"X-GP-ATTRS\", \"1\");\n parameters.putSingle(\"X-GP-ATTR-NAME0\", \"vc1\");\n para... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_357 | {
"fields": [],
"file": "server/pxf-jdbc/src/test/java/org/greenplum/pxf/plugins/jdbc/utils/HiveJdbcUtilsTest.java",
"identifier": "HiveJdbcUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testURLWithImpersonationPropertyEnd() throws Exception {\n String url = \"jdbc:hive2://server:10000/default;otherProperty=otherValue;saslQop=auth-conf;hive.server2.proxy.user=bar\";\n assertEquals(\"jdbc:hive2://server:10000/default;otherProperty=otherValue;saslQop=auth... | {
"fields": [
{
"declarator": "HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\"",
"modifier": "private static final",
"original_string": "private static final String HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\";",
"type": "String",
"var_name": "HIVE_UR... | {
"body": "public static String updateImpersonationPropertyInHiveJdbcUrl(String url, String user) {\n String suffix, prefix = null;\n int terminatorIndex = findTerminatorIndex(url, 0, TERMINATORS_TWO_CHARS);\n\n // impersonation property might already be in the URL\n int impersonationPrope... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_320 | {
"fields": [
{
"declarator": "hiveColumn",
"modifier": "",
"original_string": "FieldSchema hiveColumn;",
"type": "FieldSchema",
"var_name": "hiveColumn"
},
{
"declarator": "typesMappings = {\n /* hive type -> gpdb type */\n {\"tinyint\", \"int2\"}... | {
"body": "@Test\n public void mapHiveTypeComplex() throws Exception {\n /*\n * array<dataType> -> text\n * map<keyDataType, valueDataType> -> text\n * struct<fieldName1:dataType, ..., fieldNameN:dataType> -> text\n * uniontype<...> -> text\n */\n for (String[]... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HiveUtilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HiveUtilities.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public static Metadata.Field mapHiveType(FieldSchema hiveColumn) throws UnsupportedTypeException {\n String fieldName = hiveColumn.getName();\n String hiveType = hiveColumn.getType(); // Type name and modifiers if any\n String hiveTypeName; // Type name\n String[] modifiers = nu... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_265 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnWrite_WithUserProvidedSchema_Binary_OnClasspath_Spaces() {\n context.setRequestType(RequestContext.RequestType.WRITE_BRIDGE);\n context.addOption(\"SCHEMA\", \"avro/user provided.avro\");\n\n schema = avroUtilities.obtainSchema(context, configu... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_10 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "factory... | {
"body": "@Test\n public void testConfigurationsNotLoadedForUnknownServer() {\n additionalProperties.put(\"test.newOption\", \"newOption\");\n additionalProperties.put(\"test.red\", \"purple\");\n Configuration configuration = factory.initConfiguration(\"unknown\", \"unknown\", \"dummy\", add... | {
"fields": [
{
"declarator": "instance = new BaseConfigurationFactory()",
"modifier": "private static final",
"original_string": "private static final BaseConfigurationFactory instance = new BaseConfigurationFactory();",
"type": "BaseConfigurationFactory",
"var_name": "instance"
... | {
"body": "@Override\n public Configuration initConfiguration(String configDirectory, String serverName, String userName, Map<String, String> additionalProperties) {\n // start with built-in Hadoop configuration that loads core-site.xml\n LOG.debug(\"Initializing configuration for server {}\", server... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_377 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testExcluded1() {\n EnumPartition partition = new EnumPartition(COL_RAW, new String[]{\"enum1\"});\n String constraint = partition.toSqlConstraint(QUOTE, dbProduct);\n\n assertEquals(\"( \\\"col\\\" <> 'enum1' )\", constraint);\n }",
"class_method_signature"... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "value",
"modifier": "private final"... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n\n StringBuilder sb = new StringBuilder();\n\n String quotedColumn = quoteString + ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_232 | {
"fields": [
{
"declarator": "PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS)",
"modifier": "private static final",
"original_string": "private static final TreeVisitor PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS);",
"type": "TreeVisitor",
"var_name": "PRUNER"... | {
"body": "@Test\n public void parseIsNullExpression() throws Exception {\n Filter filter = helper(\"a1o8\", tupleDescription);\n assertTrue(filter instanceof SingleColumnValueFilter);\n\n SingleColumnValueFilter result = (SingleColumnValueFilter) filter;\n assertNotNull(result);\n ... | {
"fields": [
{
"declarator": "OPERATORS_MAP =\n Collections.unmodifiableMap(new HashMap<Operator, CompareFilter.CompareOp>() {{\n put(Operator.LESS_THAN, CompareFilter.CompareOp.LESS); // \"<\"\n put(Operator.GREATER_THAN, CompareFilter.CompareOp.GREATER); // \">\"\... | {
"body": "private ByteArrayComparable getComparator(int type, OperandNode data) {\n ByteArrayComparable result;\n switch (DataType.get(type)) {\n case TEXT:\n result = new BinaryComparator(Bytes.toBytes(data.toString()));\n break;\n case SMALLINT:\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_398 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testParquetInputSerialization() {\n RequestContext context = getRequestContext(\"s3:parquet\");\n context.setFormat(\"parquet\");\n\n InputSerialization inputSerialization =\n new S3SelectAccessor().getInputSerialization(context);\n assertNo... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "InputSerialization getInputSerialization(RequestContext context) {\n InputSerialization inputSerialization = new InputSerialization();\n\n // We need to infer the format name from the profile (i.e. s3:parquet\n // would return parquet for the format)\n String format = context.in... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_47 | {
"fields": [
{
"declarator": "filterParser",
"modifier": "private",
"original_string": "private FilterParser filterParser;",
"type": "FilterParser",
"var_name": "filterParser"
},
{
"declarator": "filter",
"modifier": "private",
"original_string": "private S... | {
"body": "@Test\n public void parseLogicalAndOperator() throws Exception {\n filter = \"a1c20s1d0o5a2c20s1d3o2l0\";\n\n Node result = filterParser.parse(filter);\n assertNotNull(result);\n assertOperatorEquals(AND, result);\n assertEquals(2, result.childCount());\n assert... | {
"fields": [
{
"declarator": "index",
"modifier": "private",
"original_string": "private int index;",
"type": "int",
"var_name": "index"
},
{
"declarator": "filterByteArr",
"modifier": "private",
"original_string": "private byte[] filterByteArr;",
"ty... | {
"body": "public Node parse(String filterString) throws Exception {\n\n if (filterString == null) {\n throw new FilterStringSyntaxException(\"filter parsing ended with no result\");\n }\n\n return parse(filterString.getBytes(DEFAULT_CHARSET));\n }",
"class_method_signature": "Fil... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_361 | {
"fields": [],
"file": "server/pxf-jdbc/src/test/java/org/greenplum/pxf/plugins/jdbc/utils/HiveJdbcUtilsTest.java",
"identifier": "HiveJdbcUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testURLWithImpersonationPropertyAndHash() throws Exception {\n String url = \"jdbc:hive2://server:10000/default;hive.server2.proxy.user=bar#hive.server2.proxy.user=bar\";\n assertEquals(\"jdbc:hive2://server:10000/default;hive.server2.proxy.user=foo#hive.server2.proxy.u... | {
"fields": [
{
"declarator": "HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\"",
"modifier": "private static final",
"original_string": "private static final String HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\";",
"type": "String",
"var_name": "HIVE_UR... | {
"body": "public static String updateImpersonationPropertyInHiveJdbcUrl(String url, String user) {\n String suffix, prefix = null;\n int terminatorIndex = findTerminatorIndex(url, 0, TERMINATORS_TWO_CHARS);\n\n // impersonation property might already be in the URL\n int impersonationPrope... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_224 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void testWritePath() {\n RequestContext context = parser.parseRequest(mockRequestHeaders, RequestType.WRITE_BRIDGE);\n assertEquals(RequestType.WRITE_BRIDGE, context.getRequestType());\n }",
"class_method_signature": "HttpRequestParserTest.testWritePath()",
"construct... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_51 | {
"fields": [
{
"declarator": "filterParser",
"modifier": "private",
"original_string": "private FilterParser filterParser;",
"type": "FilterParser",
"var_name": "filterParser"
},
{
"declarator": "filter",
"modifier": "private",
"original_string": "private S... | {
"body": "@Test\n public void parseLogicalOperatorNotExpression() throws Exception {\n filter = \"a1c25s5dfirsto5a2c20s1d2o2l0l2\";\n\n Node result = filterParser.parse(filter);\n assertOperatorEquals(NOT, result);\n assertEquals(1, result.childCount());\n assertOperatorEquals(A... | {
"fields": [
{
"declarator": "index",
"modifier": "private",
"original_string": "private int index;",
"type": "int",
"var_name": "index"
},
{
"declarator": "filterByteArr",
"modifier": "private",
"original_string": "private byte[] filterByteArr;",
"ty... | {
"body": "public Node parse(String filterString) throws Exception {\n\n if (filterString == null) {\n throw new FilterStringSyntaxException(\"filter parsing ended with no result\");\n }\n\n return parse(filterString.getBytes(DEFAULT_CHARSET));\n }",
"class_method_signature": "Fil... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_336 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromQueryFailsWhenQueryFileIsNotFoundInExistingDirectory() throws Exception {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"Failed to read text of query foo : File '/tmp/foo.sql' does not exist\");\n context.getAd... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(JdbcAccessor.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(JdbcAccessor.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarat... | {
"body": "@Override\n public boolean openForRead() throws SQLException, SQLTimeoutException, ParseException {\n if (statementRead != null && !statementRead.isClosed()) {\n return true;\n }\n\n Connection connection = super.getConnection();\n SQLQueryBuilder sqlQueryBuilder =... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_273 | {
"fields": [
{
"declarator": "avroSchemaFileReaderFactory",
"modifier": "private",
"original_string": "private AvroSchemaFileReaderFactory avroSchemaFileReaderFactory;",
"type": "AvroSchemaFileReaderFactory",
"var_name": "avroSchemaFileReaderFactory"
}
],
"file": "server/pxf... | {
"body": "@Test\n public void testGetBinaryReader() {\n assertTrue(avroSchemaFileReaderFactory.getAvroSchemaFileReader(\"foobar.avro\") instanceof BinaryAvroSchemaFileReader);\n }",
"class_method_signature": "AvroSchemaFileReaderFactoryTest.testGetBinaryReader()",
"constructor": false,
"full_signa... | {
"fields": [
{
"declarator": "instance = new AvroSchemaFileReaderFactory()",
"modifier": "private static final",
"original_string": "private static final AvroSchemaFileReaderFactory instance = new AvroSchemaFileReaderFactory();",
"type": "AvroSchemaFileReaderFactory",
"var_name": "i... | {
"body": "public AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile) {\n if (userProvidedSchemaFile.matches(\"^.*\\\\.avsc$\")) {\n return new JsonAvroSchemaFileReader();\n }\n return new BinaryAvroSchemaFileReader();\n }",
"class_method_signature": "AvroS... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_208 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void testInvalidStatsMaxFragmentsValue() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"For input string: \\\"10.101\\\"\");\n\n parameters.putSingle(\"X-GP-OPTIONS-STATS-MAX-FRAGMENTS\", \"10.101\");\n parser.parseRequest(mockReque... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_92 | {
"fields": [
{
"declarator": "PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\"",
"modifier": "private static final",
"original_string": "private static final String PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\";",
"type": "String"... | {
"body": "@Test\n public void testLoginKerberosFailsWhenNoPrincipal() throws IOException {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"PXF service login failed for server test : Kerberos Security for server test requires a valid principal.\");\n\n P... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecureLogin.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecureLogin.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator... | {
"body": "public UserGroupInformation getLoginUser(RequestContext context, Configuration configuration) throws IOException {\n return getLoginUser(context.getServerName(), context.getConfig(), configuration);\n }",
"class_method_signature": "SecureLogin.getLoginUser(RequestContext context, Configuration ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_121 | {
"fields": [
{
"declarator": "parser",
"modifier": "@Mock private",
"original_string": "@Mock private RequestParser parser;",
"type": "RequestParser",
"var_name": "parser"
},
{
"declarator": "fragmenterFactory",
"modifier": "@Mock private",
"original_string... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testMultiThreadedAccessToFragments() throws Throwable {\n final AtomicInteger finishedCount = new AtomicInteger();\n\n int threadCount = 100;\n Thread[] threads = new Thread[threadCount];\n final Fragmenter fragmenter ... | {
"fields": [
{
"declarator": "fragmenterFactory",
"modifier": "private",
"original_string": "private FragmenterFactory fragmenterFactory;",
"type": "FragmenterFactory",
"var_name": "fragmenterFactory"
},
{
"declarator": "fragmenterCacheFactory",
"modifier": "priv... | {
"body": "@GET\n @Path(\"getFragments\")\n @Produces(\"application/json\")\n public Response getFragments(@Context final ServletContext servletContext,\n @Context final HttpHeaders headers)\n throws Throwable {\n\n LOG.debug(\"Received FRAGMENTER call\");\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_199 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void pluginsRedefinedByProfileFails() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"Profile 'test-profile' already defines: [resolver, accessor]\");\n\n Map<String, String> mockedPlugins = new HashMap<>();\n mockedPlugins.put(\"fra... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_176 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void duplicateProfileDefinition() {\n ProfilesConf profilesConf = getProfilesConf(\"duplicateProfileDefinition\");\n profilesConf.getPlugins(\"HBase\");\n }",
"class_method_signature": "ProfilesConfTest.duplicateProfileDefinition()",
"constructor": false,
"full_sign... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getPlugins(String profileName) {\n Profile profile = getProfile(profileName);\n Map<String, String> result = profile.getPluginsMap();\n if (result.isEmpty()) {\n throw new ProfileConfException(NO_PLUGINS_IN_PROFILE_DEF, profileName, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_249 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WithUserProvidedSchema_Json_OnClasspath() {\n context.setRequestType(RequestContext.RequestType.READ_BRIDGE);\n context.addOption(\"SCHEMA\", \"avro/user-provided.avsc\");\n\n schema = avroUtilities.obtainSchema(context, configuration, hcf... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_160 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void determineRemoteUser_IsGpdbUser_NoKerberos_Impersonation_NoServiceUser() throws Exception {\n expectScenario(false, true, false);\n filter.doFilter(mockServletRequest, mockServletResponse, mockFilterChain);\n verifyScenario(\"gpdb-user\", true);\n }",
"class_... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecurityServletFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecurityServletFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)\n throws IOException, ServletException {\n\n // retrieve user header and make sure header is present and is not empty\n final String gpdbUser = getHeaderValue(... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_84 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void testFragmenterCachePropertyFoo() {\n System.setProperty(PROPERTY_KEY_FRAGMENTER_CACHE, \"foo\");\n assertTrue(Utilities.isFragmenterCacheEnabled());\n }",
"class_method_signature": "UtilitiesTest.testFragmenterCachePropertyFoo()",
"constructor": false,
"full_si... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static boolean isFragmenterCacheEnabled() {\n return !StringUtils.equalsIgnoreCase(System.getProperty(PROPERTY_KEY_FRAGMENTER_CACHE, \"true\"), \"false\");\n }",
"class_method_signature": "Utilities.isFragmenterCacheEnabled()",
"constructor": false,
"full_signature": "public static b... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_137 | {
"fields": [
{
"declarator": "mockContext",
"modifier": "private",
"original_string": "private RequestContext mockContext;",
"type": "RequestContext",
"var_name": "mockContext"
},
{
"declarator": "mockBridge",
"modifier": "private",
"original_string": "priv... | {
"body": "@Test\n public void getNextRecord100Records10Percent() throws Exception {\n\n // set 10 bits from 5 to 14.\n samplingBitSet.set(5, 15);\n recordsLimit = 100;\n when(mockContext.getStatsSampleRatio()).thenReturn((float) 0.1);\n\n readSamplingBridge = new ReadSamplingBri... | {
"fields": [
{
"declarator": "sampleBitSet",
"modifier": "private",
"original_string": "private BitSet sampleBitSet;",
"type": "BitSet",
"var_name": "sampleBitSet"
},
{
"declarator": "bitSetSize",
"modifier": "private",
"original_string": "private int bitSe... | {
"body": "@Override\n public Writable getNext() throws Exception {\n Writable output = super.getNext();\n\n // sample - if bit is false, advance to the next object\n while (!sampleBitSet.get(curIndex)) {\n\n if (output == null) {\n break;\n }\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_215 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void whitelistedOptionsAreAddedAsProperties() {\n parameters.putSingle(\"X-GP-OPTIONS-PROFILE\", \"test-profile\");\n parameters.putSingle(\"X-GP-OPTIONS-CONFIGPROP1\", \"config-prop-value1\");\n parameters.putSingle(\"X-GP-OPTIONS-CONFIGPROP3\", \"config-prop-value3\... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_350 | {
"fields": [],
"file": "server/pxf-jdbc/src/test/java/org/greenplum/pxf/plugins/jdbc/utils/HiveJdbcUtilsTest.java",
"identifier": "HiveJdbcUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testURLWithoutProperties() throws Exception {\n String url = \"jdbc:hive2://server:10000/default\";\n assertEquals(\"jdbc:hive2://server:10000/default;hive.server2.proxy.user=foo\",\n HiveJdbcUtils.updateImpersonationPropertyInHiveJdbcUrl(url, \"foo\"));\... | {
"fields": [
{
"declarator": "HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\"",
"modifier": "private static final",
"original_string": "private static final String HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\";",
"type": "String",
"var_name": "HIVE_UR... | {
"body": "public static String updateImpersonationPropertyInHiveJdbcUrl(String url, String user) {\n String suffix, prefix = null;\n int terminatorIndex = findTerminatorIndex(url, 0, TERMINATORS_TWO_CHARS);\n\n // impersonation property might already be in the URL\n int impersonationPrope... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_60 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-api/src/... | {
"body": "@Test\n public void testPruningRootNodeDuringBefore() {\n Node root = new Node();\n TreeVisitor visitor = mock(TreeVisitor.class);\n Node result = new TreeTraverser().traverse(root, visitor);\n\n verify(visitor).before(root, 0);\n verify(visitor).visit(result, 0);\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(TreeTraverser.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(TreeTraverser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public Node traverse(Node node, TreeVisitor... visitors) {\n\n if (ArrayUtils.isEmpty(visitors)) {\n throw new IllegalArgumentException(\"You need to provide at least one visitor for this traverser\");\n }\n\n Node result = node;\n for (TreeVisitor visitor : visitors)... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_242 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WithUserProvidedSchema_Json_HCFS_Spaces() {\n avroUtilities = new AvroUtilities((file) -> dontFindLocalFile());\n context.setRequestType(RequestContext.RequestType.READ_BRIDGE);\n context.addOption(\"SCHEMA\", avroDirectory + \"user provid... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_307 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private CodecFactory factory;",
"type": "CodecFactory",
"var_name": "factory"
},
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"origin... | {
"body": "@Test\n public void getCodecGzip() {\n Configuration conf = new Configuration();\n String name = \"org.apache.hadoop.io.compress.GzipCodec\";\n\n CompressionCodec codec = factory.getCodec(name, conf);\n assertNotNull(codec);\n assertEquals(\".gz\", codec.getDefaultExte... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(CodecFactory.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(CodecFactory.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "codecF... | {
"body": "public CompressionCodecName getCodec(String name, CompressionCodecName defaultCodec) {\n if (name == null) return defaultCodec;\n\n try {\n return CompressionCodecName.fromConf(name);\n } catch (IllegalArgumentException ie) {\n try {\n return Compre... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_184 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void testOptionMappingsOneMapping() {\n ProfilesConf profilesConf = getProfilesConf(\"optionMappings\");\n Map<String, String> map = profilesConf.getOptionMappings(\"one-mapping\");\n\n assertEquals(1, map.size());\n assertEquals(\"property1\", map.get(\"option... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getOptionMappings(String profileName) {\n return getProfile(profileName).getOptionsMap();\n }",
"class_method_signature": "ProfilesConf.getOptionMappings(String profileName)",
"constructor": false,
"full_signature": "@Override public Map<String, Str... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_37 | {
"fields": [
{
"declarator": "gpCSV",
"modifier": "private",
"original_string": "private GreenplumCSV gpCSV;",
"type": "GreenplumCSV",
"var_name": "gpCSV"
},
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_str... | {
"body": "@Test\n public void testCsvOptionWithEscapeCharInvalidLength() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"invalid ESCAPE character '\\\\\\\\'. Only single character is allowed for ESCAPE.\");\n gpCSV.withEscapeChar(\"\\\\\\\\\");\n }",
"class_me... | {
"fields": [
{
"declarator": "QUOTE = '\"'",
"modifier": "private static final",
"original_string": "private static final char QUOTE = '\"';",
"type": "char",
"var_name": "QUOTE"
},
{
"declarator": "ESCAPE = '\"'",
"modifier": "private static final",
"origi... | {
"body": "public GreenplumCSV withEscapeChar(String escapeString) {\n if (StringUtils.equalsIgnoreCase(\"OFF\", escapeString)) {\n escape = null;\n } else if (StringUtils.isNotEmpty(escapeString)) {\n validateSingleCharacter(escapeString, \"ESCAPE\");\n withEscapeChar(e... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_254 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WhenUserProvidedSchema_Json_NotFound_Spaces() {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"Failed to obtain Avro schema from 'user provided.avsc'\");\n context.setRequestType(RequestContext.Requ... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_311 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "accessor",
"modifier": "private",
"original_string": "private HiveORCAcc... | {
"body": "@Test(expected = IllegalStateException.class)\n public void emitAggObjectCountStatsNotInitialized() {\n accessor.emitAggObject();\n }",
"class_method_signature": "HiveORCAccessorTest.emitAggObjectCountStatsNotInitialized()",
"constructor": false,
"full_signature": "@Test(expected = Illeg... | {
"fields": [
{
"declarator": "KRYO_BUFFER_SIZE = 4 * 1024",
"modifier": "private static final",
"original_string": "private static final int KRYO_BUFFER_SIZE = 4 * 1024;",
"type": "int",
"var_name": "KRYO_BUFFER_SIZE"
},
{
"declarator": "KRYO_MAX_BUFFER_SIZE = 10 * 102... | {
"body": "@Override\n public OneRow emitAggObject() {\n if (!statsInitialized) {\n throw new IllegalStateException(\"retrieveStats() should be called before calling emitAggObject()\");\n }\n OneRow row = null;\n if (context.getAggType() == null)\n throw new Unsupp... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_192 | {
"fields": [
{
"declarator": "response = null",
"modifier": "",
"original_string": "MetadataResponse response = null;",
"type": "MetadataResponse",
"var_name": "response"
}
],
"file": "server/pxf-service/src/test/java/org/greenplum/pxf/service/MetadataResponseFormatterTest.j... | {
"body": "@Test\n public void formatResponseStringNoFields() throws Exception {\n List<Metadata> metadataList = new ArrayList<Metadata>();\n Metadata.Item itemName = new Metadata.Item(\"default\", \"table1\");\n Metadata metadata = new Metadata(itemName, null);\n metadataList.add(metad... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(MetadataResponseFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(MetadataResponseFormatter.class);",
"type": "Log",
"var_name": "LOG"
}
],
"file":... | {
"body": "public static MetadataResponse formatResponse(List<Metadata> metadataList, String path) throws IOException {\n /* print the fragment list to log when in debug level */\n if (LOG.isDebugEnabled()) {\n MetadataResponseFormatter.printMetadata(metadataList, path);\n }\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_21 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "context... | {
"body": "@Test\n public void testStatsSampleRatioFailsOnOver1() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"Wrong value '1.1'. STATS-SAMPLE-RATIO must be a value between 0.0001 and 1.0\");\n context.setStatsSampleRatio(1.1f);\n }",
"class_method_signature... | {
"fields": [
{
"declarator": "requestType",
"modifier": "private",
"original_string": "private RequestType requestType;",
"type": "RequestType",
"var_name": "requestType"
},
{
"declarator": "accessor",
"modifier": "private",
"original_string": "private Stri... | {
"body": "public void setStatsSampleRatio(float statsSampleRatio) {\n this.statsSampleRatio = statsSampleRatio;\n if (statsSampleRatio < 0.0001 || statsSampleRatio > 1.0) {\n throw new IllegalArgumentException(\n \"Wrong value '\"\n + statsSample... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_203 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void getFragmentMetadataNotBase64() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"Fragment metadata information must be Base64 encoded. (Bad value: so b@d)\");\n\n String badValue = \"so b@d\";\n parameters.putSingle(\"X-GP-FRAGMEN... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_346 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testGetConnectionPoolDisabled() throws SQLException {\n when(DriverManager.getConnection(\"test-url\", connProps)).thenReturn(mockConnection);\n Connection conn = manager.getConnection(\"test-server\", \"test-url\", connProps, false, null, null);\n assertSame(moc... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ConnectionManager.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ConnectionManager.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "public Connection getConnection(String server, String jdbcUrl, Properties connectionConfiguration, boolean isPoolEnabled, Properties poolConfiguration, String qualifier) throws SQLException {\n\n Connection result;\n if (!isPoolEnabled) {\n LOG.debug(\"Requesting DriverManager.getC... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_99 | {
"fields": [
{
"declarator": "PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\"",
"modifier": "private static final",
"original_string": "private static final String PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\";",
"type": "String"... | {
"body": "@Test\n public void testServerConfigurationImpersonationPropertyFalse() {\n configuration.set(\"pxf.service.user.impersonation\", \"foo\");\n assertFalse(secureLogin.isUserImpersonationEnabled(configuration));\n }",
"class_method_signature": "SecureLoginTest.testServerConfigurationImp... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecureLogin.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecureLogin.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator... | {
"body": "public boolean isUserImpersonationEnabled(Configuration configuration) {\n String valueFromUserImpersonationOnServer = configuration.get(SecureLogin.CONFIG_KEY_SERVICE_USER_IMPERSONATION, System.getProperty(PROPERTY_KEY_USER_IMPERSONATION, \"false\"));\n return StringUtils.equalsIgnoreCase(va... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_76 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void byteArrayToOctalString() throws Exception {\n String orig = \"Have Narisha\";\n String octal = \"Rash Rash Rash!\";\n String expected = orig + \"\\\\\\\\122\\\\\\\\141\\\\\\\\163\\\\\\\\150\\\\\\\\040\"\n + \"\\\\\\\\122\\\\\\\\141\\\\\\\\163\\\\\\... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static void byteArrayToOctalString(byte[] bytes, StringBuilder sb) {\n if ((bytes == null) || (sb == null)) {\n return;\n }\n\n sb.ensureCapacity(sb.length()\n + (bytes.length * 5 /* characters per byte */));\n for (int b : bytes) {\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_297 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "resolve... | {
"body": "@Test\n public void testGetFields_Primitive_Repeated_Synthetic() {\n // this test does not read the actual Parquet file, but rather construct Group object synthetically\n schema = getParquetSchemaForPrimitiveTypes(Type.Repetition.REPEATED, true);\n // schema has changed, set metadat... | {
"fields": [
{
"declarator": "TIMESTAMP_PATTERN = Pattern.compile(\"[+-]\\\\d{2}(:\\\\d{2})?$\")",
"modifier": "public static final",
"original_string": "public static final Pattern TIMESTAMP_PATTERN = Pattern.compile(\"[+-]\\\\d{2}(:\\\\d{2})?$\");",
"type": "Pattern",
"var_name": ... | {
"body": "@Override\n public void initialize(RequestContext requestContext) {\n super.initialize(requestContext);\n this.columnDescriptors = context.getTupleDescription();\n }",
"class_method_signature": "ParquetResolver.initialize(RequestContext requestContext)",
"constructor": false,
"ful... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_278 | {
"fields": [
{
"declarator": "reader",
"modifier": "",
"original_string": "ChunkReader reader;",
"type": "ChunkReader",
"var_name": "reader"
},
{
"declarator": "mockStream",
"modifier": "",
"original_string": "DFSInputStream mockStream;",
"type": "DFS... | {
"body": "@Test\n public void readOneLine() throws Exception {\n\t\treader = new ChunkReader(mockStream);\n\t\twhen( mockStream.read( (byte [])Mockito.anyObject()) ).thenAnswer(new Answer<java.lang.Number>() {\n\t\t\t@Override\n\t\t\tpublic java.lang.Number answer(InvocationOnMock invocation) throws Throwable {\n... | {
"fields": [
{
"declarator": "DEFAULT_BUFFER_SIZE = 64 * 1024",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_BUFFER_SIZE = 64 * 1024;",
"type": "int",
"var_name": "DEFAULT_BUFFER_SIZE"
},
{
"declarator": "bufferSize = DEFAULT_B... | {
"body": "public int readLine(Writable str, int maxBytesToConsume) throws IOException {\n ChunkWritable cw = (ChunkWritable) str;\n List<Node> list = new LinkedList<Node>();\n\n boolean newLine = false; // length of terminating newline\n long bytesConsumed = 0;\n\n do {\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_151 | {
"fields": [
{
"declarator": "mockContext",
"modifier": "",
"original_string": "RequestContext mockContext;",
"type": "RequestContext",
"var_name": "mockContext"
},
{
"declarator": "inputBuilder",
"modifier": "",
"original_string": "BridgeInputBuilder input... | {
"body": "@Test\n /*\n * Test the makeInput method: empty stream (returns -1)\n */\n public void makeInputEmptyStream() throws Exception {\n\n byte[] empty = new byte[0];\n\n prepareInput(empty);\n\n List<OneField> record = inputBuilder.makeInput(inputStream);\n\n verifyReco... | {
"fields": [
{
"declarator": "protocolData",
"modifier": "private final",
"original_string": "private final RequestContext protocolData;",
"type": "RequestContext",
"var_name": "protocolData"
},
{
"declarator": "LOG = LogFactory.getLog(BridgeInputBuilder.class)",
... | {
"body": "public List<OneField> makeInput(DataInput inputStream) throws Exception {\n if (protocolData.getOutputFormat() == OutputFormat.TEXT) {\n // Avoid copying the bytes from the inputStream directly. This\n // code used to use the Text class to read bytes until a line\n /... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_385 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testLeftBounded() {\n DatePartition partition = new DatePartition(COL_RAW, LocalDate.parse(\"2000-01-01\"), null);\n String constraint = partition.toSqlConstraint(QUOTE, dbProduct);\n\n assertEquals(\n COL + \" >= date'2000-01-01'\",\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "boundaries",
"modifier": "private f... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n if (dbProduct == null) {\n throw new RuntimeException(String.format(\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_106 | {
"fields": [
{
"declarator": "serverName",
"modifier": "private",
"original_string": "private String serverName;",
"type": "String",
"var_name": "serverName"
},
{
"declarator": "configuration",
"modifier": "private",
"original_string": "private Configuratio... | {
"body": "@Test\n public void testReloginFromKeytabNoopForNonKerberos() throws KerberosAuthException {\n user.setLogin(mockLoginContext);\n PowerMockito.mockStatic(KerberosUtil.class);\n when(KerberosUtil.hasKerberosKeyTab(subject)).thenReturn(true);\n ugi = new UserGroupInformation(su... | {
"fields": [
{
"declarator": "LOGIN_FAILURE = \"Login failure\"",
"modifier": "private static final",
"original_string": "private static final String LOGIN_FAILURE = \"Login failure\";",
"type": "String",
"var_name": "LOGIN_FAILURE"
},
{
"declarator": "LOG = LoggerFact... | {
"body": "public static void reloginFromKeytab(String serverName, LoginSession loginSession) throws KerberosAuthException {\n\n UserGroupInformation ugi = loginSession.getLoginUser();\n\n if (ugi.getAuthenticationMethod() != UserGroupInformation.AuthenticationMethod.KERBEROS ||\n !ugi.is... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_393 | {
"fields": [
{
"declarator": "FILE_FRAGMENTER = \"org.greenplum.pxf.plugins.hdfs.HdfsFileFragmenter\"",
"modifier": "private static final",
"original_string": "private static final String FILE_FRAGMENTER = \"org.greenplum.pxf.plugins.hdfs.HdfsFileFragmenter\";",
"type": "String",
"v... | {
"body": "@Test\n public void testSelectOnMissingFormat() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"S3_SELECT optimization is not supported for format 'null'\");\n\n context.addOption(\"S3_SeLeCt\", \"on\");\n handler.getAccessorClassName(context);\n ... | {
"fields": [
{
"declarator": "S3_SELECT_OPTION = \"S3_SELECT\"",
"modifier": "public static final",
"original_string": "public static final String S3_SELECT_OPTION = \"S3_SELECT\";",
"type": "String",
"var_name": "S3_SELECT_OPTION"
},
{
"declarator": "LOG = LoggerFacto... | {
"body": "@Override\n public String getAccessorClassName(RequestContext context) {\n String accessor = context.getAccessor(); // default to accessor defined by the profile\n if (useS3Select(context)) {\n accessor = S3SelectAccessor.class.getName();\n }\n LOG.debug(\"Determin... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_239 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WithUserProvidedSchema_Binary_HCFS() {\n avroUtilities = new AvroUtilities((file) -> dontFindLocalFile());\n context.setRequestType(RequestContext.RequestType.READ_BRIDGE);\n context.addOption(\"SCHEMA\", avroDirectory + \"user-provided.av... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_110 | {
"fields": [
{
"declarator": "serverName",
"modifier": "private",
"original_string": "private String serverName;",
"type": "String",
"var_name": "serverName"
},
{
"declarator": "configuration",
"modifier": "private",
"original_string": "private Configuratio... | {
"body": "@Test\n public void testReloginFromKeytabFailsNoLogin() throws KerberosAuthException {\n expectedException.expect(KerberosAuthException.class);\n expectedException.expectMessage(\"loginUserFromKeyTab must be done first\");\n\n user.setLogin(null); // simulate missing login context f... | {
"fields": [
{
"declarator": "LOGIN_FAILURE = \"Login failure\"",
"modifier": "private static final",
"original_string": "private static final String LOGIN_FAILURE = \"Login failure\";",
"type": "String",
"var_name": "LOGIN_FAILURE"
},
{
"declarator": "LOG = LoggerFact... | {
"body": "public static void reloginFromKeytab(String serverName, LoginSession loginSession) throws KerberosAuthException {\n\n UserGroupInformation ugi = loginSession.getLoginUser();\n\n if (ugi.getAuthenticationMethod() != UserGroupInformation.AuthenticationMethod.KERBEROS ||\n !ugi.is... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_405 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testFileHeaderInfoIsNone() {\n RequestContext context = getDefaultRequestContext();\n context.addOption(\"FILE_HEADER\", \"NONE\");\n InputSerialization inputSerialization =\n new S3SelectAccessor().getInputSerialization(context);\n assertEq... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "InputSerialization getInputSerialization(RequestContext context) {\n InputSerialization inputSerialization = new InputSerialization();\n\n // We need to infer the format name from the profile (i.e. s3:parquet\n // would return parquet for the format)\n String format = context.in... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_281 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromEmptyFile() throws Exception {\n prepareTest(\"csv/empty.csv\", false);\n\n OneRow oneRow = accessor.readNextObject();\n assertNull(oneRow);\n }",
"class_method_signature": "QuotedLineBreakAccessorTest.testReadFromEmptyFile()",
"constructor": f... | {
"fields": [
{
"declarator": "fileAsRow",
"modifier": "private",
"original_string": "private boolean fileAsRow;",
"type": "boolean",
"var_name": "fileAsRow"
},
{
"declarator": "firstLine",
"modifier": "private",
"original_string": "private boolean firstLine... | {
"body": "@Override\n public OneRow readNextObject() throws IOException {\n if (super.readNextObject() == null) /* check if working segment */ {\n return null;\n }\n\n String nextLine = readLine();\n if (nextLine == null) /* EOF */ {\n return null;\n }\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_147 | {
"fields": [
{
"declarator": "UN_SUPPORTED_TYPE = -1",
"modifier": "private static final",
"original_string": "private static final int UN_SUPPORTED_TYPE = -1;",
"type": "int",
"var_name": "UN_SUPPORTED_TYPE"
},
{
"declarator": "output = null",
"modifier": "priva... | {
"body": "@Test\n public void convertTextDataToLines() throws Exception {\n\n String data = \"Qué será será\\n\" + \"Whatever will be will be\\n\"\n + \"We are going\\n\" + \"to Wembeley!\\n\";\n byte[] dataBytes = data.getBytes();\n String[] dataLines = new String[]{\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(BridgeOutputBuilder.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(BridgeOutputBuilder.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "void convertTextDataToLines(byte[] val) {\n int len = val.length;\n int start = 0;\n int end = 0;\n byte[] line;\n BufferWritable writable;\n\n while (start < len) {\n end = ArrayUtils.indexOf(val, DELIM, start);\n if (end == ArrayUtils.INDEX_... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_5 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "factory... | {
"body": "@Test\n public void testConfigurationsLoadedWithInterpolationFromMultipleFilesForDefaultServer() {\n Configuration configuration = factory.initConfiguration(\"default\", \"default\", \"dummy\", null);\n\n assertEquals(\"blue\", configuration.get(\"test.blue\"));\n assertEquals(\"dum... | {
"fields": [
{
"declarator": "instance = new BaseConfigurationFactory()",
"modifier": "private static final",
"original_string": "private static final BaseConfigurationFactory instance = new BaseConfigurationFactory();",
"type": "BaseConfigurationFactory",
"var_name": "instance"
... | {
"body": "@Override\n public Configuration initConfiguration(String configDirectory, String serverName, String userName, Map<String, String> additionalProperties) {\n // start with built-in Hadoop configuration that loads core-site.xml\n LOG.debug(\"Initializing configuration for server {}\", server... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_83 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void testFragmenterCachePropertyEmpty() {\n System.setProperty(PROPERTY_KEY_FRAGMENTER_CACHE, \"\");\n assertTrue(Utilities.isFragmenterCacheEnabled());\n }",
"class_method_signature": "UtilitiesTest.testFragmenterCachePropertyEmpty()",
"constructor": false,
"full_s... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static boolean isFragmenterCacheEnabled() {\n return !StringUtils.equalsIgnoreCase(System.getProperty(PROPERTY_KEY_FRAGMENTER_CACHE, \"true\"), \"false\");\n }",
"class_method_signature": "Utilities.isFragmenterCacheEnabled()",
"constructor": false,
"full_signature": "public static b... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_130 | {
"fields": [
{
"declarator": "MINUTES = 60 * 1000L",
"modifier": "private static final",
"original_string": "private static final long MINUTES = 60 * 1000L;",
"type": "long",
"var_name": "MINUTES"
},
{
"declarator": "provider = null",
"modifier": "private",
... | {
"body": "@Test\n public void getTwoProxyUGIsWithDifferentTransactionsForSameUser() throws Exception {\n SessionId otherSession = new SessionId(0, \"txn-id-2\", \"the-user\", \"default\", false, UserGroupInformation.getLoginUser());\n UserGroupInformation proxyUGI1 = cache.getUserGroupInformation(se... | {
"fields": [
{
"declarator": "NANOS_PER_MILLIS = 1000000",
"modifier": "static final",
"original_string": "static final int NANOS_PER_MILLIS = 1000000;",
"type": "int",
"var_name": "NANOS_PER_MILLIS"
},
{
"declarator": "UGI_CACHE_EXPIRY = 15 * 60 * 1000L",
"modif... | {
"body": "@SuppressWarnings(\"SynchronizationOnLocalVariableOrMethodParameter\")\n public UserGroupInformation getUserGroupInformation(SessionId session, boolean isProxyUser) throws IOException {\n Integer segmentId = session.getSegmentId();\n String user = session.getUser();\n DelayQueue<Ent... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_219 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void testWireFormatIsPresent() {\n parameters.putSingle(\"X-GP-FORMAT\", \"TEXT\");\n RequestContext context = parser.parseRequest(mockRequestHeaders, RequestType.FRAGMENTER);\n assertEquals(OutputFormat.TEXT, context.getOutputFormat());\n assertNull(context.ge... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_188 | {
"fields": [
{
"declarator": "response = null",
"modifier": "",
"original_string": "MetadataResponse response = null;",
"type": "MetadataResponse",
"var_name": "response"
}
],
"file": "server/pxf-service/src/test/java/org/greenplum/pxf/service/MetadataResponseFormatterTest.j... | {
"body": "@Test\n public void formatResponseStringWithNullModifier() throws Exception {\n List<Metadata> metadataList = new ArrayList<Metadata>();\n List<Metadata.Field> fields = new ArrayList<Metadata.Field>();\n Metadata.Item itemName = new Metadata.Item(\"default\", \"table1\");\n M... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(MetadataResponseFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(MetadataResponseFormatter.class);",
"type": "Log",
"var_name": "LOG"
}
],
"file":... | {
"body": "public static MetadataResponse formatResponse(List<Metadata> metadataList, String path) throws IOException {\n /* print the fragment list to log when in debug level */\n if (LOG.isDebugEnabled()) {\n MetadataResponseFormatter.printMetadata(metadataList, path);\n }\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.