Skip to content

Commit 2b13b9f

Browse files
committed
cleaned up docs, lowered logging level for informer
1 parent 8e28aed commit 2b13b9f

5 files changed

Lines changed: 30 additions & 12 deletions

File tree

src/main/java/tech/stackable/hadoop/StackableTopologyProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ public void onAdd(Pod pod) {
582582
for (PodIP ip : pod.getStatus().getPodIPs()) {
583583
cache.putPod(ip.getIp(), pod);
584584
}
585-
LOG.info("Pod {} added", pod.getMetadata().getName());
585+
LOG.debug("Pod {} added", pod.getMetadata().getName());
586586
}
587587

588588
@Override
@@ -591,7 +591,7 @@ public void onUpdate(Pod oldPod, Pod newPod) {
591591
for (PodIP ip : oldPod.getStatus().getPodIPs()) {
592592
cache.putPod(ip.getIp(), newPod);
593593
}
594-
LOG.info("Pod {} updated", oldPod.getMetadata().getName());
594+
LOG.trace("Pod {} updated", oldPod.getMetadata().getName());
595595
}
596596

597597
@Override
@@ -600,7 +600,7 @@ public void onDelete(Pod pod, boolean deletedFinalStateUnknown) {
600600
for (PodIP ip : pod.getStatus().getPodIPs()) {
601601
cache.deletePod(ip.getIp());
602602
}
603-
LOG.info("Pod {} deleted", pod.getMetadata().getName());
603+
LOG.debug("Pod {} deleted", pod.getMetadata().getName());
604604
}
605605
},
606606
INFORMER_POLL_SECONDS * 1000L);

test/topology-provider/stack/03-hdfs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ metadata:
1919
spec:
2020
image:
2121
productVersion: 3.4.2
22-
custom: oci.stackable.tech/sandbox/andrew/hadoop:3.4.2-stackable0.0.0-topprov
22+
custom: oci.stackable.tech/sandbox/hadoop:3.4.2-stackable0.0.0-dev
2323
pullPolicy: IfNotPresent
2424
clusterConfig:
2525
dfsReplication: 1
@@ -48,6 +48,8 @@ spec:
4848
configOverrides: &configOverrides
4949
core-site.xml:
5050
hadoop.user.group.static.mapping.overrides: "dr.who=;nn=;nm=;jn=;testuser=supergroup;"
51+
envOverrides:
52+
HADOOP_NAMENODE_OPTS: -agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n
5153
roleGroups:
5254
default:
5355
replicas: 2

test/topology-provider/stack/04-spark.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
mainApplicationFile: local:///tmp/spark-terasort-1.2-SNAPSHOT.jar
1313
mainClass: com.github.ehiggs.spark.terasort.TeraGen
1414
args:
15-
- "100M"
15+
- "10M"
1616
- "hdfs://simple-hdfs/user/stackable/teragen_output"
1717
sparkConf:
1818
"spark.driver.extraClassPath": "/etc/hadoop/conf/:/stackable/spark/extra-jars/*"

test/topology-provider/stack/05-access-hdfs.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
spec:
99
containers:
1010
- name: access-hdfs
11-
image: oci.stackable.tech/sandbox/andrew/hadoop:3.4.2-stackable0.0.0-topprov
11+
image: oci.stackable.tech/sandbox/hadoop:3.4.2-stackable0.0.0-dev
1212
imagePullPolicy: IfNotPresent
1313
env:
1414
- name: HADOOP_CONF_DIR
@@ -26,14 +26,13 @@ spec:
2626
kinit -kt /stackable/kerberos/keytab testuser/access-hdfs.default.svc.cluster.local
2727
klist
2828
29-
#bin/hdfs dfs -mkdir /stackable
30-
#bin/hdfs dfs -chown -R access-hive /stackable
31-
#bin/hdfs dfs -mkdir /access-hive
32-
#bin/hdfs dfs -chown -R access-hive /access-hive
29+
30+
bin/hdfs dfs -mkdir /access-hdfs
31+
bin/hdfs dfs -chown -R access-hdfs /access-hdfs
3332
bin/hdfs dfs -ls /
34-
#bin/hdfs dfs -ls -d /
33+
bin/hdfs dfsadmin -printTopology
34+
echo "Hello HDFS" | bin/hdfs dfs -put - /access-hdfs/file.txt
3535
36-
sleep infinity
3736
volumeMounts:
3837
- name: hdfs-config
3938
mountPath: /stackable/conf/hdfs
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Testing
2+
3+
## Install operators
4+
5+
```bash
6+
stackablectl op in secret commons listener secret zookeeper hdfs spark-k8s
7+
```
8+
9+
## Run scripts in the `default` namespace
10+
11+
```bash
12+
kubectl apply -f ./hdfs-utils/test/topology-provider/stack/01-install-krb5-kdc.yaml
13+
kubectl apply -f ./hdfs-utils/test/topology-provider/stack/02-create-kerberos-secretclass.yaml
14+
kubectl apply -f ./hdfs-utils/test/topology-provider/stack/03-hdfs.yaml
15+
kubectl apply -f ./hdfs-utils/test/topology-provider/stack/04-spark.yaml
16+
kubectl apply -f ./hdfs-utils/test/topology-provider/stack/05-access-hdfs.yaml
17+
```

0 commit comments

Comments
 (0)