主頁 >  其他 > 資料湖 IncrementalPuller 實作分析

資料湖 IncrementalPuller 實作分析

2021-03-05 10:56:18 其他

本文說討論的 IncrementalPuller 是指 Hadoop 資料的增量查詢,有兩種場景,batch 模式下查詢是指一次性回傳所有或者有變化的資料,steaming 模式下查詢是指連續回傳所有資料并接著只回傳有變化的資料,或者只回傳有變化的資料,這取決于用戶如何指定 increment scan 的 snapshot,

IncrementalPuller 配合資料的 Row Level Delete(即資料的update、delete)即可以實作 Incremental processing on Hadoop ,介于 batch processing 和 Stream processing 之間的 near-real-time processing,比如 batch processing 指的是資料結果延遲 1小時以上的,經典的是以 MR/Spark 為代表的 T+1 資料,Stream processing 指的是資料結果延遲小于5分鐘,以 Flink/Spark Streaming 為代表,而 near-real-time processing 指的是資料結果延遲在 5分鐘 到 1小時 之間計算,經典的場景是計算最近X分鐘某種結果,Uber 把這種近實時處理稱為 Incremental processing, 即增量處理,

舉個例子,計算最近十五分鐘訂單的成交金額,原始資料在 kafka 中,在不引入第三方存盤或者分析引擎,如 druid、ES、Kudu 等,批處理是無法得到結果的,但是對應的代價就是架構的復雜和重復的存盤,當然如果使用流處理利用視窗是可以得到結果的,劣勢在于流處理是長時間持有 Yarn Container 資源的,會對資源有浪費,若能實作增量處理,即通過只處理最近15分鐘變化的資料,可以避免批處理需要掃描所有資料,也可以避免流處理常駐行程導致的資源浪費,

Iceberg

以 flink 為例,在 iceberg 中 increment read 實作分為兩種,以 isStreaming 標志分別是 batch 和 streaming 兩種模式,batch 模式較為簡單,我們以 streaming 模式具體展開,

引數說明

  • streaming true: 表示流計算模式
  • snapshotId: 表示讀取哪個版本的資料,streaming reader 下不能設定該引數
  • asOfTimestamp: 和 snapshotId 引數作用類似,相當于用時間戳來指定 snapshotId ,若在時間遞增的情況下,有 snapshotId-NAN,timestamp-A,snapshotId-1,snapshotId-2,timestamp-B,snapshotId-3,其中 timestamp-A < timestamp-B, snapshotId-NAN 表示無 snapshot 生成,若用戶指定 timestamp-B,則從 snapshot-2 開始讀取資料,即最近提交的版本,

若用戶指定 timestamp-A,則將報錯,因為之前沒有提交成功的版本

  • startSnapshotId: streaming reader 從哪個版本開始讀取資料,但是不包括該版本的資料,不指定則讀取歷史所有資料
  • endSnapshotId: streaming reader 不能指定 end,batch 時指定后表示讀取到哪個版本為止,包括該版本

實作

測驗類

/**
 * 需要本地啟動 hadoop 服務
 */
public class IcebergReadWriteTest {

  public static void main(String[] args) throws Exception {
//    write();
    incrementalRead();
  }

  public static void write() throws Exception {
    StreamExecutionEnvironment env = initEnv();

    DataStream<RowData> inputStream = env.addSource(new RichSourceFunction<RowData>() {

      private static final long serialVersionUID = 1L;
      boolean flag = true;

      @Override
      public void run(SourceContext<RowData> ctx) throws Exception {
        while (flag) {
          GenericRowData row = new GenericRowData(2);
          row.setField(0, System.currentTimeMillis());
          row.setField(1, StringData.fromString(UUID.randomUUID().toString()));

          ctx.collect(row);
        }

      }

      @Override
      public void cancel() {
        flag = false;
      }
    });
    // define iceberg table schema.
    Schema schema = new Schema(Types.NestedField.optional(1, "id", Types.LongType.get()),
            Types.NestedField.optional(2, "data", Types.StringType.get()));
    // define iceberg partition specification.
    PartitionSpec spec = PartitionSpec.unpartitioned();

    // table path
    String basePath = "hdfs://localhost:8020/";

    String tablePath = basePath.concat("iceberg-table-2");

    // property settings, format as orc or parquet
    Map<String, String> props =
            ImmutableMap.of(TableProperties.DEFAULT_FILE_FORMAT, FileFormat.ORC.name());

    // create an iceberg table.
    Table table = new HadoopTables().create(schema, spec, props, tablePath);

    TableLoader tableLoader = TableLoader.fromHadoopTable(tablePath);

    FlinkSink.forRowData(inputStream).table(table).tableLoader(tableLoader).writeParallelism(1).build();
    env.execute("iceberg write and read.");
  }

