You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "cdmikechen (Jira)" <ji...@apache.org> on 2020/08/30 14:00:00 UTC

[jira] [Updated] (HUDI-1254) TypedProperties can not get values by initializing an existing properties

     [ https://issues.apache.org/jira/browse/HUDI-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

cdmikechen updated HUDI-1254:
-----------------------------
    Description: 
If I create a test to new a TypedProperties by a Properties that exists like blow:
{code:java}
public class TestTypedProperties {

    @Test
    public void testNewTypedProperties() {
        Properties properties = new Properties();
        properties.put("test_key1", "test_value1");

        TypedProperties typedProperties = new TypedProperties(properties);
        assertEquals("test_value1", typedProperties.getString("test_key1"));
    }
}
{code}

Test can not pass and get this error: *java.lang.IllegalArgumentException: Property test_key1 not found*

I think this is a bug and need to be fixed.


  was:
If I create a test to new a TypedProperties by a Properties that exists like blow:
{code:java}
public class TestTypedProperties {

    @Test
    public void testNewTypedProperties() {
        Properties properties = new Properties();
        properties.put("test_key1", "test_value1");

        TypedProperties typedProperties = new TypedProperties(properties);
        assertEquals("test_value1", typedProperties.getString("test_key1"));
    }
}
{code}

Test can not pass and get this error: *java.lang.IllegalArgumentException: Property test_key1 not found*



> TypedProperties can not get values by initializing an existing properties
> -------------------------------------------------------------------------
>
>                 Key: HUDI-1254
>                 URL: https://issues.apache.org/jira/browse/HUDI-1254
>             Project: Apache Hudi
>          Issue Type: Bug
>          Components: Common Core
>            Reporter: cdmikechen
>            Priority: Major
>             Fix For: 0.6.1
>
>
> If I create a test to new a TypedProperties by a Properties that exists like blow:
> {code:java}
> public class TestTypedProperties {
>     @Test
>     public void testNewTypedProperties() {
>         Properties properties = new Properties();
>         properties.put("test_key1", "test_value1");
>         TypedProperties typedProperties = new TypedProperties(properties);
>         assertEquals("test_value1", typedProperties.getString("test_key1"));
>     }
> }
> {code}
> Test can not pass and get this error: *java.lang.IllegalArgumentException: Property test_key1 not found*
> I think this is a bug and need to be fixed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)