Server asks us to fall back to SIMPLE auth, but this client is configured to only allow secure conne...

我是在flume向hdfs 写(sink)数据时遇到的这个错误.

Server (是指hdfs) asks us to fall back to SIMPLE auth, but this client (是指flume) is configured to only allow secure (是指kerberos) connections.

原因是flume开了kerberos,而hdfs没有开kerberos.

此时flume和hdfs的通信就不能使用相同的认证方式,hdfs只识别简单认证模式,而flume是kerberos认证模式.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
g steps: 1. Read the light sensor value and store it in a variable. 2. Determine the appropriate brightness level for the night light based on the light sensor value. For example, if the light sensor value is low, set the brightness level to high. 3. Set the brightness level of the three LEDs on the picoprobe board to the appropriate value based on the light sensor reading. 4. Continuously monitor the light sensor value and adjust the brightness of the LEDs accordingly to maintain the appropriate level of brightness for the night light. To accomplish this, you can use the built-in light sensor module in the MicroPython environment on the Picoprobe board. You may also need to use the PWM module to adjust the brightness of the LEDs. Here's some sample code to get you started: ```python import machine import time # Set up the light sensor adc = machine.ADC(4) # Pin GP26 on Picoprobe board light_sensor = adc.read_u16 # Set up the LEDs led1 = machine.PWM(machine.Pin(0)) # Pin GP0 on Picoprobe board led2 = machine.PWM(machine.Pin(1)) # Pin GP1 on Picoprobe board led3 = machine.PWM(machine.Pin(2)) # Pin GP2 on Picoprobe board # Main loop while True: # Read the light sensor and determine the appropriate brightness level for the LEDs light_value = light_sensor() if light_value < 5000: brightness = 65535 # High brightness else: brightness = 32768 # Medium brightness # Set the brightness level of the LEDs led1.duty_u16(brightness) led2.duty_u16(brightness) led3.duty_u16(brightness) # Wait a short time before taking the next reading time.sleep(0.1) ``` Note that you may need to adjust the threshold values for determining the appropriate brightness level based on your specific use case and environment.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值