  public static void incrementalRead() throws Exception {
    StreamExecutionEnvironment env = initEnv();

    // table path
    String basePath = "hdfs://localhost:8020/";
    String tablePath = basePath.concat("iceberg-table-2");
    TableLoader tableLoader = TableLoader.fromHadoopTable(tablePath);

    //read file
    DataStream<RowData> dataStream = FlinkSource.forRowData().env(env).tableLoader(tableLoader).streaming(true)
            .startSnapshotId(2790691321534033651L).build();

    dataStream.print("===");

    env.execute("iceberg read");
  }
  
  public static StreamExecutionEnvironment initEnv() throws Exception {
    StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
    env.setParallelism(1);
    env.enableCheckpointing(5000L);
    env.getCheckpointConfig().setCheckpointingMode(CheckpointingMode.EXACTLY_ONCE);
    env.getCheckpointConfig().setMinPauseBetweenCheckpoints(5000);
    env.getCheckpointConfig().setCheckpointTimeout(60 * 1000L);
    env.getCheckpointConfig().setMaxConcurrentCheckpoints(1);
    env.getCheckpointConfig().enableExternalizedCheckpoints(CheckpointConfig.ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION);

    return env;
  }
}


整體流程

  1. FlinkSource 每隔 10s 嘗試去拉取增量資料,判斷上次讀取的版本號,即 lastSnapshot,若 lastSnapshot 已經為當前最新的版本,說明所有的資料已經讀取,進入休眠
  2. 若 lastSnapshot 小于當前最新版本,說明至少有一個版本的 change log 沒有讀取,則根據 currentSnapshot - lastSnapshot 得到所有未讀取的 snapShots
  3. 根據 snapShots,可以得到這些版本號對應的所有的 manifestList,通過 manifestList 得到對應所有的 manifestFile,對 manifestFile 過濾,得到只屬于這些 snapShot 新增的 data manifestFile(manifestFile 新建時維護了相關屬性 content 和 snapshot)
  4. 根據上一步的 data manifestFile,得到對應所有的 data file,對 data file 過濾,得到只屬于這些 snapShot 新增的 data file (data file 新建時維護了相關屬性 status 和 snapshot)
  5. 根據 data file 構建 FileScanTask,并更新 lastSnapshot 為currentSnapshot

代碼說明

FlinkSource.build() 方法中根據 isStreaming=true 會構造 StreamingMonitorFunction,這個類繼承 Flink RichSourceFunction,相當于 Source

@Override
public void run(SourceContext<FlinkInputSplit> ctx) throws Exception {
  this.sourceContext = ctx;
  while (isRunning) {
    synchronized (sourceContext.getCheckpointLock()) {
      if (isRunning) {
        monitorAndForwardSplits();
      }
    }
	// 固定時間間隔去構造 FlinkInputSplit,默認 10s,
    Thread.sleep(scanContext.monitorInterval().toMillis());
  }
}

由 StreamingMonitorFunction 中構造 Split ,一直跳轉到 IncrementalDataTableScan 構造 planFiles,獲取需要特定檔案構造 Source 中本次讀取的資料

