Clearing code samples from internal API's and asserts.
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Refactorización
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- java
- Área
- documentation
Línea de trabajo
Comienza revisando el pull request de code-samples enlazado y AbstractCacheSplitBrainSample.java, especialmente el ejemplo de split-brain alrededor de la línea 105. Después, haz un inventario de las assertions de Common Utils, del acceso a nodos, del uso de generateKeyOwnedBy y de las clases abstractas SplitBrainSamples. Se considera terminado cuando exista un alcance acordado y coherente para simplificar los samples sin depender de APIs internas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I don't know if it is discussed before. Our code samples use internal API, which caused compile problem in this release when changed. Fixed here https://github.com/hazelcast/hazelcast-code-samples/pull/303/files
The reason of usage seems to demonstrate some features are working. And it resembles our unit tests.
I think the code sample does not need that much verification. Since it is to show how hazelcast should be used, it is giving wrong advice.
Heaviest usage is around simulating the split brain. That requires access to node. I think this should not be part of the code samples. Configuring split brain on code samples make sense. But simulating the behavior I think is part of the unit tests.
https://github.com/hazelcast/hazelcast-code-samples/blob/master/jcache/src/main/java/com/hazelcast/examples/splitbrain/AbstractCacheSplitBrainSample.java#L105
I see generateKeyOwnedBy usage. I don't think we are advising this to our users. Make sense for tests but users should use affinity features instead of generating the key for a specific partition. And interestingly, this also accesses to node.
I think we also need rules for using assertions. We have the following methods on Common Utils. My gut feeling says that code samples should not do assert.
.assertClusterSizeEventually;
.assertEquals;
.assertOpenEventually;
I am keen to do the following
System.out.println(cache1.get("key1"));//prints 'value'
instead of
assertEquals("value",);
Lastly, I see abstract class usages too much. Especially around SplitBrainSamples. I think code samples should be one class and simple. Using abstractions to demonstrate simple usages will scare of the users. This again seems to be caused by simulating the split brain. When we remove that part, abstractions will go away too.
- Lenguaje dominante
- Java
- Estrellas
- 558
- Forks
- 599
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hazelcast/hazelcast-code-samples
-
[BUG] ClassLoader Leak / Metaspace OOM: Unmanaged static ThreadLocal<Kryo> in PersonKryoSerializerAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
-
hazelcast code sample for XA transactions no longer works with current Atomikos version (5.0.9)Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
hazelcast/hazelcast-code-samples#553 · 4 comentarios ·
Todos los issues de hazelcast/hazelcast-code-samples
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
tchiotludo/akhq#3438 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#266 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
ome/bioformats#4509 ·
Los mantenedores suelen responder en 2 días
-
module/email Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
ballerina-platform/ballerina-library#9758 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Azure/azure-functions-java-worker#909 · 1 reacción ·