public class AppCookieManager extends Object
Constructor and Description |
---|
AppCookieManager() |
Modifier and Type | Method and Description |
---|---|
String |
getAppCookie(String endpoint,
boolean refresh)
Returns hadoop.auth cookie, doing needed SPNego authentication
|
String |
getCachedAppCookie(String endpoint)
Returns the cached app cookie
|
static void |
main(String[] args)
Utility method to exercise AppCookieManager directly
|
public static void main(String[] args) throws IOException
args
- element 0 of args should be a URL to hadoop service protected by SPengoIOException
- in case of errorspublic String getAppCookie(String endpoint, boolean refresh) throws IOException
endpoint
- the URL of the Hadoop servicerefresh
- flag indicating wehther to refresh the cookie, if
true
, we do a new SPNego authentication and refresh
the cookie even if the cookie already exists in local cacheIOException
- in case of problem getting hadoop.auth cookieCopyright © 2022 Apache Software Foundation. All rights reserved.