@Override
public CloseableIterable<FileScanTask> planFiles() {
// 獲取所需要遍歷的 Snapshot 集合,(fromSnapshotId, toSnapshotId], 左開右閉
  List<Snapshot> snapshots = snapshotsWithin(table(),
      context().fromSnapshotId(), context().toSnapshotId());
  Set<Long> snapshotIds = Sets.newHashSet(Iterables.transform(snapshots, Snapshot::snapshotId));
// 遍歷得到所有需要掃描的 ManifestFile
  Set<ManifestFile> manifests = FluentIterable
      .from(snapshots)
// 過濾 deleteManifests
      .transformAndConcat(Snapshot::dataManifests)
// manifestFile 創建的時候會帶上對應的 snapshotId,此處過濾相當于獲取每個 snapshot 新增的 manifestFile
      .filter(manifestFile -> snapshotIds.contains(manifestFile.snapshotId()))
      .toSet();

  ManifestGroup manifestGroup = new ManifestGroup(tableOps().io(), manifests)
      .caseSensitive(isCaseSensitive())
      .select(colStats() ? SCAN_WITH_STATS_COLUMNS : SCAN_COLUMNS)
      .filterData(filter())
      .filterManifestEntries(
          manifestEntry ->
// manifestEntry 是 dataFile 或 deleteFile 的包裝類,file 創建時會帶上對應的 snapshotId,此處過濾相當于獲取每個 manifestFile 中新增的 dataFile(deleteManifests 已被過濾)
              snapshotIds.contains(manifestEntry.snapshotId()) &&
              manifestEntry.status() == ManifestEntry.Status.ADDED)
      .specsById(tableOps().current().specsById())
      .ignoreDeleted();

  if (shouldIgnoreResiduals()) {
    manifestGroup = manifestGroup.ignoreResiduals();
  }

  Listeners.notifyAll(new IncrementalScanEvent(table().name(), context().fromSnapshotId(),
      context().toSnapshotId(), context().rowFilter(), schema()));

  if (PLAN_SCANS_WITH_WORKER_POOL && manifests.size() > 1) {
    manifestGroup = manifestGroup.planWith(ThreadPools.getWorkerPool());
  }

  return manifestGroup.planFiles();
}

/**
 * manifestGroup.planFiles() 通過上一步,已經得到部分 dataFile, 此處對所有 dataFile 進行遍歷,每一個 dataFile 構造為一個 task
 * 當前 IncrementalDataTableScan 不支持 overwrite 操作,故 delete file 為空
 */
public CloseableIterable<FileScanTask> planFiles() {
  LoadingCache<Integer, ResidualEvaluator> residualCache = Caffeine.newBuilder().build(specId -> {
    PartitionSpec spec = specsById.get(specId);
    Expression filter = ignoreResiduals ? Expressions.alwaysTrue() : dataFilter;
    return ResidualEvaluator.of(spec, filter, caseSensitive);
  });

  DeleteFileIndex deleteFiles = deleteIndexBuilder.build();

  boolean dropStats = ManifestReader.dropStats(dataFilter, columns);
  if (!deleteFiles.isEmpty()) {
    select(ManifestReader.withStatsColumns(columns));
  }

  Iterable<CloseableIterable<FileScanTask>> tasks = entries((manifest, entries) -> {
    int specId = manifest.partitionSpecId();
    PartitionSpec spec = specsById.get(specId);
    String schemaString = SchemaParser.toJson(spec.schema());
    String specString = PartitionSpecParser.toJson(spec);
    ResidualEvaluator residuals = residualCache.get(specId);
    if (dropStats) {
      return CloseableIterable.transform(entries, e -> new BaseFileScanTask(
          e.file().copyWithoutStats(), deleteFiles.forEntry(e), schemaString, specString, residuals));
    } else {
      return CloseableIterable.transform(entries, e -> new BaseFileScanTask(
          e.file().copy(), deleteFiles.forEntry(e), schemaString, specString, residuals));
    }
  });

  if (executorService != null) {
    return new ParallelIterable<>(tasks, executorService);
  } else {
    return CloseableIterable.concat(tasks);
  }
}

Hudi

測驗類如下,實作待定~

