/** * Get the default socket factory as specified by the configuration * parameter <tt>hadoop.rpc.socket.factory.default</tt> * * @param conf the configuration * @return the default socket factory as specified in the configuration or * the JVM default socket factory if the configuration does not * contain a default socket factory property. */ public static SocketFactory getDefaultSocketFactory(Configuration conf) { String propValue = conf.get( CommonConfigurationKeysPublic.HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_KEY, CommonConfigurationKeysPublic.HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_DEFAULT); if ((propValue == null) || (propValue.length() == 0)) return SocketFactory.getDefault(); return getSocketFactoryFromProperty(conf, propValue); }
/** * Get the socket factory for the given class according to its * configuration parameter * <tt>hadoop.rpc.socket.factory.class.<ClassName></tt>. When no * such parameter exists then fall back on the default socket factory as * configured by <tt>hadoop.rpc.socket.factory.class.default</tt>. If * this default socket factory is not configured, then fall back on the JVM * default socket factory. * * @param conf the configuration * @param clazz the class (usually a {@link VersionedProtocol}) * @return a socket factory */ public static SocketFactory getSocketFactory(Configuration conf, Class<?> clazz) { SocketFactory factory = null; String propValue = conf.get("hadoop.rpc.socket.factory.class." + clazz.getSimpleName()); if ((propValue != null) && (propValue.length() > 0)) factory = getSocketFactoryFromProperty(conf, propValue); if (factory == null) factory = getDefaultSocketFactory(conf); return factory; }
/** * Get the default socket factory as specified by the configuration * parameter <tt>hadoop.rpc.socket.factory.default</tt> * * @param conf the configuration * @return the default socket factory as specified in the configuration or * the JVM default socket factory if the configuration does not * contain a default socket factory property. */ public static SocketFactory getDefaultSocketFactory(Configuration conf) { String propValue = conf.get("hadoop.rpc.socket.factory.class.default"); if ((propValue == null) || (propValue.length() == 0)) return SocketFactory.getDefault(); return getSocketFactoryFromProperty(conf, propValue); }
/** * Get the default socket factory as specified by the configuration * parameter <tt>hadoop.rpc.socket.factory.default</tt> * * @param conf the configuration * @return the default socket factory as specified in the configuration or * the JVM default socket factory if the configuration does not * contain a default socket factory property. */ public static SocketFactory getDefaultSocketFactory(Configuration conf) { String propValue = conf.get("hadoop.rpc.socket.factory.class.default"); if ((propValue == null) || (propValue.length() == 0)) return SocketFactory.getDefault(); return getSocketFactoryFromProperty(conf, propValue); }
/** * Get the default socket factory as specified by the configuration * parameter <tt>hadoop.rpc.socket.factory.default</tt> * * @param conf the configuration * @return the default socket factory as specified in the configuration or * the JVM default socket factory if the configuration does not * contain a default socket factory property. */ public static SocketFactory getDefaultSocketFactory(Configuration conf) { String propValue = conf.get( CommonConfigurationKeysPublic.HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_KEY, CommonConfigurationKeysPublic.HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_DEFAULT); if ((propValue == null) || (propValue.length() == 0)) return SocketFactory.getDefault(); return getSocketFactoryFromProperty(conf, propValue); }
/** * Get the default socket factory as specified by the configuration * parameter <tt>hadoop.rpc.socket.factory.default</tt> * * @param conf the configuration * @return the default socket factory as specified in the configuration or * the JVM default socket factory if the configuration does not * contain a default socket factory property. */ public static SocketFactory getDefaultSocketFactory(Configuration conf) { String propValue = conf.get( CommonConfigurationKeysPublic.HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_KEY, CommonConfigurationKeysPublic.HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_DEFAULT); if ((propValue == null) || (propValue.length() == 0)) return SocketFactory.getDefault(); return getSocketFactoryFromProperty(conf, propValue); }
/** * Get the default socket factory as specified by the configuration * parameter <tt>hadoop.rpc.socket.factory.default</tt> * * @param conf the configuration * @return the default socket factory as specified in the configuration or * the JVM default socket factory if the configuration does not * contain a default socket factory property. */ public static SocketFactory getDefaultSocketFactory(Configuration conf) { String propValue = conf.get( CommonConfigurationKeysPublic.HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_KEY, CommonConfigurationKeysPublic.HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_DEFAULT); if ((propValue == null) || (propValue.length() == 0)) return SocketFactory.getDefault(); return getSocketFactoryFromProperty(conf, propValue); }
/** * Get the default socket factory as specified by the configuration * parameter <tt>hadoop.rpc.socket.factory.default</tt> * * @param conf the configuration * @return the default socket factory as specified in the configuration or * the JVM default socket factory if the configuration does not * contain a default socket factory property. */ public static SocketFactory getDefaultSocketFactory(Configuration conf) throws SSLCertificateException { String propValue = conf.get( CommonConfigurationKeysPublic.HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_KEY, CommonConfigurationKeysPublic.HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_DEFAULT); if ((propValue == null) || (propValue.length() == 0)) return SocketFactory.getDefault(); SocketFactory factory = getSocketFactoryFromProperty(conf, propValue); configureCryptoMaterial(factory, conf); return factory; }
/** * Get the socket factory for the given class according to its * configuration parameter * <tt>hadoop.rpc.socket.factory.class.<ClassName></tt>. When no * such parameter exists then fall back on the default socket factory as * configured by <tt>hadoop.rpc.socket.factory.class.default</tt>. If * this default socket factory is not configured, then fall back on the JVM * default socket factory. * * @param conf the configuration * @param clazz the class (usually a {@link VersionedProtocol}) * @return a socket factory */ public static SocketFactory getSocketFactory(Configuration conf, Class<?> clazz) { SocketFactory factory = null; String propValue = conf.get("hadoop.rpc.socket.factory.class." + clazz.getSimpleName()); if ((propValue != null) && (propValue.length() > 0)) factory = getSocketFactoryFromProperty(conf, propValue); if (factory == null) factory = getDefaultSocketFactory(conf); return factory; }
/** * Get the socket factory for the given class according to its * configuration parameter * <tt>hadoop.rpc.socket.factory.class.<ClassName></tt>. When no * such parameter exists then fall back on the default socket factory as * configured by <tt>hadoop.rpc.socket.factory.class.default</tt>. If * this default socket factory is not configured, then fall back on the JVM * default socket factory. * * @param conf the configuration * @param clazz the class (usually a {@link VersionedProtocol}) * @return a socket factory */ public static SocketFactory getSocketFactory(Configuration conf, Class<?> clazz) { SocketFactory factory = null; String propValue = conf.get("hadoop.rpc.socket.factory.class." + clazz.getSimpleName()); if ((propValue != null) && (propValue.length() > 0)) factory = getSocketFactoryFromProperty(conf, propValue); if (factory == null) factory = getDefaultSocketFactory(conf); return factory; }
/** * Get the socket factory for the given class according to its * configuration parameter * <tt>hadoop.rpc.socket.factory.class.<ClassName></tt>. When no * such parameter exists then fall back on the default socket factory as * configured by <tt>hadoop.rpc.socket.factory.class.default</tt>. If * this default socket factory is not configured, then fall back on the JVM * default socket factory. * * @param conf the configuration * @param clazz the class (usually a {@link VersionedProtocol}) * @return a socket factory */ public static SocketFactory getSocketFactory(Configuration conf, Class<?> clazz) { SocketFactory factory = null; String propValue = conf.get("hadoop.rpc.socket.factory.class." + clazz.getSimpleName()); if ((propValue != null) && (propValue.length() > 0)) factory = getSocketFactoryFromProperty(conf, propValue); if (factory == null) factory = getDefaultSocketFactory(conf); return factory; }
/** * Get the socket factory for the given class according to its * configuration parameter * <tt>hadoop.rpc.socket.factory.class.<ClassName></tt>. When no * such parameter exists then fall back on the default socket factory as * configured by <tt>hadoop.rpc.socket.factory.class.default</tt>. If * this default socket factory is not configured, then fall back on the JVM * default socket factory. * * @param conf the configuration * @param clazz the class (usually a {@link VersionedProtocol}) * @return a socket factory */ public static SocketFactory getSocketFactory(Configuration conf, Class<?> clazz) throws SSLCertificateException { SocketFactory factory = null; String propValue = conf.get("hadoop.rpc.socket.factory.class." + clazz.getSimpleName()); if ((propValue != null) && (propValue.length() > 0)) factory = getSocketFactoryFromProperty(conf, propValue); if (factory == null) factory = getDefaultSocketFactory(conf); return factory; }
/** * Get the socket factory for the given class according to its * configuration parameter * <tt>hadoop.rpc.socket.factory.class.<ClassName></tt>. When no * such parameter exists then fall back on the default socket factory as * configured by <tt>hadoop.rpc.socket.factory.class.default</tt>. If * this default socket factory is not configured, then fall back on the JVM * default socket factory. * * @param conf the configuration * @param clazz the class (usually a {@link VersionedProtocol}) * @return a socket factory */ public static SocketFactory getSocketFactory(Configuration conf, Class<?> clazz) { SocketFactory factory = null; String propValue = conf.get("hadoop.rpc.socket.factory.class." + clazz.getSimpleName()); if ((propValue != null) && (propValue.length() > 0)) factory = getSocketFactoryFromProperty(conf, propValue); if (factory == null) factory = getDefaultSocketFactory(conf); return factory; }
/** * Get the socket factory for the given class according to its * configuration parameter * <tt>hadoop.rpc.socket.factory.class.<ClassName></tt>. When no * such parameter exists then fall back on the default socket factory as * configured by <tt>hadoop.rpc.socket.factory.class.default</tt>. If * this default socket factory is not configured, then fall back on the JVM * default socket factory. * * @param conf the configuration * @param clazz the class (usually a {@link VersionedProtocol}) * @return a socket factory */ public static SocketFactory getSocketFactory(Configuration conf, Class<?> clazz) { SocketFactory factory = null; String propValue = conf.get("hadoop.rpc.socket.factory.class." + clazz.getSimpleName()); if ((propValue != null) && (propValue.length() > 0)) factory = getSocketFactoryFromProperty(conf, propValue); if (factory == null) factory = getDefaultSocketFactory(conf); return factory; }