Coprocessor access to HBase internals
By Lars Hofhansl Most folks familiar with HBase have heard of coprocessors. Coprocessors come in two flavors: Observers and Endpoints. An Observer is similar to a database trigger, an Endpoint can be likened to a stored procedure. This ana
By Lars HofhanslMost folks familiar with HBase have heard of coprocessors.
Coprocessors come in two flavors: Observers and Endpoints.
An Observer is similar to a database trigger, an Endpoint can be likened to a stored procedure.
This analogy only goes that far, though.
While triggers and stored procedures are (typically) sandboxed and expressed in a highlevel language (typically SQL with procedural extensions), coprocessors are written in Java and are designed to extend HBase directly (in the sense of avoiding subclassing the HRegionServer class in order to extend it). Code in a coprocessor will happily shutdown a region server by calling System.exit(...)!
On the other hand coprocessors are strangely limited. Before HBASE-6522 they had no access to a RegionServer's locks and leases and hence it was impossible to implement check-and-set type as a coprocessor (because the row modified would need to be locked), or to time out expensive server side data structures (via leases).
HBASE-6522 makes some trivial changes to remedy that.
It was also hard to maintain any kind of share state in coprocessors.
Keep in mind that region coprocessors are loaded per region and there might be 100's of regions for a given region server.
Static members won't work reliably, because coprocessor classes are loaded by special classloaders.
HBASE-6505 fixes that too. Now the RegionCoprocessorEnvironment provides a getSharedData() method, which returns a ConcurrentMap, which is held by the coprocessor environment as a weak reference (in a special map with strongly referenced keys and weakly referenced values), and held strongly by the environment that manages each coprocessor.
That way if the coprocessor is blacklisted (due to throwing an unexpected exception) the coprocessors environment is removed, and any shared data is immediately available for garbage collection, thus avoiding ugly and error prone reference counting (maybe this warrants a separate post).
This shared data is per coprocessor class and per regionserver. As long as there is at least one region observer or endpoint active this shared data is not garbage collected and can be accessed to share state between the remaining coprocessors of the same class.
These changes allow coprocessor to be used for a variety of use cases.
State can be shared across them, allowing coordination between many regions, for example for coordinated queries.
Row locks can be created and released - allowing for check-and-set type operations.
And leases can be used to safely expire expensive data structures or to time out locks among other uses.
Update:
I should also mention that RegionObservers already have access to a region's MVCC.
原文地址:Coprocessor access to HBase internals, 感谢原作者分享。

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

SQL IF 명령문은 구문을 다음과 같이 조건부로 실행하는 데 사용됩니다. if (조건) 그런 다음 {state} else {state} end if;. 조건은 유효한 SQL 표현식 일 수 있으며 조건이 참이면 당시 조항을 실행하십시오. 조건이 false 인 경우 else 절을 실행하십시오. 명세서를 중첩 할 수있는 경우 더 복잡한 조건부 점검이 가능합니다.

Vue Axios의 크로스 도메인 문제를 해결하는 방법 : Cors 플러그인을 사용하여 Websocket을 사용하여 JSONP를 사용하여 Axios 프록시를 사용하여 서버 측의 CORS 헤더 구성

Apache에서 Zend를 구성하는 방법은 무엇입니까? Apache 웹 서버에서 Zend 프레임 워크를 구성하는 단계는 다음과 같습니다. Zend 프레임 워크를 설치하고 웹 서버 디렉토리로 추출하십시오. .htaccess 파일을 만듭니다. Zend 응용 프로그램 디렉토리를 작성하고 Index.php 파일을 추가하십시오. Zend 응용 프로그램 (application.ini)을 구성하십시오. Apache 웹 서버를 다시 시작하십시오.

Root로 MySQL에 로그인 할 수없는 주된 이유는 권한 문제, 구성 파일 오류, 암호 일관성이 없음, 소켓 파일 문제 또는 방화벽 차단입니다. 솔루션에는 다음이 포함됩니다. 구성 파일의 BAND-ADDRESS 매개 변수가 올바르게 구성되어 있는지 확인하십시오. 루트 사용자 권한이 수정 또는 삭제되어 재설정되었는지 확인하십시오. 케이스 및 특수 문자를 포함하여 비밀번호가 정확한지 확인하십시오. 소켓 파일 권한 설정 및 경로를 확인하십시오. 방화벽이 MySQL 서버에 연결되는지 확인하십시오.

멀티 스레딩의 장점은 특히 많은 양의 데이터를 처리하거나 시간이 많이 걸리는 작업을 수행하기 위해 성능 및 리소스 활용도를 향상시킬 수 있다는 것입니다. 이를 통해 여러 작업을 동시에 수행하여 효율성을 향상시킬 수 있습니다. 그러나 너무 많은 스레드가 성능 저하로 이어질 수 있으므로 CPU 코어 수와 작업 특성에 따라 스레드 수를 신중하게 선택해야합니다. 또한 다중 스레드 프로그래밍에는 교착 상태 및 레이스 조건과 같은 과제가 포함되며 동기화 메커니즘을 사용하여 해결해야하며 동시 프로그래밍에 대한 확실한 지식, 장단점을 측정하고주의해서 사용해야합니다.

이 기사에서는 데비안 시스템에서 NGINX 서버의 SSL 성능을 효과적으로 모니터링하는 방법에 대해 설명합니다. NginxOxporter를 사용하여 Nginx 상태 데이터를 프로 메테우스로 내보낸 다음 Grafana를 통해 시각적으로 표시합니다. 1 단계 : nginx 구성 먼저 Nginx 구성 파일에서 stub_status 모듈을 활성화하여 nginx의 상태 정보를 얻어야합니다. nginx 구성 파일에 다음 스 니펫을 추가하십시오 (일반적으로 /etc/nginx/nginx.conf에 있거나 포함 파일에 위치) : location/nginx_status {stub_status

Phpmyadmin 보안 방어 전략의 핵심은 다음과 같습니다. 1. Phpmyadmin의 최신 버전을 사용하고 정기적으로 PHP 및 MySQL을 업데이트합니다. 2. 액세스 권한을 엄격하게 제어하고, .htaccess 또는 웹 서버 액세스 제어 사용; 3. 강력한 비밀번호와 2 단계 인증을 활성화합니다. 4. 데이터베이스를 정기적으로 백업하십시오. 5. 민감한 정보를 노출하지 않도록 구성 파일을주의 깊게 확인하십시오. 6. WAF (Web Application Firewall) 사용; 7. 보안 감사를 수행하십시오. 이러한 조치는 부적절한 구성, 이전 버전 또는 환경 보안 위험으로 인해 PhpmyAdmin으로 인한 보안 위험을 효과적으로 줄이고 데이터베이스의 보안을 보장 할 수 있습니다.

vprocesserazrabotkiveb-enclosed, мнепришлостольносться악 · 뇨 зейейерациигоглапи혁 맥발 추배. LeavallysumballancefriAblancefaumdoMatification, čtookazalovnetakprosto, Kakaožidal.posenesko