@Test def testCount() {
  // First Operation:
  // Producing parquet files to three default partitions.
  // SNAPSHOT view on MOR table with parquet files only.
  val records1 = recordsToStrings(dataGen.generateInserts("001", 100)).toList
  val inputDF1 = spark.read.json(spark.sparkContext.parallelize(records1, 2))
  inputDF1.write.format("org.apache.hudi")
    .options(commonOpts)
    .option("hoodie.compact.inline", "false") // else fails due to compaction & deltacommit instant times being same
    .option(DataSourceWriteOptions.OPERATION_OPT_KEY, DataSourceWriteOptions.INSERT_OPERATION_OPT_VAL)
    .option(DataSourceWriteOptions.TABLE_TYPE_OPT_KEY, DataSourceWriteOptions.MOR_TABLE_TYPE_OPT_VAL)
    .mode(SaveMode.Overwrite)
    .save(basePath)
  assertTrue(HoodieDataSourceHelpers.hasNewCommits(fs, basePath, "000"))
  val hudiSnapshotDF1 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_SNAPSHOT_OPT_VAL)
    .load(basePath + "/*/*/*/*")
  assertEquals(100, hudiSnapshotDF1.count()) // still 100, since we only updated

  // Second Operation:
  // Upsert the update to the default partitions with duplicate records. Produced a log file for each parquet.
  // SNAPSHOT view should read the log files only with the latest commit time.
  val records2 = recordsToStrings(dataGen.generateUniqueUpdates("002", 100)).toList
  val inputDF2: Dataset[Row] = spark.read.json(spark.sparkContext.parallelize(records2, 2))
  inputDF2.write.format("org.apache.hudi")
    .options(commonOpts)
    .mode(SaveMode.Append)
    .save(basePath)
  val hudiSnapshotDF2 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_SNAPSHOT_OPT_VAL)
    .load(basePath + "/*/*/*/*")
  assertEquals(100, hudiSnapshotDF2.count()) // still 100, since we only updated
  val commit1Time = hudiSnapshotDF1.select("_hoodie_commit_time").head().get(0).toString
  val commit2Time = hudiSnapshotDF2.select("_hoodie_commit_time").head().get(0).toString
  assertEquals(hudiSnapshotDF2.select("_hoodie_commit_time").distinct().count(), 1)
  assertTrue(commit2Time > commit1Time)
  assertEquals(100, hudiSnapshotDF2.join(hudiSnapshotDF1, Seq("_hoodie_record_key"), "left").count())

  // incremental view
  // base file only
  val hudiIncDF1 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_INCREMENTAL_OPT_VAL)
    .option(DataSourceReadOptions.BEGIN_INSTANTTIME_OPT_KEY, "000")
    .option(DataSourceReadOptions.END_INSTANTTIME_OPT_KEY, commit1Time)
    .load(basePath)
  assertEquals(100, hudiIncDF1.count())
  assertEquals(1, hudiIncDF1.select("_hoodie_commit_time").distinct().count())
  assertEquals(commit1Time, hudiIncDF1.select("_hoodie_commit_time").head().get(0).toString)
  hudiIncDF1.show(1)
  // log file only
  val hudiIncDF2 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_INCREMENTAL_OPT_VAL)
    .option(DataSourceReadOptions.BEGIN_INSTANTTIME_OPT_KEY, commit1Time)
    .option(DataSourceReadOptions.END_INSTANTTIME_OPT_KEY, commit2Time)
    .load(basePath)
  assertEquals(100, hudiIncDF2.count())
  assertEquals(1, hudiIncDF2.select("_hoodie_commit_time").distinct().count())
  assertEquals(commit2Time, hudiIncDF2.select("_hoodie_commit_time").head().get(0).toString)
  hudiIncDF2.show(1)

  // base file + log file
  val hudiIncDF3 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_INCREMENTAL_OPT_VAL)
    .option(DataSourceReadOptions.BEGIN_INSTANTTIME_OPT_KEY, "000")
    .option(DataSourceReadOptions.END_INSTANTTIME_OPT_KEY, commit2Time)
    .load(basePath)
  assertEquals(100, hudiIncDF3.count())
  // log file being load
  assertEquals(1, hudiIncDF3.select("_hoodie_commit_time").distinct().count())
  assertEquals(commit2Time, hudiIncDF3.select("_hoodie_commit_time").head().get(0).toString)

  // Unmerge
  val hudiSnapshotSkipMergeDF2 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_SNAPSHOT_OPT_VAL)
    .option(DataSourceReadOptions.REALTIME_MERGE_OPT_KEY, DataSourceReadOptions.REALTIME_SKIP_MERGE_OPT_VAL)
    .load(basePath + "/*/*/*/*")
  assertEquals(200, hudiSnapshotSkipMergeDF2.count())
  assertEquals(100, hudiSnapshotSkipMergeDF2.select("_hoodie_record_key").distinct().count())
  assertEquals(200, hudiSnapshotSkipMergeDF2.join(hudiSnapshotDF2, Seq("_hoodie_record_key"), "left").count())

  // Test Read Optimized Query on MOR table
  val hudiRODF2 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_READ_OPTIMIZED_OPT_VAL)
    .load(basePath + "/*/*/*/*")
  assertEquals(100, hudiRODF2.count())

  // Third Operation:
  // Upsert another update to the default partitions with 50 duplicate records. Produced the second log file for each parquet.
  // SNAPSHOT view should read the latest log files.
  val records3 = recordsToStrings(dataGen.generateUniqueUpdates("003", 50)).toList
  val inputDF3: Dataset[Row] = spark.read.json(spark.sparkContext.parallelize(records3, 2))
  inputDF3.write.format("org.apache.hudi")
    .options(commonOpts)
    .mode(SaveMode.Append)
    .save(basePath)
  val hudiSnapshotDF3 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_SNAPSHOT_OPT_VAL)
    .load(basePath + "/*/*/*/*")
  // still 100, because we only updated the existing records
  assertEquals(100, hudiSnapshotDF3.count())

  // 50 from commit2, 50 from commit3
  assertEquals(hudiSnapshotDF3.select("_hoodie_commit_time").distinct().count(), 2)
  assertEquals(50, hudiSnapshotDF3.filter(col("_hoodie_commit_time") > commit2Time).count())
  assertEquals(50,
    hudiSnapshotDF3.join(hudiSnapshotDF2, Seq("_hoodie_record_key", "_hoodie_commit_time"), "inner").count())

  // incremental query from commit2Time
  val hudiIncDF4 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_INCREMENTAL_OPT_VAL)
    .option(DataSourceReadOptions.BEGIN_INSTANTTIME_OPT_KEY, commit2Time)
    .load(basePath)
  assertEquals(50, hudiIncDF4.count())

  // skip merge incremental view
  // including commit 2 and commit 3
  val hudiIncDF4SkipMerge = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_INCREMENTAL_OPT_VAL)
    .option(DataSourceReadOptions.BEGIN_INSTANTTIME_OPT_KEY, "000")
    .option(DataSourceReadOptions.REALTIME_MERGE_OPT_KEY, DataSourceReadOptions.REALTIME_SKIP_MERGE_OPT_VAL)
    .load(basePath)
  assertEquals(200, hudiIncDF4SkipMerge.count())

  // Fourth Operation:
  // Insert records to a new partition. Produced a new parquet file.
  // SNAPSHOT view should read the latest log files from the default partition and parquet from the new partition.
  val partitionPaths = new Array[String](1)
  partitionPaths.update(0, "2020/01/10")
  val newDataGen = new HoodieTestDataGenerator(partitionPaths)
  val records4 = recordsToStrings(newDataGen.generateInserts("004", 100)).toList
  val inputDF4: Dataset[Row] = spark.read.json(spark.sparkContext.parallelize(records4, 2))
  inputDF4.write.format("org.apache.hudi")
    .options(commonOpts)
    .mode(SaveMode.Append)
    .save(basePath)
  val hudiSnapshotDF4 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_SNAPSHOT_OPT_VAL)
    .load(basePath + "/*/*/*/*")
  // 200, because we insert 100 records to a new partition
  assertEquals(200, hudiSnapshotDF4.count())
  assertEquals(100,
    hudiSnapshotDF1.join(hudiSnapshotDF4, Seq("_hoodie_record_key"), "inner").count())

  // Incremental query, 50 from log file, 100 from base file of the new partition.
  val hudiIncDF5 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_INCREMENTAL_OPT_VAL)
    .option(DataSourceReadOptions.BEGIN_INSTANTTIME_OPT_KEY, commit2Time)
    .load(basePath)
  assertEquals(150, hudiIncDF5.count())

  // Fifth Operation:
  // Upsert records to the new partition. Produced a newer version of parquet file.
  // SNAPSHOT view should read the latest log files from the default partition
  // and the latest parquet from the new partition.
  val records5 = recordsToStrings(newDataGen.generateUniqueUpdates("005", 50)).toList
  val inputDF5: Dataset[Row] = spark.read.json(spark.sparkContext.parallelize(records5, 2))
  inputDF5.write.format("org.apache.hudi")
    .options(commonOpts)
    .mode(SaveMode.Append)
    .save(basePath)
  val commit5Time = HoodieDataSourceHelpers.latestCommit(fs, basePath)
  val hudiSnapshotDF5 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_SNAPSHOT_OPT_VAL)
    .load(basePath + "/*/*/*/*")
  assertEquals(200, hudiSnapshotDF5.count())

  // Sixth Operation:
  // Insert 2 records and trigger compaction.
  val records6 = recordsToStrings(newDataGen.generateInserts("006", 2)).toList
  val inputDF6: Dataset[Row] = spark.read.json(spark.sparkContext.parallelize(records6, 2))
  inputDF6.write.format("org.apache.hudi")
    .options(commonOpts)
    .option("hoodie.compact.inline", "true")
    .mode(SaveMode.Append)
    .save(basePath)
  val commit6Time = HoodieDataSourceHelpers.latestCommit(fs, basePath)
  val hudiSnapshotDF6 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_SNAPSHOT_OPT_VAL)
    .load(basePath + "/2020/01/10/*")
  assertEquals(102, hudiSnapshotDF6.count())
  val hudiIncDF6 = spark.read.format("org.apache.hudi")
    .option(DataSourceReadOptions.QUERY_TYPE_OPT_KEY, DataSourceReadOptions.QUERY_TYPE_INCREMENTAL_OPT_VAL)
    .option(DataSourceReadOptions.BEGIN_INSTANTTIME_OPT_KEY, commit5Time)
    .option(DataSourceReadOptions.END_INSTANTTIME_OPT_KEY, commit6Time)
    .load(basePath)
  // compaction updated 150 rows + inserted 2 new row
  assertEquals(152, hudiIncDF6.count())
}

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/266347.html

