private static LocalResource registerLocalResource ( Path remoteRsrcPath , long resourceSize , long resourceModificationTime ) { LocalResource localResource = Records . newRecord ( LocalResource . class ) ; localResource . setResource ( ConverterUtils . getYarnUrlFromURI ( remoteRsrcPath . toUri ( ) ) ) ; localResource . setSize ( resourceSize ) ; localResource . setTimestamp ( resourceModificationTime ) ; localResource . setType ( LocalResourceType . FILE ) ; localResource . setVisibility ( LocalResourceVisibility . APPLICATION ) ; return localResource ; }
Creates a YARN resource for the remote object at the given location .