question: public boolean needsUpgrading ( ShardId shard ) { final Path [ ] paths = nodeEnvironment . availableShardPaths ( shard ) ; if ( paths . length > 1 ) { int numPathsExist = 0 ; for ( Path path : paths ) { if ( Files . exists ( path . resolve ( MetaDataStateFormat . STATE_DIR_NAME ) ) ) { numPathsExist ++ ; if ( numPathsExist > 1 ) { return true ; } } } } return false ; }
target:  Returns true iff the given shard needs upgrading.