| Line |
Stmt Id |
Pos |
Tree |
Symbol |
Tests |
Code |
|
36
|
158
|
1886
-
3344
|
Apply
|
com.github.benmanes.caffeine.cache.Caffeine.build
|
|
com.github.benmanes.caffeine.cache.Caffeine.newBuilder().build[org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ConfigKey, org.apache.hadoop.conf.Configuration]({
final class $anon extends Object with com.github.benmanes.caffeine.cache.CacheLoader[org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ConfigKey,org.apache.hadoop.conf.Configuration] {
def <init>(): <$anon: com.github.benmanes.caffeine.cache.CacheLoader[org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ConfigKey,org.apache.hadoop.conf.Configuration]> = {
$anon.super.<init>();
()
};
<stable> <accessor> lazy private val configuration: org.apache.hadoop.conf.Configuration = {
val base: org.apache.hadoop.conf.Configuration = org.apache.hadoop.hbase.HBaseConfiguration.create();
org.locationtech.geomesa.hbase.`package`.HBaseSystemProperties.ConfigPathProperty.option.foreach[Unit](((x$1: String) => $anon.this.addResources(base, x$1)));
base
};
override def load(key: org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ConfigKey): org.apache.hadoop.conf.Configuration = {
val conf: org.apache.hadoop.conf.Configuration = new org.apache.hadoop.conf.Configuration($anon.this.configuration);
conf.set("hbase.client.userprovider.class", "org.locationtech.geomesa.hbase.data.LoginUserProvider");
key.xml.foreach[Unit](((xml: String) => conf.addResource(new java.io.ByteArrayInputStream(xml.getBytes(java.nio.charset.StandardCharsets.UTF_8)))));
key.paths.foreach[Unit](((x$2: String) => $anon.this.addResources(conf, x$2)));
key.zookeepers.foreach[Unit](((zk: String) => conf.set("hbase.zookeeper.quorum", zk)));
if (key.zookeepers.isEmpty.&&(conf.get("hbase.zookeeper.quorum").==("localhost")))
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn("HBase connection is set to localhost - this may indicate that \'hbase-site.xml\' is not on the classpath")
else
(): Unit)
else
();
conf
};
private def addResources(conf: org.apache.hadoop.conf.Configuration, paths: String): Unit = scala.Predef.refArrayOps[String](scala.Predef.refArrayOps[String](scala.Predef.refArrayOps[String](scala.Predef.augmentString(paths).split(',')).map[String, Array[String]](((x$3: String) => x$3.trim()))(scala.this.Array.canBuildFrom[String]((ClassTag.apply[String](classOf[java.lang.String]): scala.reflect.ClassTag[String])))).filterNot(((x$4: String) => x$4.isEmpty()))).foreach[Unit](((x$5: String) => org.locationtech.geomesa.utils.hadoop.HadoopUtils.addResource(conf, x$5)))
};
new $anon()
})
|
|
37
|
157
|
1919
-
1922
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.$anon.<init>
|
|
new $anon()
|
|
47
|
133
|
2348
-
2380
|
Apply
|
org.apache.hadoop.conf.Configuration.<init>
|
|
new org.apache.hadoop.conf.Configuration($anon.this.configuration)
|
|
49
|
134
|
2453
-
2553
|
Apply
|
org.apache.hadoop.conf.Configuration.set
|
|
conf.set("hbase.client.userprovider.class", "org.locationtech.geomesa.hbase.data.LoginUserProvider")
|
|
51
|
135
|
2731
-
2753
|
Select
|
java.nio.charset.StandardCharsets.UTF_8
|
|
java.nio.charset.StandardCharsets.UTF_8
|
|
51
|
136
|
2718
-
2754
|
Apply
|
java.lang.String.getBytes
|
|
xml.getBytes(java.nio.charset.StandardCharsets.UTF_8)
|
|
51
|
137
|
2693
-
2755
|
Apply
|
java.io.ByteArrayInputStream.<init>
|
|
new java.io.ByteArrayInputStream(xml.getBytes(java.nio.charset.StandardCharsets.UTF_8))
|
|
51
|
138
|
2676
-
2756
|
Apply
|
org.apache.hadoop.conf.Configuration.addResource
|
|
conf.addResource(new java.io.ByteArrayInputStream(xml.getBytes(java.nio.charset.StandardCharsets.UTF_8)))
|
|
51
|
139
|
2653
-
2757
|
Apply
|
scala.Option.foreach
|
|
key.xml.foreach[Unit](((xml: String) => conf.addResource(new java.io.ByteArrayInputStream(xml.getBytes(java.nio.charset.StandardCharsets.UTF_8)))))
|
|
52
|
140
|
2784
-
2805
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.$anon.addResources
|
|
$anon.this.addResources(conf, x$2)
|
|
52
|
141
|
2766
-
2806
|
Apply
|
scala.Option.foreach
|
|
key.paths.foreach[Unit](((x$2: String) => $anon.this.addResources(conf, x$2)))
|
|
53
|
142
|
2844
-
2885
|
Apply
|
org.apache.hadoop.conf.Configuration.set
|
|
conf.set("hbase.zookeeper.quorum", zk)
|
|
53
|
143
|
2815
-
2886
|
Apply
|
scala.Option.foreach
|
|
key.zookeepers.foreach[Unit](((zk: String) => conf.set("hbase.zookeeper.quorum", zk)))
|
|
54
|
144
|
2925
-
2977
|
Apply
|
java.lang.Object.==
|
|
conf.get("hbase.zookeeper.quorum").==("localhost")
|
|
54
|
145
|
2899
-
2977
|
Apply
|
scala.Boolean.&&
|
|
key.zookeepers.isEmpty.&&(conf.get("hbase.zookeeper.quorum").==("localhost"))
|
|
54
|
147
|
2895
-
2895
|
Literal
|
<nosymbol>
|
|
()
|
|
54
|
148
|
2895
-
2895
|
Block
|
<nosymbol>
|
|
()
|
|
55
|
146
|
2991
-
3127
|
Typed
|
<nosymbol>
|
|
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn("HBase connection is set to localhost - this may indicate that \'hbase-site.xml\' is not on the classpath")
else
(): Unit)
|
|
62
|
149
|
3243
-
3259
|
Apply
|
scala.collection.immutable.StringLike.split
|
|
scala.Predef.augmentString(paths).split(',')
|
|
62
|
150
|
3264
-
3270
|
Apply
|
java.lang.String.trim
|
|
x$3.trim()
|
|
62
|
151
|
3263
-
3263
|
ApplyToImplicitArgs
|
scala.Array.canBuildFrom
|
|
scala.this.Array.canBuildFrom[String]((ClassTag.apply[String](classOf[java.lang.String]): scala.reflect.ClassTag[String]))
|
|
62
|
152
|
3243
-
3271
|
ApplyToImplicitArgs
|
scala.collection.TraversableLike.map
|
|
scala.Predef.refArrayOps[String](scala.Predef.augmentString(paths).split(',')).map[String, Array[String]](((x$3: String) => x$3.trim()))(scala.this.Array.canBuildFrom[String]((ClassTag.apply[String](classOf[java.lang.String]): scala.reflect.ClassTag[String])))
|
|
62
|
153
|
3282
-
3291
|
Apply
|
java.lang.String.isEmpty
|
|
x$4.isEmpty()
|
|
62
|
154
|
3243
-
3292
|
Apply
|
scala.collection.TraversableLike.filterNot
|
|
scala.Predef.refArrayOps[String](scala.Predef.refArrayOps[String](scala.Predef.augmentString(paths).split(',')).map[String, Array[String]](((x$3: String) => x$3.trim()))(scala.this.Array.canBuildFrom[String]((ClassTag.apply[String](classOf[java.lang.String]): scala.reflect.ClassTag[String])))).filterNot(((x$4: String) => x$4.isEmpty()))
|
|
62
|
155
|
3301
-
3333
|
Apply
|
org.locationtech.geomesa.utils.hadoop.HadoopUtils.addResource
|
|
org.locationtech.geomesa.utils.hadoop.HadoopUtils.addResource(conf, x$5)
|
|
62
|
156
|
3243
-
3334
|
Apply
|
scala.collection.IndexedSeqOptimized.foreach
|
|
scala.Predef.refArrayOps[String](scala.Predef.refArrayOps[String](scala.Predef.refArrayOps[String](scala.Predef.augmentString(paths).split(',')).map[String, Array[String]](((x$3: String) => x$3.trim()))(scala.this.Array.canBuildFrom[String]((ClassTag.apply[String](classOf[java.lang.String]): scala.reflect.ClassTag[String])))).filterNot(((x$4: String) => x$4.isEmpty()))).foreach[Unit](((x$5: String) => org.locationtech.geomesa.utils.hadoop.HadoopUtils.addResource(conf, x$5)))
|
|
66
|
167
|
3433
-
3884
|
Apply
|
com.github.benmanes.caffeine.cache.Caffeine.build
|
|
com.github.benmanes.caffeine.cache.Caffeine.newBuilder().build[(org.apache.hadoop.conf.Configuration, Boolean), org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection]({
final class $anon extends Object with com.github.benmanes.caffeine.cache.CacheLoader[(org.apache.hadoop.conf.Configuration, Boolean),org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection] {
def <init>(): <$anon: com.github.benmanes.caffeine.cache.CacheLoader[(org.apache.hadoop.conf.Configuration, Boolean),org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection]> = {
$anon.super.<init>();
()
};
override def load(key: (org.apache.hadoop.conf.Configuration, Boolean)): org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection = HBaseConnectionPool.this.createConnection(key._1, key._2) match {
case (connection: org.apache.hadoop.hbase.client.Connection, kerberos: Option[java.io.Closeable])org.locationtech.geomesa.hbase.data.HBaseConnectionPool.SingletonConnection((connection @ _), (kerberos @ _)) => HBaseConnectionPool.this.CachedConnection.apply(connection, kerberos)
case (c @ _) => throw new scala.`package`.UnsupportedOperationException(scala.StringContext.apply("Expected SingletonConnection but got ", "").s(c))
}
};
new $anon()
})
|
|
67
|
166
|
3466
-
3469
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.$anon.<init>
|
|
new $anon()
|
|
69
|
159
|
3630
-
3636
|
Select
|
scala.Tuple2._1
|
|
key._1
|
|
69
|
160
|
3638
-
3644
|
Select
|
scala.Tuple2._2
|
|
key._2
|
|
69
|
161
|
3613
-
3645
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.createConnection
|
|
HBaseConnectionPool.this.createConnection(key._1, key._2)
|
|
70
|
162
|
3714
-
3752
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection.apply
|
|
HBaseConnectionPool.this.CachedConnection.apply(connection, kerberos)
|
|
70
|
163
|
3714
-
3752
|
Block
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection.apply
|
|
HBaseConnectionPool.this.CachedConnection.apply(connection, kerberos)
|
|
71
|
164
|
3773
-
3856
|
Throw
|
<nosymbol>
|
|
throw new scala.`package`.UnsupportedOperationException(scala.StringContext.apply("Expected SingletonConnection but got ", "").s(c))
|
|
71
|
165
|
3773
-
3856
|
Block
|
<nosymbol>
|
|
throw new scala.`package`.UnsupportedOperationException(scala.StringContext.apply("Expected SingletonConnection but got ", "").s(c))
|
|
77
|
178
|
3923
-
3926
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.$anon.<init>
|
|
new $anon()
|
|
77
|
179
|
3888
-
4089
|
Apply
|
java.lang.Runtime.addShutdownHook
|
|
java.lang.Runtime.getRuntime().addShutdownHook({
final class $anon extends java.lang.Thread {
def <init>(): <$anon: Thread> = {
$anon.super.<init>();
()
};
override def run(): Unit = {
org.locationtech.geomesa.utils.io.`package`.CloseWithLogging.apply[Iterable[java.io.Closeable]](scala.collection.JavaConverters.collectionAsScalaIterableConverter[org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection](HBaseConnectionPool.this.connections.asMap().values()).asScala.flatMap[java.io.Closeable, Iterable[java.io.Closeable]](((x0$1: org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection) => x0$1 match {
case (connection: org.apache.hadoop.hbase.client.Connection, kerberos: Option[java.io.Closeable])org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection((c @ _), (k @ _)) => scala.collection.Seq.apply[org.apache.hadoop.hbase.client.Connection](c).++[java.io.Closeable, Seq[java.io.Closeable]](scala.this.Option.option2Iterable[java.io.Closeable](k))(collection.this.Seq.canBuildFrom[java.io.Closeable])
}))(collection.this.Iterable.canBuildFrom[java.io.Closeable]))(io.this.IsCloseable.iterableIsCloseable);
()
}
};
new $anon()
})
|
|
79
|
168
|
3992
-
4020
|
Apply
|
java.util.Map.values
|
|
HBaseConnectionPool.this.connections.asMap().values()
|
|
79
|
169
|
4080
-
4081
|
ApplyImplicitView
|
scala.Option.option2Iterable
|
|
scala.this.Option.option2Iterable[java.io.Closeable](k)
|
|
79
|
170
|
4077
-
4077
|
TypeApply
|
scala.collection.Seq.canBuildFrom
|
|
collection.this.Seq.canBuildFrom[java.io.Closeable]
|
|
79
|
171
|
4070
-
4081
|
ApplyToImplicitArgs
|
scala.collection.TraversableLike.++
|
|
scala.collection.Seq.apply[org.apache.hadoop.hbase.client.Connection](c).++[java.io.Closeable, Seq[java.io.Closeable]](scala.this.Option.option2Iterable[java.io.Closeable](k))(collection.this.Seq.canBuildFrom[java.io.Closeable])
|
|
79
|
172
|
4070
-
4081
|
Block
|
scala.collection.TraversableLike.++
|
|
scala.collection.Seq.apply[org.apache.hadoop.hbase.client.Connection](c).++[java.io.Closeable, Seq[java.io.Closeable]](scala.this.Option.option2Iterable[java.io.Closeable](k))(collection.this.Seq.canBuildFrom[java.io.Closeable])
|
|
79
|
173
|
4037
-
4037
|
TypeApply
|
scala.collection.Iterable.canBuildFrom
|
|
collection.this.Iterable.canBuildFrom[java.io.Closeable]
|
|
79
|
174
|
3992
-
4083
|
ApplyToImplicitArgs
|
scala.collection.TraversableLike.flatMap
|
|
scala.collection.JavaConverters.collectionAsScalaIterableConverter[org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection](HBaseConnectionPool.this.connections.asMap().values()).asScala.flatMap[java.io.Closeable, Iterable[java.io.Closeable]](((x0$1: org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection) => x0$1 match {
case (connection: org.apache.hadoop.hbase.client.Connection, kerberos: Option[java.io.Closeable])org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection((c @ _), (k @ _)) => scala.collection.Seq.apply[org.apache.hadoop.hbase.client.Connection](c).++[java.io.Closeable, Seq[java.io.Closeable]](scala.this.Option.option2Iterable[java.io.Closeable](k))(collection.this.Seq.canBuildFrom[java.io.Closeable])
}))(collection.this.Iterable.canBuildFrom[java.io.Closeable])
|
|
79
|
175
|
3991
-
3991
|
Select
|
org.locationtech.geomesa.utils.io.IsCloseableImplicits.iterableIsCloseable
|
|
io.this.IsCloseable.iterableIsCloseable
|
|
79
|
176
|
3975
-
4084
|
ApplyToImplicitArgs
|
org.locationtech.geomesa.utils.io.CloseWithLogging.apply
|
|
org.locationtech.geomesa.utils.io.`package`.CloseWithLogging.apply[Iterable[java.io.Closeable]](scala.collection.JavaConverters.collectionAsScalaIterableConverter[org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection](HBaseConnectionPool.this.connections.asMap().values()).asScala.flatMap[java.io.Closeable, Iterable[java.io.Closeable]](((x0$1: org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection) => x0$1 match {
case (connection: org.apache.hadoop.hbase.client.Connection, kerberos: Option[java.io.Closeable])org.locationtech.geomesa.hbase.data.HBaseConnectionPool.CachedConnection((c @ _), (k @ _)) => scala.collection.Seq.apply[org.apache.hadoop.hbase.client.Connection](c).++[java.io.Closeable, Seq[java.io.Closeable]](scala.this.Option.option2Iterable[java.io.Closeable](k))(collection.this.Seq.canBuildFrom[java.io.Closeable])
}))(collection.this.Iterable.canBuildFrom[java.io.Closeable]))(io.this.IsCloseable.iterableIsCloseable)
|
|
79
|
177
|
3991
-
3991
|
Literal
|
<nosymbol>
|
|
()
|
|
89
|
180
|
4291
-
4323
|
Apply
|
org.locationtech.geomesa.utils.geotools.GeoMesaParam.lookupOpt
|
|
org.locationtech.geomesa.hbase.data.HBaseDataStoreParams.ZookeeperParam.lookupOpt(params)
|
|
90
|
181
|
4340
-
4374
|
Apply
|
org.locationtech.geomesa.utils.geotools.GeoMesaParam.lookupOpt
|
|
org.locationtech.geomesa.hbase.data.HBaseDataStoreParams.ConfigPathsParam.lookupOpt(params)
|
|
91
|
182
|
4389
-
4419
|
Apply
|
org.locationtech.geomesa.utils.geotools.GeoMesaParam.lookupOpt
|
|
org.locationtech.geomesa.hbase.data.HBaseDataStoreParams.ConfigsParam.lookupOpt(params)
|
|
92
|
183
|
4436
-
4461
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ConfigKey.apply
|
|
HBaseConnectionPool.this.ConfigKey.apply(zk, paths, xml)
|
|
92
|
184
|
4424
-
4462
|
Apply
|
com.github.benmanes.caffeine.cache.LoadingCache.get
|
|
HBaseConnectionPool.this.configs.get(HBaseConnectionPool.this.ConfigKey.apply(zk, paths, xml))
|
|
103
|
185
|
4748
-
4778
|
Apply
|
org.locationtech.geomesa.utils.geotools.GeoMesaParam.exists
|
|
org.locationtech.geomesa.hbase.data.HBaseDataStoreParams.ConnectionParam.exists(params)
|
|
104
|
186
|
4807
-
4837
|
Apply
|
org.locationtech.geomesa.utils.geotools.GeoMesaParam.lookup
|
|
org.locationtech.geomesa.hbase.data.HBaseDataStoreParams.ConnectionParam.lookup(params)
|
|
104
|
187
|
4788
-
4838
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ProvidedConnection.apply
|
|
HBaseConnectionPool.this.ProvidedConnection.apply(org.locationtech.geomesa.hbase.data.HBaseDataStoreParams.ConnectionParam.lookup(params))
|
|
104
|
188
|
4788
-
4838
|
Block
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ProvidedConnection.apply
|
|
HBaseConnectionPool.this.ProvidedConnection.apply(org.locationtech.geomesa.hbase.data.HBaseDataStoreParams.ConnectionParam.lookup(params))
|
|
105
|
197
|
4850
-
5172
|
Block
|
<nosymbol>
|
|
{
val conf: org.apache.hadoop.conf.Configuration = HBaseConnectionPool.this.getConfiguration(params);
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("Connecting to HBase instance at {}", (conf.get("hbase.zookeeper.quorum"): AnyRef))
else
(): Unit);
if (scala.Predef.Boolean2boolean(HBaseDataStoreParams.CacheConnectionsParam.lookup(params)))
HBaseConnectionPool.this.connections.get(scala.Tuple2.apply[org.apache.hadoop.conf.Configuration, Boolean](conf, validate))
else
HBaseConnectionPool.this.createConnection(conf, validate)
}
|
|
106
|
189
|
4869
-
4893
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.getConfiguration
|
|
HBaseConnectionPool.this.getConfiguration(params)
|
|
108
|
190
|
5000
-
5057
|
Apply
|
org.locationtech.geomesa.utils.geotools.GeoMesaParam.lookup
|
|
HBaseDataStoreParams.CacheConnectionsParam.lookup(params)
|
|
108
|
191
|
5000
-
5057
|
ApplyImplicitView
|
scala.Predef.Boolean2boolean
|
|
scala.Predef.Boolean2boolean(HBaseDataStoreParams.CacheConnectionsParam.lookup(params))
|
|
109
|
192
|
5085
-
5101
|
Apply
|
scala.Tuple2.apply
|
|
scala.Tuple2.apply[org.apache.hadoop.conf.Configuration, Boolean](conf, validate)
|
|
109
|
193
|
5069
-
5102
|
Apply
|
com.github.benmanes.caffeine.cache.LoadingCache.get
|
|
HBaseConnectionPool.this.connections.get(scala.Tuple2.apply[org.apache.hadoop.conf.Configuration, Boolean](conf, validate))
|
|
109
|
194
|
5069
-
5102
|
Block
|
com.github.benmanes.caffeine.cache.LoadingCache.get
|
|
HBaseConnectionPool.this.connections.get(scala.Tuple2.apply[org.apache.hadoop.conf.Configuration, Boolean](conf, validate))
|
|
111
|
195
|
5126
-
5158
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.createConnection
|
|
HBaseConnectionPool.this.createConnection(conf, validate)
|
|
111
|
196
|
5126
-
5158
|
Block
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.createConnection
|
|
HBaseConnectionPool.this.createConnection(conf, validate)
|
|
124
|
198
|
5449
-
5482
|
Apply
|
org.apache.hadoop.hbase.security.User.isHBaseSecurityEnabled
|
|
org.apache.hadoop.hbase.security.User.isHBaseSecurityEnabled(conf)
|
|
124
|
204
|
5484
-
5831
|
Block
|
<nosymbol>
|
|
{
HBaseConnectionPool.this.configureSecurity(conf);
val action: java.security.PrivilegedExceptionAction[org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ConnectionWrapper] = {
final class $anon extends Object with java.security.PrivilegedExceptionAction[org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ConnectionWrapper] {
def <init>(): <$anon: java.security.PrivilegedExceptionAction[org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ConnectionWrapper]> = {
$anon.super.<init>();
()
};
override def run(): org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ConnectionWrapper = HBaseConnectionPool.this.doCreateConnection(conf, validate)
};
new $anon()
};
val user: org.apache.hadoop.security.UserGroupInformation = org.apache.hadoop.security.UserGroupInformation.getLoginUser();
(if (HBaseConnectionPool.this.logger.underlying.isInfoEnabled())
HBaseConnectionPool.this.logger.underlying.info("Creating Secured HBase connection with user {}", (user: AnyRef))
else
(): Unit);
user.doAs[org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ConnectionWrapper](action)
}
|
|
125
|
199
|
5492
-
5515
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.configureSecurity
|
|
HBaseConnectionPool.this.configureSecurity(conf)
|
|
126
|
201
|
5535
-
5538
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.$anon.<init>
|
|
new $anon()
|
|
127
|
200
|
5636
-
5670
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.doCreateConnection
|
|
HBaseConnectionPool.this.doCreateConnection(conf, validate)
|
|
129
|
202
|
5696
-
5729
|
Apply
|
org.apache.hadoop.security.UserGroupInformation.getLoginUser
|
|
org.apache.hadoop.security.UserGroupInformation.getLoginUser()
|
|
131
|
203
|
5808
-
5825
|
Apply
|
org.apache.hadoop.security.UserGroupInformation.doAs
|
|
user.doAs[org.locationtech.geomesa.hbase.data.HBaseConnectionPool.ConnectionWrapper](action)
|
|
132
|
206
|
5837
-
5943
|
Block
|
<nosymbol>
|
|
{
(if (HBaseConnectionPool.this.logger.underlying.isInfoEnabled())
HBaseConnectionPool.this.logger.underlying.info("Creating unsecured HBase connection")
else
(): Unit);
HBaseConnectionPool.this.doCreateConnection(conf, validate)
}
|
|
134
|
205
|
5903
-
5937
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.doCreateConnection
|
|
HBaseConnectionPool.this.doCreateConnection(conf, validate)
|
|
139
|
208
|
6063
-
6169
|
Block
|
<nosymbol>
|
|
{
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("Checking configuration availability")
else
(): Unit);
org.locationtech.geomesa.hbase.utils.HBaseVersions.checkAvailable(conf)
}
|
|
139
|
209
|
6049
-
6049
|
Literal
|
<nosymbol>
|
|
()
|
|
139
|
210
|
6049
-
6049
|
Block
|
<nosymbol>
|
|
()
|
|
141
|
207
|
6129
-
6163
|
Apply
|
org.locationtech.geomesa.hbase.utils.HBaseVersions.checkAvailable
|
|
org.locationtech.geomesa.hbase.utils.HBaseVersions.checkAvailable(conf)
|
|
143
|
211
|
6191
-
6231
|
Apply
|
org.apache.hadoop.hbase.client.ConnectionFactory.createConnection
|
|
org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(conf)
|
|
144
|
212
|
6255
-
6288
|
Apply
|
org.apache.hadoop.hbase.security.User.isHBaseSecurityEnabled
|
|
org.apache.hadoop.hbase.security.User.isHBaseSecurityEnabled(conf)
|
|
144
|
213
|
6297
-
6332
|
Apply
|
org.locationtech.geomesa.utils.hadoop.HadoopUtils.kerberosTicketRenewer
|
|
org.locationtech.geomesa.utils.hadoop.HadoopUtils.kerberosTicketRenewer()
|
|
144
|
214
|
6292
-
6333
|
Apply
|
scala.Some.apply
|
|
scala.Some.apply[java.io.Closeable](org.locationtech.geomesa.utils.hadoop.HadoopUtils.kerberosTicketRenewer())
|
|
144
|
215
|
6292
-
6333
|
Block
|
scala.Some.apply
|
|
scala.Some.apply[java.io.Closeable](org.locationtech.geomesa.utils.hadoop.HadoopUtils.kerberosTicketRenewer())
|
|
144
|
216
|
6343
-
6347
|
Select
|
scala.None
|
|
scala.None
|
|
144
|
217
|
6343
-
6347
|
Block
|
scala.None
|
|
scala.None
|
|
145
|
218
|
6354
-
6395
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.SingletonConnection.apply
|
|
HBaseConnectionPool.this.SingletonConnection.apply(connection, kerberos)
|
|
156
|
250
|
6696
-
8641
|
Apply
|
java.lang.Object.synchronized
|
|
HBaseConnectionPool.this.synchronized[Unit]({
import org.apache.hadoop.hbase.security.token.AuthenticationTokenIdentifier.AUTH_TOKEN_TYPE;
if (org.apache.hadoop.hbase.security.User.isHBaseSecurityEnabled(conf))
{
val currentUser: org.apache.hadoop.security.UserGroupInformation = org.apache.hadoop.security.UserGroupInformation.getLoginUser();
if (scala.collection.JavaConverters.collectionAsScalaIterableConverter[org.apache.hadoop.security.token.Token[_ <: org.apache.hadoop.security.token.TokenIdentifier]](currentUser.getCredentials().getAllTokens()).asScala.exists(((x$6: org.apache.hadoop.security.token.Token[_ <: org.apache.hadoop.security.token.TokenIdentifier]) => x$6.getKind().==(org.apache.hadoop.hbase.security.token.AuthenticationTokenIdentifier.AUTH_TOKEN_TYPE))))
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("Using existing HBase authentication token")
else
(): Unit)
else
{
val keytab: String = conf.get(org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaKeyTab);
val rawPrincipal: String = conf.get(org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaPrincipal);
if (keytab.==(null).||(rawPrincipal.==(null)))
{
<stable> <accessor> lazy val missing: Seq[String] = scala.collection.Seq.apply[(String, String)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaKeyTab).->[String](keytab), scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaPrincipal).->[String](rawPrincipal)).collect[String, Seq[String]](({
@SerialVersionUID(value = 0) final <synthetic> class $anonfun extends scala.runtime.AbstractPartialFunction[(String, String),String] with Serializable {
def <init>(): <$anon: ((String, String)) => String> = {
$anonfun.super.<init>();
()
};
final override def applyOrElse[A1 <: (String, String), B1 >: String](x1: A1, default: A1 => B1): B1 = ((x1.asInstanceOf[(String, String)]: (String, String)): (String, String) @unchecked) match {
case (_1: String, _2: String)(String, String)((k @ _), null) => k
case (defaultCase$ @ _) => default.apply(x1)
};
final def isDefinedAt(x1: (String, String)): Boolean = ((x1.asInstanceOf[(String, String)]: (String, String)): (String, String) @unchecked) match {
case (_1: String, _2: String)(String, String)((k @ _), null) => true
case (defaultCase$ @ _) => false
}
};
new $anonfun()
}: PartialFunction[(String, String),String]))(collection.this.Seq.canBuildFrom[String]);
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn("Security is enabled but missing credentials under \'{}\'", (missing.mkString("\' and \'"): AnyRef))
else
(): Unit)
}
else
{
val principal: String = HBaseConnectionPool.this.fullPrincipal(rawPrincipal);
<stable> <accessor> lazy val principalMsg: String = scala.StringContext.apply("\'", "\'", "").s(principal, if (principal.==(rawPrincipal))
""
else
scala.StringContext.apply(" (original \'", "\')").s(rawPrincipal));
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug(scala.StringContext.apply("Using Kerberos with principal ", ", keytab \'", "\', ").s(principalMsg, keytab).+(scala.StringContext.apply("and Hadoop authentication method \'", "\'").s(org.apache.hadoop.security.SecurityUtil.getAuthenticationMethod(conf))))
else
(): Unit);
if (currentUser.hasKerberosCredentials().&&(currentUser.getUserName().==(principal)))
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("User \'{}\' is already authenticated", (principal: AnyRef))
else
(): Unit)
else
{
if (currentUser.hasKerberosCredentials())
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn(scala.StringContext.apply("Changing global authenticated Hadoop user from \'", "\' to \'", "\' -").s(currentUser.getUserName(), principal).+("this will affect any connections still using the old user"))
else
(): Unit)
else
();
org.apache.hadoop.security.UserGroupInformation.setConfiguration(conf);
org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytab(principal, keytab);
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("Logged into Hadoop with user \'{}\'", (org.apache.hadoop.security.UserGroupInformation.getLoginUser().getUserName(): AnyRef))
else
(): Unit)
}
}
}
}
else
()
})
|
|
159
|
219
|
6777
-
6810
|
Apply
|
org.apache.hadoop.hbase.security.User.isHBaseSecurityEnabled
|
|
org.apache.hadoop.hbase.security.User.isHBaseSecurityEnabled(conf)
|
|
159
|
247
|
6812
-
8637
|
Block
|
<nosymbol>
|
|
{
val currentUser: org.apache.hadoop.security.UserGroupInformation = org.apache.hadoop.security.UserGroupInformation.getLoginUser();
if (scala.collection.JavaConverters.collectionAsScalaIterableConverter[org.apache.hadoop.security.token.Token[_ <: org.apache.hadoop.security.token.TokenIdentifier]](currentUser.getCredentials().getAllTokens()).asScala.exists(((x$6: org.apache.hadoop.security.token.Token[_ <: org.apache.hadoop.security.token.TokenIdentifier]) => x$6.getKind().==(org.apache.hadoop.hbase.security.token.AuthenticationTokenIdentifier.AUTH_TOKEN_TYPE))))
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("Using existing HBase authentication token")
else
(): Unit)
else
{
val keytab: String = conf.get(org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaKeyTab);
val rawPrincipal: String = conf.get(org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaPrincipal);
if (keytab.==(null).||(rawPrincipal.==(null)))
{
<stable> <accessor> lazy val missing: Seq[String] = scala.collection.Seq.apply[(String, String)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaKeyTab).->[String](keytab), scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaPrincipal).->[String](rawPrincipal)).collect[String, Seq[String]](({
@SerialVersionUID(value = 0) final <synthetic> class $anonfun extends scala.runtime.AbstractPartialFunction[(String, String),String] with Serializable {
def <init>(): <$anon: ((String, String)) => String> = {
$anonfun.super.<init>();
()
};
final override def applyOrElse[A1 <: (String, String), B1 >: String](x1: A1, default: A1 => B1): B1 = ((x1.asInstanceOf[(String, String)]: (String, String)): (String, String) @unchecked) match {
case (_1: String, _2: String)(String, String)((k @ _), null) => k
case (defaultCase$ @ _) => default.apply(x1)
};
final def isDefinedAt(x1: (String, String)): Boolean = ((x1.asInstanceOf[(String, String)]: (String, String)): (String, String) @unchecked) match {
case (_1: String, _2: String)(String, String)((k @ _), null) => true
case (defaultCase$ @ _) => false
}
};
new $anonfun()
}: PartialFunction[(String, String),String]))(collection.this.Seq.canBuildFrom[String]);
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn("Security is enabled but missing credentials under \'{}\'", (missing.mkString("\' and \'"): AnyRef))
else
(): Unit)
}
else
{
val principal: String = HBaseConnectionPool.this.fullPrincipal(rawPrincipal);
<stable> <accessor> lazy val principalMsg: String = scala.StringContext.apply("\'", "\'", "").s(principal, if (principal.==(rawPrincipal))
""
else
scala.StringContext.apply(" (original \'", "\')").s(rawPrincipal));
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug(scala.StringContext.apply("Using Kerberos with principal ", ", keytab \'", "\', ").s(principalMsg, keytab).+(scala.StringContext.apply("and Hadoop authentication method \'", "\'").s(org.apache.hadoop.security.SecurityUtil.getAuthenticationMethod(conf))))
else
(): Unit);
if (currentUser.hasKerberosCredentials().&&(currentUser.getUserName().==(principal)))
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("User \'{}\' is already authenticated", (principal: AnyRef))
else
(): Unit)
else
{
if (currentUser.hasKerberosCredentials())
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn(scala.StringContext.apply("Changing global authenticated Hadoop user from \'", "\' to \'", "\' -").s(currentUser.getUserName(), principal).+("this will affect any connections still using the old user"))
else
(): Unit)
else
();
org.apache.hadoop.security.UserGroupInformation.setConfiguration(conf);
org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytab(principal, keytab);
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("Logged into Hadoop with user \'{}\'", (org.apache.hadoop.security.UserGroupInformation.getLoginUser().getUserName(): AnyRef))
else
(): Unit)
}
}
}
}
|
|
159
|
248
|
6773
-
6773
|
Literal
|
<nosymbol>
|
|
()
|
|
159
|
249
|
6773
-
6773
|
Block
|
<nosymbol>
|
|
()
|
|
160
|
220
|
6838
-
6871
|
Apply
|
org.apache.hadoop.security.UserGroupInformation.getLoginUser
|
|
org.apache.hadoop.security.UserGroupInformation.getLoginUser()
|
|
161
|
221
|
6882
-
6921
|
Apply
|
org.apache.hadoop.security.Credentials.getAllTokens
|
|
currentUser.getCredentials().getAllTokens()
|
|
161
|
222
|
6950
-
6965
|
Select
|
org.apache.hadoop.hbase.security.token.AuthenticationTokenIdentifier.AUTH_TOKEN_TYPE
|
|
org.apache.hadoop.hbase.security.token.AuthenticationTokenIdentifier.AUTH_TOKEN_TYPE
|
|
161
|
223
|
6937
-
6965
|
Apply
|
java.lang.Object.==
|
|
x$6.getKind().==(org.apache.hadoop.hbase.security.token.AuthenticationTokenIdentifier.AUTH_TOKEN_TYPE)
|
|
161
|
224
|
6882
-
6966
|
Apply
|
scala.collection.IterableLike.exists
|
|
scala.collection.JavaConverters.collectionAsScalaIterableConverter[org.apache.hadoop.security.token.Token[_ <: org.apache.hadoop.security.token.TokenIdentifier]](currentUser.getCredentials().getAllTokens()).asScala.exists(((x$6: org.apache.hadoop.security.token.Token[_ <: org.apache.hadoop.security.token.TokenIdentifier]) => x$6.getKind().==(org.apache.hadoop.hbase.security.token.AuthenticationTokenIdentifier.AUTH_TOKEN_TYPE)))
|
|
162
|
225
|
6978
-
7035
|
Typed
|
<nosymbol>
|
|
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("Using existing HBase authentication token")
else
(): Unit)
|
|
163
|
246
|
7049
-
8631
|
Block
|
<nosymbol>
|
|
{
val keytab: String = conf.get(org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaKeyTab);
val rawPrincipal: String = conf.get(org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaPrincipal);
if (keytab.==(null).||(rawPrincipal.==(null)))
{
<stable> <accessor> lazy val missing: Seq[String] = scala.collection.Seq.apply[(String, String)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaKeyTab).->[String](keytab), scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaPrincipal).->[String](rawPrincipal)).collect[String, Seq[String]](({
@SerialVersionUID(value = 0) final <synthetic> class $anonfun extends scala.runtime.AbstractPartialFunction[(String, String),String] with Serializable {
def <init>(): <$anon: ((String, String)) => String> = {
$anonfun.super.<init>();
()
};
final override def applyOrElse[A1 <: (String, String), B1 >: String](x1: A1, default: A1 => B1): B1 = ((x1.asInstanceOf[(String, String)]: (String, String)): (String, String) @unchecked) match {
case (_1: String, _2: String)(String, String)((k @ _), null) => k
case (defaultCase$ @ _) => default.apply(x1)
};
final def isDefinedAt(x1: (String, String)): Boolean = ((x1.asInstanceOf[(String, String)]: (String, String)): (String, String) @unchecked) match {
case (_1: String, _2: String)(String, String)((k @ _), null) => true
case (defaultCase$ @ _) => false
}
};
new $anonfun()
}: PartialFunction[(String, String),String]))(collection.this.Seq.canBuildFrom[String]);
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn("Security is enabled but missing credentials under \'{}\'", (missing.mkString("\' and \'"): AnyRef))
else
(): Unit)
}
else
{
val principal: String = HBaseConnectionPool.this.fullPrincipal(rawPrincipal);
<stable> <accessor> lazy val principalMsg: String = scala.StringContext.apply("\'", "\'", "").s(principal, if (principal.==(rawPrincipal))
""
else
scala.StringContext.apply(" (original \'", "\')").s(rawPrincipal));
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug(scala.StringContext.apply("Using Kerberos with principal ", ", keytab \'", "\', ").s(principalMsg, keytab).+(scala.StringContext.apply("and Hadoop authentication method \'", "\'").s(org.apache.hadoop.security.SecurityUtil.getAuthenticationMethod(conf))))
else
(): Unit);
if (currentUser.hasKerberosCredentials().&&(currentUser.getUserName().==(principal)))
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("User \'{}\' is already authenticated", (principal: AnyRef))
else
(): Unit)
else
{
if (currentUser.hasKerberosCredentials())
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn(scala.StringContext.apply("Changing global authenticated Hadoop user from \'", "\' to \'", "\' -").s(currentUser.getUserName(), principal).+("this will affect any connections still using the old user"))
else
(): Unit)
else
();
org.apache.hadoop.security.UserGroupInformation.setConfiguration(conf);
org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytab(principal, keytab);
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("Logged into Hadoop with user \'{}\'", (org.apache.hadoop.security.UserGroupInformation.getLoginUser().getUserName(): AnyRef))
else
(): Unit)
}
}
}
|
|
164
|
226
|
7081
-
7099
|
Select
|
org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaKeyTab
|
|
org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaKeyTab
|
|
164
|
227
|
7072
-
7100
|
Apply
|
org.apache.hadoop.conf.Configuration.get
|
|
conf.get(org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaKeyTab)
|
|
165
|
228
|
7137
-
7158
|
Select
|
org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaPrincipal
|
|
org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaPrincipal
|
|
165
|
229
|
7128
-
7159
|
Apply
|
org.apache.hadoop.conf.Configuration.get
|
|
conf.get(org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaPrincipal)
|
|
167
|
230
|
7183
-
7187
|
Literal
|
<nosymbol>
|
|
null
|
|
167
|
231
|
7191
-
7211
|
Apply
|
java.lang.Object.==
|
|
rawPrincipal.==(null)
|
|
167
|
232
|
7173
-
7211
|
Apply
|
scala.Boolean.||
|
|
keytab.==(null).||(rawPrincipal.==(null))
|
|
167
|
233
|
7213
-
7479
|
Block
|
<nosymbol>
|
|
{
<stable> <accessor> lazy val missing: Seq[String] = scala.collection.Seq.apply[(String, String)](scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaKeyTab).->[String](keytab), scala.Predef.ArrowAssoc[String](org.locationtech.geomesa.hbase.data.HBaseDataStoreFactory.HBaseGeoMesaPrincipal).->[String](rawPrincipal)).collect[String, Seq[String]](({
@SerialVersionUID(value = 0) final <synthetic> class $anonfun extends scala.runtime.AbstractPartialFunction[(String, String),String] with Serializable {
def <init>(): <$anon: ((String, String)) => String> = {
$anonfun.super.<init>();
()
};
final override def applyOrElse[A1 <: (String, String), B1 >: String](x1: A1, default: A1 => B1): B1 = ((x1.asInstanceOf[(String, String)]: (String, String)): (String, String) @unchecked) match {
case (_1: String, _2: String)(String, String)((k @ _), null) => k
case (defaultCase$ @ _) => default.apply(x1)
};
final def isDefinedAt(x1: (String, String)): Boolean = ((x1.asInstanceOf[(String, String)]: (String, String)): (String, String) @unchecked) match {
case (_1: String, _2: String)(String, String)((k @ _), null) => true
case (defaultCase$ @ _) => false
}
};
new $anonfun()
}: PartialFunction[(String, String),String]))(collection.this.Seq.canBuildFrom[String]);
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn("Security is enabled but missing credentials under \'{}\'", (missing.mkString("\' and \'"): AnyRef))
else
(): Unit)
}
|
|
171
|
245
|
7485
-
8623
|
Block
|
<nosymbol>
|
|
{
val principal: String = HBaseConnectionPool.this.fullPrincipal(rawPrincipal);
<stable> <accessor> lazy val principalMsg: String = scala.StringContext.apply("\'", "\'", "").s(principal, if (principal.==(rawPrincipal))
""
else
scala.StringContext.apply(" (original \'", "\')").s(rawPrincipal));
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug(scala.StringContext.apply("Using Kerberos with principal ", ", keytab \'", "\', ").s(principalMsg, keytab).+(scala.StringContext.apply("and Hadoop authentication method \'", "\'").s(org.apache.hadoop.security.SecurityUtil.getAuthenticationMethod(conf))))
else
(): Unit);
if (currentUser.hasKerberosCredentials().&&(currentUser.getUserName().==(principal)))
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("User \'{}\' is already authenticated", (principal: AnyRef))
else
(): Unit)
else
{
if (currentUser.hasKerberosCredentials())
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn(scala.StringContext.apply("Changing global authenticated Hadoop user from \'", "\' to \'", "\' -").s(currentUser.getUserName(), principal).+("this will affect any connections still using the old user"))
else
(): Unit)
else
();
org.apache.hadoop.security.UserGroupInformation.setConfiguration(conf);
org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytab(principal, keytab);
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("Logged into Hadoop with user \'{}\'", (org.apache.hadoop.security.UserGroupInformation.getLoginUser().getUserName(): AnyRef))
else
(): Unit)
}
}
|
|
172
|
234
|
7513
-
7540
|
Apply
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.fullPrincipal
|
|
HBaseConnectionPool.this.fullPrincipal(rawPrincipal)
|
|
180
|
235
|
7942
-
7978
|
Apply
|
java.lang.Object.==
|
|
currentUser.getUserName().==(principal)
|
|
180
|
236
|
7904
-
7978
|
Apply
|
scala.Boolean.&&
|
|
currentUser.hasKerberosCredentials().&&(currentUser.getUserName().==(principal))
|
|
181
|
237
|
7994
-
8053
|
Typed
|
<nosymbol>
|
|
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("User \'{}\' is already authenticated", (principal: AnyRef))
else
(): Unit)
|
|
182
|
244
|
8071
-
8613
|
Block
|
<nosymbol>
|
|
{
if (currentUser.hasKerberosCredentials())
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn(scala.StringContext.apply("Changing global authenticated Hadoop user from \'", "\' to \'", "\' -").s(currentUser.getUserName(), principal).+("this will affect any connections still using the old user"))
else
(): Unit)
else
();
org.apache.hadoop.security.UserGroupInformation.setConfiguration(conf);
org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytab(principal, keytab);
(if (HBaseConnectionPool.this.logger.underlying.isDebugEnabled())
HBaseConnectionPool.this.logger.underlying.debug("Logged into Hadoop with user \'{}\'", (org.apache.hadoop.security.UserGroupInformation.getLoginUser().getUserName(): AnyRef))
else
(): Unit)
}
|
|
183
|
238
|
8089
-
8123
|
Apply
|
org.apache.hadoop.security.UserGroupInformation.hasKerberosCredentials
|
|
currentUser.hasKerberosCredentials()
|
|
183
|
240
|
8085
-
8085
|
Literal
|
<nosymbol>
|
|
()
|
|
183
|
241
|
8085
-
8085
|
Block
|
<nosymbol>
|
|
()
|
|
184
|
239
|
8141
-
8349
|
Typed
|
<nosymbol>
|
|
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn(scala.StringContext.apply("Changing global authenticated Hadoop user from \'", "\' to \'", "\' -").s(currentUser.getUserName(), principal).+("this will affect any connections still using the old user"))
else
(): Unit)
|
|
188
|
242
|
8376
-
8419
|
Apply
|
org.apache.hadoop.security.UserGroupInformation.setConfiguration
|
|
org.apache.hadoop.security.UserGroupInformation.setConfiguration(conf)
|
|
189
|
243
|
8432
-
8491
|
Apply
|
org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytab
|
|
org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytab(principal, keytab)
|
|
207
|
251
|
8978
-
9006
|
Apply
|
scala.Int.!=
|
|
principal.indexOf(64).!=(-1)
|
|
209
|
252
|
9135
-
9139
|
Literal
|
<nosymbol>
|
|
null
|
|
209
|
253
|
9092
-
9148
|
Apply
|
org.apache.hadoop.security.SecurityUtil.getServerPrincipal
|
|
org.apache.hadoop.security.SecurityUtil.getServerPrincipal(principal, (null: String))
|
|
209
|
254
|
9092
-
9148
|
Block
|
org.apache.hadoop.security.SecurityUtil.getServerPrincipal
|
|
org.apache.hadoop.security.SecurityUtil.getServerPrincipal(principal, (null: String))
|
|
212
|
255
|
9239
-
9267
|
Apply
|
org.apache.hadoop.security.authentication.util.KerberosUtil.getDefaultRealm
|
|
org.apache.hadoop.security.authentication.util.KerberosUtil.getDefaultRealm()
|
|
212
|
256
|
9235
-
9268
|
Apply
|
scala.util.Try.apply
|
|
scala.util.Try.apply[String](org.apache.hadoop.security.authentication.util.KerberosUtil.getDefaultRealm())
|
|
212
|
267
|
9235
-
9767
|
Match
|
<nosymbol>
|
|
scala.util.Try.apply[String](org.apache.hadoop.security.authentication.util.KerberosUtil.getDefaultRealm()) match {
case (value: String)scala.util.Success[String]((realm @ _)) => org.apache.hadoop.security.SecurityUtil.getServerPrincipal(scala.StringContext.apply("", "@", "").s(principal, realm), (null: String))
case (exception: Throwable)scala.util.Failure[String]((e @ _)) => {
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn("Unable to get default Kerberos realm: {}", (e: AnyRef))
else
(): Unit);
if (principal.contains("_HOST").unary_!)
principal
else
scala.Predef.augmentString(org.apache.hadoop.security.SecurityUtil.getServerPrincipal(scala.StringContext.apply("", "@foo").s(principal), (null: String))).dropRight(4)
}
}
|
|
213
|
257
|
9340
-
9360
|
Apply
|
scala.StringContext.s
|
|
scala.StringContext.apply("", "@", "").s(principal, realm)
|
|
213
|
258
|
9362
-
9366
|
Literal
|
<nosymbol>
|
|
null
|
|
213
|
259
|
9308
-
9375
|
Apply
|
org.apache.hadoop.security.SecurityUtil.getServerPrincipal
|
|
org.apache.hadoop.security.SecurityUtil.getServerPrincipal(scala.StringContext.apply("", "@", "").s(principal, realm), (null: String))
|
|
213
|
260
|
9308
-
9375
|
Block
|
org.apache.hadoop.security.SecurityUtil.getServerPrincipal
|
|
org.apache.hadoop.security.SecurityUtil.getServerPrincipal(scala.StringContext.apply("", "@", "").s(principal, realm), (null: String))
|
|
214
|
266
|
9400
-
9759
|
Block
|
<nosymbol>
|
|
{
(if (HBaseConnectionPool.this.logger.underlying.isWarnEnabled())
HBaseConnectionPool.this.logger.underlying.warn("Unable to get default Kerberos realm: {}", (e: AnyRef))
else
(): Unit);
if (principal.contains("_HOST").unary_!)
principal
else
scala.Predef.augmentString(org.apache.hadoop.security.SecurityUtil.getServerPrincipal(scala.StringContext.apply("", "@foo").s(principal), (null: String))).dropRight(4)
}
|
|
216
|
261
|
9504
-
9533
|
Literal
|
<nosymbol>
|
|
"_HOST"
|
|
216
|
262
|
9484
-
9534
|
Select
|
scala.Boolean.unary_!
|
|
principal.contains("_HOST").unary_!
|
|
216
|
263
|
9538
-
9547
|
Ident
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.principal
|
|
principal
|
|
218
|
264
|
9670
-
9747
|
Apply
|
scala.collection.IndexedSeqOptimized.dropRight
|
|
scala.Predef.augmentString(org.apache.hadoop.security.SecurityUtil.getServerPrincipal(scala.StringContext.apply("", "@foo").s(principal), (null: String))).dropRight(4)
|
|
218
|
265
|
9670
-
9747
|
Block
|
scala.collection.IndexedSeqOptimized.dropRight
|
|
scala.Predef.augmentString(org.apache.hadoop.security.SecurityUtil.getServerPrincipal(scala.StringContext.apply("", "@foo").s(principal), (null: String))).dropRight(4)
|
|
239
|
268
|
10318
-
10326
|
Select
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.SingletonConnection.kerberos
|
|
SingletonConnection.this.kerberos
|
|
239
|
269
|
10340
-
10350
|
Select
|
org.locationtech.geomesa.hbase.data.HBaseConnectionPool.SingletonConnection.connection
|
|
SingletonConnection.this.connection
|
|
239
|
270
|
10336
-
10351
|
Apply
|
scala.collection.generic.GenericCompanion.apply
|
|
scala.collection.Seq.apply[org.apache.hadoop.hbase.client.Connection](SingletonConnection.this.connection)
|
|
239
|
271
|
10333
-
10333
|
TypeApply
|
scala.collection.Seq.canBuildFrom
|
|
collection.this.Seq.canBuildFrom[java.io.Closeable]
|
|
239
|
272
|
10318
-
10351
|
ApplyToImplicitArgs
|
scala.collection.TraversableLike.++
|
|
scala.this.Option.option2Iterable[java.io.Closeable](SingletonConnection.this.kerberos).toSeq.++[java.io.Closeable, Seq[java.io.Closeable]](scala.collection.Seq.apply[org.apache.hadoop.hbase.client.Connection](SingletonConnection.this.connection))(collection.this.Seq.canBuildFrom[java.io.Closeable])
|
|
239
|
273
|
10317
-
10317
|
Select
|
org.locationtech.geomesa.utils.io.IsCloseableImplicits.iterableIsCloseable
|
|
io.this.IsCloseable.iterableIsCloseable
|
|
239
|
274
|
10301
-
10352
|
ApplyToImplicitArgs
|
org.locationtech.geomesa.utils.io.CloseWithLogging.apply
|
|
org.locationtech.geomesa.utils.io.`package`.CloseWithLogging.apply[Seq[java.io.Closeable]](scala.this.Option.option2Iterable[java.io.Closeable](SingletonConnection.this.kerberos).toSeq.++[java.io.Closeable, Seq[java.io.Closeable]](scala.collection.Seq.apply[org.apache.hadoop.hbase.client.Connection](SingletonConnection.this.connection))(collection.this.Seq.canBuildFrom[java.io.Closeable]))(io.this.IsCloseable.iterableIsCloseable)
|
|
239
|
275
|
10317
-
10317
|
Literal
|
<nosymbol>
|
|
()
|
|
249
|
276
|
10638
-
10640
|
Literal
|
<nosymbol>
|
|
()
|
|
258
|
277
|
10878
-
10880
|
Literal
|
<nosymbol>
|
|
()
|