標籤:其他

上一篇:技術檔案:部署 GlusterFS 群集以及破壞性測驗

下一篇:shell腳本詳解(二)——條件測驗、if陳述句和case分支陳述句

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 網閘典型架構簡述

    網閘架構一般分為兩種:三主機的三系統架構網閘和雙主機的2+1架構網閘。 三主機架構分別為內端機、外端機和仲裁機。三機無論從軟體和硬體上均各自獨立。首先從硬體上來看,三機都用各自獨立的主板、記憶體及存盤設備。從軟體上來看,三機有各自獨立的作業系統。這樣能達到完全的三機獨立。對于“2+1”系統,“2”分為 ......

    uj5u.com 2020-09-10 02:00:44 more
  • 如何從xshell上傳檔案到centos linux虛擬機里

    如何從xshell上傳檔案到centos linux虛擬機里及:虛擬機CentOs下執行 yum -y install lrzsz命令,出現錯誤:鏡像無法找到軟體包 前言 一、安裝lrzsz步驟 二、上傳檔案 三、遇到的問題及解決方案 總結 前言 提示:其實很簡單,往虛擬機上安裝一個上傳檔案的工具 ......

    uj5u.com 2020-09-10 02:00:47 more
  • 一、SQLMAP入門

    一、SQLMAP入門 1、判斷是否存在注入 sqlmap.py -u 網址/id=1 id=1不可缺少。當注入點后面的引數大于兩個時。需要加雙引號, sqlmap.py -u "網址/id=1&uid=1" 2、判斷文本中的請求是否存在注入 從文本中加載http請求,SQLMAP可以從一個文本檔案中 ......

    uj5u.com 2020-09-10 02:00:50 more
  • Metasploit 簡單使用教程

    metasploit 簡單使用教程 浩先生, 2020-08-28 16:18:25 分類專欄: kail 網路安全 linux 文章標簽: linux資訊安全 編輯 著作權 metasploit 使用教程 前言 一、Metasploit是什么? 二、準備作業 三、具體步驟 前言 Msfconsole ......

    uj5u.com 2020-09-10 02:00:53 more
  • 游戲逆向之驅動層與用戶層通訊

    驅動層代碼: #pragma once #include <ntifs.h> #define add_code CTL_CODE(FILE_DEVICE_UNKNOWN,0x800,METHOD_BUFFERED,FILE_ANY_ACCESS) /* 更多游戲逆向視頻www.yxfzedu.com ......

    uj5u.com 2020-09-10 02:00:56 more
  • 北斗電力時鐘(北斗授時服務器)讓網路資料更精準

    北斗電力時鐘(北斗授時服務器)讓網路資料更精準 北斗電力時鐘(北斗授時服務器)讓網路資料更精準 京準電子科技官微——ahjzsz 近幾年,資訊技術的得了快速發展,互聯網在逐漸普及,其在人們生活和生產中都得到了廣泛應用,并且取得了不錯的應用效果。計算機網路資訊在電力系統中的應用,一方面使電力系統的運行 ......

    uj5u.com 2020-09-10 02:01:03 more
  • 【CTF】CTFHub 技能樹 彩蛋 writeup

    ?碎碎念 CTFHub:https://www.ctfhub.com/ 筆者入門CTF時時剛開始刷的是bugku的舊平臺,后來才有了CTFHub。 感覺不論是網頁UI設計,還是題目質量,賽事跟蹤,工具軟體都做得很不錯。 而且因為獨到的金幣制度的確讓人有一種想去刷題賺金幣的感覺。 個人還是非常喜歡這個 ......

    uj5u.com 2020-09-10 02:04:05 more
  • 02windows基礎操作

    我學到了一下幾點 Windows系統目錄結構與滲透的作用 常見Windows的服務詳解 Windows埠詳解 常用的Windows注冊表詳解 hacker DOS命令詳解(net user / type /md /rd/ dir /cd /net use copy、批處理 等) 利用dos命令制作 ......

    uj5u.com 2020-09-10 02:04:18 more
  • 03.Linux基礎操作

    我學到了以下幾點 01Linux系統介紹02系統安裝,密碼啊破解03Linux常用命令04LAMP 01LINUX windows: win03 8 12 16 19 配置不繁瑣 Linux:redhat,centos(紅帽社區版),Ubuntu server,suse unix:金融機構,證券,銀 ......

    uj5u.com 2020-09-10 02:04:30 more
  • 05HTML

    01HTML介紹 02頭部標簽講解03基礎標簽講解04表單標簽講解 HTML前段語言 js1.了解代碼2.根據代碼 懂得挖掘漏洞 (POST注入/XSS漏洞上傳)3.黑帽seo 白帽seo 客戶網站被黑帽植入劫持代碼如何處理4.熟悉html表單 <html><head><title>TDK標題,描述 ......

    uj5u.com 2020-09-10 02:04:36 more
