protected boolean propertyDefined ( Configuration conf , String propertyName ) { String prop = conf . get ( propertyName ) ; // String property will have default empty, integer -1, we'll skip both of them return prop != null && ! prop . isEmpty ( ) && ! prop . equals ( "-1" ) ; }
Return true if and only if given property is defined with non empty non default value