kandi background
Explore Kits

Gossip | Java实现的Gossip协议,借鉴CassandraV1.1.1源码 | Pub Sub library

 by   dongjinyong Java Version: Current License: No License

 by   dongjinyong Java Version: Current License: No License

kandi X-RAY | Gossip Summary

Gossip is a Java library typically used in Messaging, Pub Sub applications. Gossip has no bugs, it has no vulnerabilities, it has build file available and it has low support. You can download it from GitHub.
Java实现的Gossip协议,基于CassandraV1.1.1源码修改实现(尽量保留了Cassandra源码),把Cassandra中Gossip协议相关部分抽取了出来,供大家参考。 目录结构与cassandra源码一致,以下为目录说明: concurrent:并发包工具类. config:配置信息. gms:gossip的核心实现类. io:序列化相关. locator:事件监听器和seed接口. net:通信相关,采用传统的BIO方式,可根据项目需要换成自己的通信服务层. service:供外部调用的方法,gossip协议使用方法实例程序. utils:工具类. 对Cassandra源码的修改主要包括: 1. InetAddress换成InetSocketAddress,可以为每个实例指定不同的端口,方便本机启用多个实例调试。 2. 去掉了与cassandra业务耦合的一些类和方法,对监听器接口做了简化。 3. 简化通信部分,如果项目需要,或者有独立的通信服务代码,直接替换net目录下的类或接口即可。.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • Gossip has a low active ecosystem.
  • It has 31 star(s) with 24 fork(s). There are 5 watchers for this library.
  • It had no major release in the last 6 months.
  • Gossip has no issues reported. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of Gossip is current.
Gossip Support
Best in #Pub Sub
Average in #Pub Sub
Gossip Support
Best in #Pub Sub
Average in #Pub Sub

quality kandi Quality

  • Gossip has 0 bugs and 0 code smells.
Gossip Quality
Best in #Pub Sub
Average in #Pub Sub
Gossip Quality
Best in #Pub Sub
Average in #Pub Sub

securitySecurity

  • Gossip has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • Gossip code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
Gossip Security
Best in #Pub Sub
Average in #Pub Sub
Gossip Security
Best in #Pub Sub
Average in #Pub Sub

license License

  • Gossip does not have a standard license declared.
  • Check the repository for any license declaration and review the terms closely.
  • Without a license, all rights are reserved, and you cannot use the library in your applications.
Gossip License
Best in #Pub Sub
Average in #Pub Sub
Gossip License
Best in #Pub Sub
Average in #Pub Sub

buildReuse

  • Gossip releases are not available. You will need to build from source code and install.
  • Build file is available. You can build the component from source.
  • Gossip saves you 1699 person hours of effort in developing the same functionality from scratch.
  • It has 3765 lines of code, 374 functions and 57 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
Gossip Reuse
Best in #Pub Sub
Average in #Pub Sub
Gossip Reuse
Best in #Pub Sub
Average in #Pub Sub
Top functions reviewed by kandi - BETA

