묻고 답해요
130만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결카프카 완벽 가이드 - 코어편
Idempotence 관련 질문 드립니다.
안녕하세요,좋은 강의 만들어주셔서 감사합니다.Idempotence 관련해서 보다가 궁금한게 있어서 문의 드립니다.Idempotence를 사용하면 Producer에서 전송된 Broker로 전송 시 메시지 전송 순서가 유지가 된다고 하셨는데,파티션된 토픽에 대해서는 어떻게 되는지 궁금합니다.파티션 내에서만 순서가 유지되는 걸까요? 파티션이 3개로 된 토픽의 경우는 10개의 메시지가 전달 될 때 10개의 메시지가 쪼개져서 파티션별로 데이터가 들어갈텐데 그렇게 되면 전체 토픽에 대해서 순서 유지가 안되지 않을까해서 질문 드렸습니다. 감사합니다.
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
docckerrun.aws.json 파일에서 name과 hostname의 차이가 궁금합니다.
안녕하세요. 알찬 강의 잘 듣고 있습니다.Dockerrun.aws.json 파일의containerDefinitions안의 container를 정의할 때,"name"과 "hostname"의 차이가 궁금합니다. 감사합니다.
-
미해결카프카 완벽 가이드 - 코어편
Partition에 할당된 Batch Buffer
안녕하세요강의 잘 듣고 있습니다."Kafka Producer의 send() 메소드 호출 프로세스" 장표에 묘사된 Batch 관련해서 의견 남깁니다. 강의 중반부터 나오듯이 각 Batch 버퍼는 Partition과 1대1 대응하도록 되어있는데, 해당 장표에서는 Partition#1 안에 여러개의 배치가 존재할 수 있는 것처럼 되어 있어 혼동이 생길 수 있어 보입니다. Partition#1에 갈 Message는 Batch#1에만 적재되어야하므로 그림 상 P#1 안에는 B#1만 있는 것이 맞지 않을까요? 만약 제가 의도와는 다르게 이해한 것이라면, 간략한 설명 덧붙여주시면 감사하겠습니다.
-
미해결Airflow 마스터 클래스
postgres port 설정 질문있습니다
안녕하세요 선생님!지금 DBeaver에 DB 연결하는 과정 진행중에있는데, 제가 기존에 5432포트를 사용하고있어서 그런지 아래와같이 에러가 발생합니다.이런 경우에는 yaml 파일에서 포트를 임의로 수정해도 괜찮을까요? 임의로 수정했을때 혹시 이후의 과정에서 문제가 없는지 궁금합니다.그리고 동일번호의 포트는 DBeaver에서 2개 이상 쓸수없는게 맞는지도 궁금합니다
-
미해결[아파치 카프카 애플리케이션 프로그래밍] 개념부터 컨슈머, 프로듀서, 커넥트, 스트림즈까지!
컨슈머 --partition 옵션
producer와 consumer는 리더 파티션과 통신해야한다고 알고 있었는데요, --partition 옵션으로 지정하는 파티션이 리더 파티션이 아닌 경우에도 메시지를 소비하는 것이 가능한것인가요?
-
미해결[아파치 카프카 애플리케이션 프로그래밍] 개념부터 컨슈머, 프로듀서, 커넥트, 스트림즈까지!
브로커가 여러개인 클러스터에서 토픽 생성
kafka topic을 생성할 때 broker 서버를 지정하는 것으로 보이는데요, broker 여러대로 구성된 클러스터에서 한 브로커 서버를 지정해서 파티션 10개의 토픽을 생성하고 토픽 정보를 describe로 확인하면 어떻게 되나요?10개의 파티션이 분산되어서 해당 브로커 서버의 파티션 개수는 일부만 찍히게 되는건가요?
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
deploy.yaml에 관해 질문이 있습니다.
name: Deploy Frontend on: push: branches: - main jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - run: docker build -t jaewonhimnae/react-test -f Dockerfile.dev . - run: docker run -e CI=true jaewonhimnae/react-test npm test - name: Generate deployment package run: zip -r deploy.zip . -x '*.git*' - name: Deploy to EB uses: einaregilsson/beanstalk-deploy@v18 with: aws_access_key: ${{ secrets.AWS_ACCESS_KEY }} aws_secret_key: ${{ secrets.AWS_SECRET_KEY }} application_name: react-docker-gh-test environment_name: React-docker-gh-test-env existing_bucket_name: elasticbeanstalk-ap-northeast-2-972153559337 region: ap-northeast-2 version_label: ${{ github.sha }} deployment_package: deploy.zip 코드가 이렇게 되어 있는데 run : docker build -t jaewonhimnae/react-test -f Dockerfile.dev .이 부분을 보면 Dockerfile.dev로만 build를 하는데 Dockerfile, docker-compose-yml, docker-compose-dev-yml 파일은 사용하지 않는 건가요?Docker desktop에 보면 이미지가 없던데 이미지는 다른 곳에 생성, 저장되는 건가요?
-
해결됨Airflow 마스터 클래스
section 8 postgres 연결 안됨
선생님 안녕하세요좋은 강의 감사합니다. section 8, connection 과 hook 강의 9분 대에서 처음으로 postgres 서버와 연결하는 부분에서 연결이 안된다고 에러가 뜨는데요 에러내용은 아래와 같습니다.참고로 저는 5432 포트 대신 5429 포트를 사용했고, dbeaver 상에 postgres도 제대로 연결이 되었고, py_opr_drct_insrt 테이블도 제대로 만들어졌습니다.오류 내용 중에 이런 내용이 있던데conn = _connect(dsn, connection_factory=connection_factory, **kwasync)psycopg2.OperationalError: connection to server at "172.28.0.3", port 5429 failed: Connection refusedIs the server running on that host and accepting TCP/IP connections? postgres 설정에 무슨 문제가 있는 것일까요? 891c9ef91a84*** Found local files:*** * /opt/airflow/logs/dag_id=dags_python_with_postgres/run_id=manual__2024-01-01T05:58:04.315802+00:00/task_id=insrt_postgres/attempt=1.log[2024-01-01, 14:58:06 KST] {taskinstance.py:1103} INFO - Dependencies all met for dep_context=non-requeueable deps ti=<TaskInstance: dags_python_with_postgres.insrt_postgres manual__2024-01-01T05:58:04.315802+00:00 [queued]>[2024-01-01, 14:58:06 KST] {taskinstance.py:1103} INFO - Dependencies all met for dep_context=requeueable deps ti=<TaskInstance: dags_python_with_postgres.insrt_postgres manual__2024-01-01T05:58:04.315802+00:00 [queued]>[2024-01-01, 14:58:06 KST] {taskinstance.py:1308} INFO - Starting attempt 1 of 1[2024-01-01, 14:58:06 KST] {taskinstance.py:1327} INFO - Executing <Task(PythonOperator): insrt_postgres> on 2024-01-01 05:58:04.315802+00:00[2024-01-01, 14:58:07 KST] {standard_task_runner.py:57} INFO - Started process 80 to run task[2024-01-01, 14:58:07 KST] {standard_task_runner.py:84} INFO - Running: ['***', 'tasks', 'run', 'dags_python_with_postgres', 'insrt_postgres', 'manual__2024-01-01T05:58:04.315802+00:00', '--job-id', '447', '--raw', '--subdir', 'DAGS_FOLDER/9. dags_python_with_postgres.py', '--cfg-path', '/tmp/tmp7_5f243h'][2024-01-01, 14:58:07 KST] {standard_task_runner.py:85} INFO - Job 447: Subtask insrt_postgres[2024-01-01, 14:58:07 KST] {task_command.py:410} INFO - Running <TaskInstance: dags_python_with_postgres.insrt_postgres manual__2024-01-01T05:58:04.315802+00:00 [running]> on host 891c9ef91a84[2024-01-01, 14:58:07 KST] {taskinstance.py:1547} INFO - Exporting env vars: AIRFLOW_CTX_DAG_OWNER='***' AIRFLOW_CTX_DAG_ID='dags_python_with_postgres' AIRFLOW_CTX_TASK_ID='insrt_postgres' AIRFLOW_CTX_EXECUTION_DATE='2024-01-01T05:58:04.315802+00:00' AIRFLOW_CTX_TRY_NUMBER='1' AIRFLOW_CTX_DAG_RUN_ID='manual__2024-01-01T05:58:04.315802+00:00'[2024-01-01, 14:58:07 KST] {taskinstance.py:1824} ERROR - Task failed with exceptionTraceback (most recent call last):File "/home/airflow/.local/lib/python3.7/site-packages/airflow/operators/python.py", line 181, in executereturn_value = self.execute_callable()File "/home/airflow/.local/lib/python3.7/site-packages/airflow/operators/python.py", line 198, in execute_callablereturn self.python_callable(*self.op_args, **self.op_kwargs)File "/opt/airflow/dags/9. dags_python_with_postgres.py", line 16, in insrt_postgreswith closing(psycopg2.connect(host=ip, dbname=dbname, user=user, password=passwd, port=int(port))) as conn:File "/home/airflow/.local/lib/python3.7/site-packages/psycopg2/__init__.py", line 122, in connectconn = _connect(dsn, connection_factory=connection_factory, **kwasync)psycopg2.OperationalError: connection to server at "172.28.0.3", port 5429 failed: Connection refusedIs the server running on that host and accepting TCP/IP connections?[2024-01-01, 14:58:07 KST] {taskinstance.py:1350} INFO - Marking task as FAILED. dag_id=dags_python_with_postgres, task_id=insrt_postgres, execution_date=20240101T055804, start_date=20240101T055806, end_date=20240101T055807[2024-01-01, 14:58:07 KST] {standard_task_runner.py:109} ERROR - Failed to execute job 447 for task insrt_postgres (connection to server at "172.28.0.3", port 5429 failed: Connection refusedIs the server running on that host and accepting TCP/IP connections?; 80)[2024-01-01, 14:58:07 KST] {local_task_job_runner.py:225} INFO - Task exited with return code 1[2024-01-01, 14:58:07 KST] {taskinstance.py:2653} INFO - 0 downstream tasks scheduled from follow-on schedule check 같은 강의 15:00 부분 connection 부분 실습에서 test를 누르면 아래와 같은 에러가 뜹니다. 아마 같은게 아닐까 싶습니다connection to server at "172.28.0.3", port 5429 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? dags_python_with_postgres 파일에서 구간마다 print 를 해서 실행되는지 여부를 확인해본 결과 print('실행1')with closing(psycopg2.connect(host=ip, dbname=dbname, user=user, password=passwd, port=int(port))) as conn:print('conn', conn) '실행1' 은 프린트가 되는데 conn은 프린트가 안됩니다.그런데 ip, port, dbname, user, passwd, **kwargs 모두 정확하게 들어갔거든요 ㅠ
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
COPY --from=builder /usr/src.\/app/build 문 not found 에러 발생
안녕하세요 수업내용 중 운영환경 도케 이미지를 위한 Dockerfile 작성하기 에서 ***********************************************FROM node:alpine as builder WORKDIR /usr/src/app COPY package.json ./ RUN npm install COPY ./ ./ CMD ["npm", "run", "build"] FROM nginx COPY --from=builder /usr/src/app/build /usr/share/nginx/html***********************************************위 와 같이 작성하였더니 아래 이미지와 같은 에러가 확인되었습니다. > [stage-1 2/2] COPY --from=builder /usr/src/app/build /usr/share/nginx/html:------Dockerfile:9-------------------- 8 | FROM nginx 9 | >>> COPY --from=builder /usr/src/app/build /usr/share/nginx/html--------------------ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 800cbe25-2c37-4cd8-a955-7b83c9ca7ed6::qsbcjgd4h6b5x2kfg8hzb8sb0: "/usr/src/app/build": not found*********************************************** >>> 경로를 생성하지 못하여 발생하는 것처럼 느껴져 RUN make -p 명령어를 사용하여 not found 되고 있다는 경로를 직접 생성해주고 나니 정상 build 되기는 하였습니다만.이렇게 하면 혹시 덮어쓰기 되지 않을까해서 문의를 별도로 넣습니다.FROM node:alpine as builder WORKDIR /usr/src/app RUN mkdir -p /usr/src/app/build COPY package.json ./ RUN npm install COPY ./ ./ CMD ["npm", "run", "build"] FROM nginx COPY --from=builder /usr/src/app/build /usr/share/nginx/html
-
해결됨Airflow 마스터 클래스
스케줄링과 관련된 질문입니다.
섹션3, 첫번째 강의에서 스케줄에 관한 질문입니다. 강의에서, start_date = 2023.1.1schedule = "30 6 * * *"next_run = 2023 03 18 6:30그리고 현재 날짜는 2023 03 19 인것으로 봤는데, next_run이 현재날짜보다 뒤에 있으니 pause -> unpause 를 하게되면 자동실행이 안되어야 하는거 아닌가요? 강의에서는 자동으로 실행되는것으로 봐서요. 감사합니다.
-
해결됨빅데이터 클러스터 구축 패키지; 성공을 향한 로드맵
강의자료
혹시 강의 자료는 어디서 얻을 수 있을까요? 개인적으로 인프런 강의 구매한 사람 입니다.
-
해결됨Airflow 마스터 클래스
섹션 7 custom operator 실습 질문 (variable)
선생님 안녕하세요좋은 강의 감사드립니다. 섹션 7 custom operator 실습 강의에서 계속 오류가 나서, 이런 저런 시도를 해보던 도중에 variable 에 문제가 있다는 것을 알고 수정해서 해결을 했는데요. 강의대로 했는데 안되는 이유를 모르겠습니다. 아래는 저의seoul_api_to_csv_operator.py 파일인데요 class SeoulApiToCsvOperator(BaseOperator): template_fields = ('endpoint', 'path','file_name','base_dt') def init(self, dataset_nm, path, file_name, base_dt=None, **kwargs): super().__init__(**kwargs) self.http_conn_id = 'openapi.seoul.go.kr' self.path = path self.file_name = file_name self.endpoint = '{{var.value.apikey_openapi_seoul_go_kr}}/json/' + dataset_nm self.base_dt = base_dt self.endpoint = '{{var.value.apikey_openapi_seoul_go_kr}}/json/' + dataset_nm 부분을self.endpoint = 'api key 직접 입력/json' + dataset_nm 으로 바꾸니까 코드가 정상적으로 실행이 되었습니다. 그런데 이해가 안되는것이 airflow admin --> variable 에 들어가서 강의에 나오는대로 그대로 입력을 했거든요. Val 부분에 정확한 api key가 입력된 것도 수차례 확인했습니다. 어디에서 문제가 있는걸까요??
-
해결됨Airflow 마스터 클래스
docker 폴더 관련 질문
안녕하세요좋은 강의 감사드립니다. 섹션 7 custom operator 실습(마지막 강의) 16:11 부분에 보시면요폴더 구조를 아래와 같이 만들어놓으셨더라고요 조금 이해가 안되는게, 왜 dags 폴더를 airflow 바깥에도 만들어놓시고 안에도 만들어놓으신거죠?logs는 또 airflow 폴더 밖에 있고요. 강의 16:16 에 보면, dags는 airflow 안에 있는 것을 사용하고 계신것 같은데, (2) airflow 밖에 있는 dags 폴더를 만드신 이유, 그리고 (2) 왜 logs 폴더는 dags, plugins 와 다르게 airflow 밖에 만드셨는지 가 궁금합니다.
-
미해결[아파치 카프카 애플리케이션 프로그래밍] 개념부터 컨슈머, 프로듀서, 커넥트, 스트림즈까지!
shutdown hooking 이 되지 않는것 같습니다.
강의 내용과 같이 로그가 남지 않는데 왜 그런걸까요?
-
미해결[아파치 카프카 애플리케이션 프로그래밍] 개념부터 컨슈머, 프로듀서, 커넥트, 스트림즈까지!
simple consumer 실행 시 무한 로그 찍힘
안녕하세요!강의를 열심히 따라가는 중입니다.simple consumer 개발 시 실행을 하면15:46:20.636 [main] DEBUG org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-test-group-1, groupId=test-group] Built incremental fetch (sessionId=349253680, epoch=15) for node 0. Added 0 partition(s), altered 0 partition(s), removed 0 partition(s) out of 1 partition(s) 15:46:20.636 [main] DEBUG org.apache.kafka.clients.consumer.internals.Fetcher - [Consumer clientId=consumer-test-group-1, groupId=test-group] Sending READ_UNCOMMITTED IncrementalFetchRequest(toSend=(), toForget=(), implied=(test-0)) to broker localhost:9092 (id: 0 rack: null) 15:46:21.150 [main] DEBUG org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-test-group-1, groupId=test-group] Node 0 sent an incremental fetch response with throttleTimeMs = 0 for session 349253680 with 0 response partition(s), 1 implied partition(s) 15:46:21.150 [main] DEBUG org.apache.kafka.clients.consumer.internals.Fetcher - [Consumer clientId=consumer-test-group-1, groupId=test-group] Added READ_UNCOMMITTED fetch request for partition test-0 at position FetchPosition{offset=0, offsetEpoch=Optional.empty, currentLeader=LeaderAndEpoch{leader=Optional[localhost:9092 (id: 0 rack: null)], epoch=0}} to node localhost:9092 (id: 0 rack: null) 15:46:21.150 [main] DEBUG org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-test-group-1, groupId=test-group] Built incremental fetch (sessionId=349253680, epoch=16) for node 0. Added 0 partition(s), altered 0 partition(s), removed 0 partition(s) out of 1 partition(s) 15:46:21.150 [main] DEBUG org.apache.kafka.clients.consumer.internals.Fetcher - [Consumer clientId=consumer-test-group-1, groupId=test-group] Sending READ_UNCOMMITTED IncrementalFetchRequest(toSend=(), toForget=(), implied=(test-0)) to broker localhost:9092 (id: 0 rack: null)로그가 이런식으로 무한대로 찍히고스프링부트의 카프카 라이브러리를 통해 확인을 하면이렇게 상태가 empty라고 뜨며디버깅을 해보면 레코드에 데이터가 들어오지 않는 것을 확인 할 수 있습니다. 혹시 어느부분을 설정을 해주지않아서 그럴까요..? kafka-console-producer 스크립트를 통해서 메시지를 생성하면 읽을수 있긴 합니다..16:00:43.464 [main] INFO wendy.consumer.simpleconsumer.SimpleConsumer - record: ConsumerRecord(topic = test, partition = 0, leaderEpoch = 0, offset = 1, CreateTime = 1703660442453, serialized key size = -1, serialized value size = 12, headers = RecordHeaders(headers = [], isReadOnly = false), key = null, value = is it work??)
-
해결됨빅데이터 하둡 (Hadoop 3.2.1) 직접 설치하기
Hadop 3.2.1 버전 지원을 안하는거 같습니다
3.3.6 버전으로 진행 하여도 상관 없나요?혹시.. 리뉴얼.. 계획이 있으신가요..터미널 창이 너무 바닥 까지 있어서 초록생 진행 바와 터미널 창이랑 계속 겹쳐서 보기가 힘듭니다..ㅠ
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
강의 초반부 질문
초반부에 도커 초록불 들어온 거 확인하고docker run hello-world를 입력하고 엔터를 눌렀는데 아무 반응이 일어나질 않는데 뭐가 잘못됐는지 어림짐작가능하실까요?
-
미해결다양한 사례로 익히는 SQL 데이터 분석
pandas 연계시 오류.....
(아나콘다를 깔고나서 새 파일에서 뭘 수정하려고하면 바로 연결이 끊기는 문제가 생겨 주피터 노트북으로 설치하였습니다. 필요한 라이브러리들은 모두 따로 설치하였습니다.)버전은 아래와 같습니다.오류가 발생하는 부분은 이 부분인데query문이 있는 셀의 전체 오류문은 아래와 같습니다--------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) Cell In[12], line 4 1 query = """ 2 select * from nw.customers 3 """ ----> 4 df = pd.read_sql_query(sql=query, con=postgres_engine) 5 df.head(10) File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\io\sql.py:485, in read_sql_query(sql, con, index_col, coerce_float, params, parse_dates, chunksize, dtype, dtype_backend) 482 dtype_backend = "numpy" # type: ignore[assignment] 483 assert dtype_backend is not lib.no_default --> 485 with pandasSQL_builder(con) as pandas_sql: 486 return pandas_sql.read_query( 487 sql, 488 index_col=index_col, (...) 494 dtype_backend=dtype_backend, 495 ) File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\io\sql.py:851, in pandasSQL_builder(con, schema, need_transaction) 848 raise ImportError("Using URI string without sqlalchemy installed.") 850 if sqlalchemy is not None and isinstance(con, (str, sqlalchemy.engine.Connectable)): --> 851 return SQLDatabase(con, schema, need_transaction) 853 warnings.warn( 854 "pandas only supports SQLAlchemy connectable (engine/connection) or " 855 "database string URI or sqlite3 DBAPI2 connection. Other DBAPI2 " (...) 858 stacklevel=find_stack_level(), 859 ) 860 return SQLiteDatabase(con) File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\io\sql.py:1576, in SQLDatabase.__init__(self, con, schema, need_transaction) 1574 self.exit_stack.callback(con.dispose) 1575 if isinstance(con, Engine): -> 1576 con = self.exit_stack.enter_context(con.connect()) 1577 if need_transaction and not con.in_transaction(): 1578 self.exit_stack.enter_context(con.begin()) File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py:3268, in Engine.connect(self) 3245 def connect(self) -> Connection: 3246 """Return a new :class:`_engine.Connection` object. 3247 3248 The :class:`_engine.Connection` acts as a Python context manager, so (...) 3265 3266 """ -> 3268 return self._connection_cls(self) File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py:145, in Connection.__init__(self, engine, connection, _has_events, _allow_revalidate, _allow_autobegin) 143 if connection is None: 144 try: --> 145 self._dbapi_connection = engine.raw_connection() 146 except dialect.loaded_dbapi.Error as err: 147 Connection._handle_dbapi_exception_noconnection( 148 err, dialect, engine 149 ) File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py:3292, in Engine.raw_connection(self) 3270 def raw_connection(self) -> PoolProxiedConnection: 3271 """Return a "raw" DBAPI connection from the connection pool. 3272 3273 The returned object is a proxied version of the DBAPI (...) 3290 3291 """ -> 3292 return self.pool.connect() File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\pool\base.py:452, in Pool.connect(self) 444 def connect(self) -> PoolProxiedConnection: 445 """Return a DBAPI connection from the pool. 446 447 The connection is instrumented such that when its (...) 450 451 """ --> 452 return _ConnectionFairy._checkout(self) File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\pool\base.py:1269, in _ConnectionFairy._checkout(cls, pool, threadconns, fairy) 1261 @classmethod 1262 def _checkout( 1263 cls, (...) 1266 fairy: Optional[_ConnectionFairy] = None, 1267 ) -> _ConnectionFairy: 1268 if not fairy: -> 1269 fairy = _ConnectionRecord.checkout(pool) 1271 if threadconns is not None: 1272 threadconns.current = weakref.ref(fairy) File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\pool\base.py:716, in _ConnectionRecord.checkout(cls, pool) 714 rec = cast(_ConnectionRecord, pool._do_get()) 715 else: --> 716 rec = pool._do_get() 718 try: 719 dbapi_connection = rec.get_connection() File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\pool\impl.py:169, in QueuePool._do_get(self) 167 return self._create_connection() 168 except: --> 169 with util.safe_reraise(): 170 self._dec_overflow() 171 raise File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\util\langhelpers.py:146, in safe_reraise.__exit__(self, type_, value, traceback) 144 assert exc_value is not None 145 self._exc_info = None # remove potential circular references --> 146 raise exc_value.with_traceback(exc_tb) 147 else: 148 self._exc_info = None # remove potential circular references File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\pool\impl.py:167, in QueuePool._do_get(self) 165 if self._inc_overflow(): 166 try: --> 167 return self._create_connection() 168 except: 169 with util.safe_reraise(): File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\pool\base.py:393, in Pool._create_connection(self) 390 def _create_connection(self) -> ConnectionPoolEntry: 391 """Called by subclasses to create a new ConnectionRecord.""" --> 393 return _ConnectionRecord(self) File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\pool\base.py:678, in _ConnectionRecord.__init__(self, pool, connect) 676 self.__pool = pool 677 if connect: --> 678 self.__connect() 679 self.finalize_callback = deque() File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\pool\base.py:902, in _ConnectionRecord.__connect(self) 900 self.fresh = True 901 except BaseException as e: --> 902 with util.safe_reraise(): 903 pool.logger.debug("Error on connect(): %s", e) 904 else: 905 # in SQLAlchemy 1.4 the first_connect event is not used by 906 # the engine, so this will usually not be set File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\util\langhelpers.py:146, in safe_reraise.__exit__(self, type_, value, traceback) 144 assert exc_value is not None 145 self._exc_info = None # remove potential circular references --> 146 raise exc_value.with_traceback(exc_tb) 147 else: 148 self._exc_info = None # remove potential circular references File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\pool\base.py:898, in _ConnectionRecord.__connect(self) 896 try: 897 self.starttime = time.time() --> 898 self.dbapi_connection = connection = pool._invoke_creator(self) 899 pool.logger.debug("Created new connection %r", connection) 900 self.fresh = True File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\create.py:637, in create_engine.<locals>.connect(connection_record) 634 if connection is not None: 635 return connection --> 637 return dialect.connect(*cargs, **cparams) File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\default.py:616, in DefaultDialect.connect(self, *cargs, **cparams) 614 def connect(self, *cargs, **cparams): 615 # inherits the docstring from interfaces.Dialect.connect --> 616 return self.loaded_dbapi.connect(*cargs, **cparams) File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\psycopg2\__init__.py:122, in connect(dsn, connection_factory, cursor_factory, **kwargs) 119 kwasync['async_'] = kwargs.pop('async_') 121 dsn = _ext.make_dsn(dsn, **kwargs) --> 122 conn = _connect(dsn, connection_factory=connection_factory, **kwasync) 123 if cursor_factory is not None: 124 conn.cursor_factory = cursor_factory UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb8 in position 63: invalid start byte
-
해결됨실리콘밸리 엔지니어와 함께하는 Apache Airflow
connection 정보 이전 방법 질문드립니다.
안녕하세요 선생님 🙂 connection 정보를 새로운 환경에 이식 방법 질문드립니다.stackoverflow 등을 찾아보니 csv파일 또는 sh 파일로 구축하여 사용하는 것같은데요이 같은 방법은 보안에 취약할수있겠다는 생각이 들어서 어떤 방식으로 이식가능한 connection 정보를 저장하는것이 좋은지 질문드립니다. stackover reference - https://stackoverflow.com/questions/55626195/export-all-airflow-connections-to-new-environment즐거운 크리스마스 연휴되세요!감사합니다! 🙂
-
미해결[아파치 카프카 애플리케이션 프로그래밍] 개념부터 컨슈머, 프로듀서, 커넥트, 스트림즈까지!
컨슈머 랙 - 처리량 이슈 부분에서 질문이 있습니다.
안녕하세요, 먼저 좋은 강의 잘 듣고 있습니다 (- -) (_ _) 컨슈머 랙 모니터링 - 처리량 이슈 파트에서 궁금한 점이 생겨서 질문드립니다. 파티션 1개 - 컨슈머 1개에서 파티션 2개 - 컨슈머 2개가 되면 linear하게 처리량이 늘어난다고 하셨는데, 어떻게 처리량이 늘어나는 건지 조금 이해가 안가서요. 상단과 같은 구조는 하나의 컨슈머가 0,1,2,3... 이렇게 하나씩 처리를 한다고 하면, 하단과 같은 구조는 다음과 같이 레코드를 동시에 소비하게 되어 2배로 늘어난다는 말씀일까요?컨슈머 1 - 0 : 2 : 4 : 6 : ...컨슈머 2 - 1 : 3 : 5 : 7 : ...( : 는 레코드가 소비되는 시점을 구분한 것 입니다!) 만약 그렇다면, offset은 어떻게 관리가 되는건지도 궁금하네요..