最新发布
  • 2023年最新微信小程式抓包教程

    01 開門見山 隔一個月發一篇文章,不過分。 首先回顧一下《微信系結手機號資料庫被脫庫事件》,我也是第一時間得知了這個訊息,然后跟蹤了整件事情的經過。下面是這起事件的相關截圖以及近日流出的一萬條資料樣本: 個人認為這件事也沒什么,還不如關注一下之前45億快遞資料查詢渠道疑似在近日復活的訊息。 訊息是 ......

    uj5u.com 2023-04-20 08:48:24 more
  • web3 產品介紹:metamask 錢包 使用最多的瀏覽器插件錢包

    Metamask錢包是一種基于區塊鏈技術的數字貨幣錢包,它允許用戶在安全、便捷的環境下管理自己的加密資產。Metamask錢包是以太坊生態系統中最流行的錢包之一,它具有易于使用、安全性高和功能強大等優點。 本文將詳細介紹Metamask錢包的功能和使用方法。 一、 Metamask錢包的功能 數字資 ......

    uj5u.com 2023-04-20 08:47:46 more
  • vulnhub_Earth

    前言 靶機地址->>>vulnhub_Earth 攻擊機ip:192.168.20.121 靶機ip:192.168.20.122 參考文章 https://www.cnblogs.com/Jing-X/archive/2022/04/03/16097695.html https://www.cnb ......

    uj5u.com 2023-04-20 07:46:20 more
  • 從4k到42k,軟體測驗工程師的漲薪史,給我看哭了

    清明節一過,盲猜大家已經無心上班,在數著日子準備過五一,但一想到銀行卡里的余額……瞬間心情就不美麗了。最近,2023年高校畢業生就業調查顯示,本科畢業月平均起薪為5825元。調查一出,便有很多同學表示自己又被平均了。看著這一資料,不免讓人想到前不久中國青年報的一項調查:近六成大學生認為畢業10年內會 ......

    uj5u.com 2023-04-20 07:44:00 more
  • 最新版本 Stable Diffusion 開源 AI 繪畫工具之中文自動提詞篇

    🎈 標簽生成器 由于輸入正向提示詞 prompt 和反向提示詞 negative prompt 都是使用英文,所以對學習母語的我們非常不友好 使用網址:https://tinygeeker.github.io/p/ai-prompt-generator 這個網址是為了讓大家在使用 AI 繪畫的時候 ......

    uj5u.com 2023-04-20 07:43:36 more
  • 漫談前端自動化測驗演進之路及測驗工具分析

    隨著前端技術的不斷發展和應用程式的日益復雜,前端自動化測驗也在不斷演進。隨著 Web 應用程式變得越來越復雜,自動化測驗的需求也越來越高。如今,自動化測驗已經成為 Web 應用程式開發程序中不可或缺的一部分,它們可以幫助開發人員更快地發現和修復錯誤,提高應用程式的性能和可靠性。 ......

    uj5u.com 2023-04-20 07:43:16 more
  • CANN開發實踐:4個DVPP記憶體問題的典型案例解讀

    摘要:由于DVPP媒體資料處理功能對存放輸入、輸出資料的記憶體有更高的要求(例如,記憶體首地址128位元組對齊),因此需呼叫專用的記憶體申請介面,那么本期就分享幾個關于DVPP記憶體問題的典型案例,并給出原因分析及解決方法。 本文分享自華為云社區《FAQ_DVPP記憶體問題案例》,作者:昇騰CANN。 DVPP ......

    uj5u.com 2023-04-20 07:43:03 more
  • msf學習

    msf學習 以kali自帶的msf為例 一、msf核心模塊與功能 msf模塊都放在/usr/share/metasploit-framework/modules目錄下 1、auxiliary 輔助模塊,輔助滲透(埠掃描、登錄密碼爆破、漏洞驗證等) 2、encoders 編碼器模塊,主要包含各種編碼 ......

    uj5u.com 2023-04-20 07:42:59 more
  • Halcon軟體安裝與界面簡介

    1. 下載Halcon17版本到到本地 2. 雙擊安裝包后 3. 步驟如下 1.2 Halcon軟體安裝 界面分為四大塊 1. Halcon的五個助手 1) 影像采集助手:與相機連接,設定相機引數,采集影像 2) 標定助手:九點標定或是其它的標定,生成標定檔案及內參外參,可以將像素單位轉換為長度單位 ......

    uj5u.com 2023-04-20 07:42:17 more
  • 在MacOS下使用Unity3D開發游戲

    第一次發博客,先發一下我的游戲開發環境吧。 去年2月份買了一臺MacBookPro2021 M1pro(以下簡稱mbp),這一年來一直在用mbp開發游戲。我大致分享一下我的開發工具以及使用體驗。 1、Unity 官網鏈接: https://unity.cn/releases 我一般使用的Apple ......

    uj5u.com 2023-04-20 07:40:19 more