kandi has reviewed Gossip and discovered the below as its top functions. This is intended to give you an instant insight into Gossip implemented functionality, and help decide if they suit your requirements.

  • Main loop .
    • Applies the gossip state locally .
      • Starts listening socket .
        • Handles verification of a message .
          • Parse the configuration information .
            • Sort the digests .
              • Attempt to connect to gziper .
                • Extracts the throwable from a Future .
                  • Read bytes into buffer .
                    • Intercept the arrival window .

                      Get all kandi verified functions for this library.

                      Get all kandi verified functions for this library.

                      Gossip Key Features

                      Gossip Examples and Code Snippets

                      Community Discussions

                      Trending Discussions on Gossip
                      • Upgraded Cassandra 3.11 to 4.0, failed with "node with address ... already exists"
                      • Mongo vs cassandra: single point of failure
                      • What does solana-test-validator do on the background?
                      • How to use asyncio and aioredis lock inside celery tasks?
                      • How to make a redis cluster in k8s environment using nodeport service type?
                      • Correct EventStore config for a 3 node cluster?
                      • How can you tell if a solana node is synced?
                      • RabbitMQ, Celery and Django - connection to broker lost. Trying to re-establish the connection
                      • Alert manager in prometheus not starting
                      • How to pass broker_url from Django settings.py to a Celery service
                      Trending Discussions on Gossip

                      QUESTION

                      Upgraded Cassandra 3.11 to 4.0, failed with "node with address ... already exists"

                      Asked 2022-Mar-07 at 00:15

                      we try to upgrade apache cassandra 3.11.12 to 4.0.2, this is the first node we upgrade in this cluster (seed node). we drain the node and stop the service before replace the version.

                      system log:

                      NFO  [RMI TCP Connection(16)-IP] 2022-03-03 15:50:18,811 StorageService.java:1568 - DRAINED
                      ....
                      ....
                      INFO  [main] 2022-03-03 15:58:02,970 QueryProcessor.java:167 - Preloaded 0 prepared statements
                      INFO  [main] 2022-03-03 15:58:02,970 StorageService.java:735 - Cassandra version: 4.0.2
                      INFO  [main] 2022-03-03 15:58:02,971 StorageService.java:736 - CQL version: 3.4.5
                      INFO  [main] 2022-03-03 15:58:02,971 StorageService.java:737 - Native protocol supported versions: 3/v3, 4/v4, 5/v5, 6/v6-beta (default: 5/v5)
                      ...
                      ...
                      WARN  [main] 2022-03-03 15:58:03,328 SystemKeyspace.java:1130 - No host ID found, created d78ab047-f1f9-4a07-8118-2fa83f4571ef (Note: This should happen exactly once per node).
                      ....
                      ...
                      ERROR [main] 2022-03-03 15:58:04,543 CassandraDaemon.java:911 - Exception encountered during startup
                      java.lang.RuntimeException: A node with address /HOST_IP:7001 already exists, cancelling join. Use cassandra.replace_address if you want to replace this node.
                              at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:660)
                              at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:935)
                              at org.apache.cassandra.service.StorageService.initServer(StorageService.java:785)
                              at org.apache.cassandra.service.StorageService.initServer(StorageService.java:730)
                              at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:420)
                              at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:765)
                              at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:889)
                      INFO  [StorageServiceShutdownHook] 2022-03-03 15:58:04,558 HintsService.java:222 - Paused hints dispatch
                      WARN  [StorageServiceShutdownHook] 2022-03-03 15:58:04,561 Gossiper.java:2032 - No local state, state is in silent shutdown, or node hasn't joined, not announcing shutdown
                      INFO  [StorageServiceShutdownHook] 2022-03-03 15:58:04,561 MessagingService.java:441 - Waiting for messaging service to quiesce
                      ...
                      ..
                      INFO  [StorageServiceShutdownHook] 2022-03-03 15:58:06,956 HintsService.java:222 - Paused hints dispatch
                      

                      did we need to delete\rm -rf system* data directories after drain the node before we start the new cassandra version (We didn't do that)? how we can solve this problem?

                      ANSWER

                      Answered 2022-Mar-07 at 00:15

                      During startup, Cassandra tries to retrieve the host ID by querying the local system table with:

                      SELECT host_id FROM system.local WHERE key = 'local'
                      

                      But if the system.local table is empty or the SSTables are missing from system/local-*/ data subdirectories, Cassandra assumes that it is a brand new node and assigns a new host ID. However in your case, Cassandra realises that another node with the same IP address is already part of the cluster when it gossips with other nodes.

                      You need to figure out why Cassandra can't access the local system.local table. If someone deleted system/local-*/ from the data directory, then you won't be able to start the node again. If this was the case, you'll need to start from scratch which involves:

                      • wipe all the contents of data/, commitlog/ and saved_caches/
                      • uninstall C* 4.0
                      • reinstall C* 3.11

                      You will then need to replace the node "with itself" using the replace_address method. Cheers!

                      Source https://stackoverflow.com/questions/71343502

                      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                      Vulnerabilities

                      No vulnerabilities reported

                      Install Gossip

                      You can download it from GitHub.
                      You can use Gossip like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the Gossip component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

                      Support

                      For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

                      Find more information at:

                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 650 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      Clone
                      • https://github.com/dongjinyong/Gossip.git

                      • gh repo clone dongjinyong/Gossip

                      • git@github.com:dongjinyong/Gossip.git

                      Share this Page

                      share link

                      See Similar Libraries in

                      Consider Popular Pub Sub Libraries
                      Compare Pub Sub Libraries with Highest Support
                      Compare Pub Sub Libraries with Highest Quality
                      Compare Pub Sub Libraries with Highest Security
                      Compare Pub Sub Libraries with Permissive License
                      Compare Pub Sub Libraries with Highest Reuse
                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 650 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit